Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions MEOS.NET/Functions/Meos.Native.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9217,6 +9217,10 @@ private static partial class Native
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool GeoIsPlanarLinear(IntPtr gs);

[LibraryImport(DllPath, EntryPoint = "geo_clip_subject", StringMarshalling = StringMarshalling.Utf8)]
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool GeoClipSubject(IntPtr gs);

[LibraryImport(DllPath, EntryPoint = "geo_is_point_set", StringMarshalling = StringMarshalling.Utf8)]
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool GeoIsPointSet(IntPtr gs);
Expand Down
3 changes: 3 additions & 0 deletions MEOS.NET/Functions/Meos.meos_internal_geo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ public static IntPtr GeoEdgeCtxMake(IntPtr gs)
public static bool GeoIsPlanarLinear(IntPtr gs)
=> SafeExecution<bool>(() => Native.GeoIsPlanarLinear(gs));

public static bool GeoClipSubject(IntPtr gs)
=> SafeExecution<bool>(() => Native.GeoClipSubject(gs));

public static bool GeoIsPointSet(IntPtr gs)
=> SafeExecution<bool>(() => Native.GeoIsPointSet(gs));

Expand Down
31 changes: 31 additions & 0 deletions MEOS.NET/Types/JsonPath.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#nullable enable

using System.Runtime.InteropServices;

using MEOS.NET.Enums;
using MEOS.NET.Functions;
using MEOS.NET.Structures;

namespace MEOS.NET.Types
{
/// <summary>A path into a jsonb value. A MeosType no membership predicate admits, as Nsegment and Raquet are; the nine signatures naming it are what need it.</summary>
[System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")]
public class JsonPath : Value
{
internal JsonPath(IntPtr ptr) : base(ptr) { }

/// <summary>The text MEOS writes this value as.</summary>
public override string ToString()
=> this.Out();

public JsonPath? Copy()
=> MEOSFactory.WrapJsonPath(Meos.JsonpathCopy(this.Ptr));

public string Out()
=> Meos.JsonpathOut(this.Ptr);

public static JsonPath? In(string str)
=> MEOSFactory.WrapJsonPath(Meos.JsonpathIn(str));

}
}
15 changes: 15 additions & 0 deletions MEOS.NET/Types/Jsonb.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,21 @@ public ulong HashExtended(ulong seed)
public string Out()
=> Meos.JsonbOut(this.Ptr);

public int PathExists(JsonPath jp, Jsonb vars, bool silent, bool tz)
=> Meos.JsonbPathExists(this.Ptr, jp.Ptr, vars.Ptr, silent, tz);

public bool PathMatch(JsonPath jp, Jsonb vars, bool silent, bool tz)
=> Meos.JsonbPathMatch(this.Ptr, jp.Ptr, vars.Ptr, silent, tz);

public Jsonb?[] PathQueryAll(JsonPath jp, Jsonb vars, bool silent, bool tz)
=> MEOSFactory.WrapJsonbArray(Meos.JsonbPathQueryAll(this.Ptr, jp.Ptr, vars.Ptr, silent, tz));

public Jsonb? PathQueryArray(JsonPath jp, Jsonb vars, bool silent, bool tz)
=> MEOSFactory.WrapJsonb(Meos.JsonbPathQueryArray(this.Ptr, jp.Ptr, vars.Ptr, silent, tz));

public Jsonb? PathQueryFirst(JsonPath jp, Jsonb vars, bool silent, bool tz)
=> MEOSFactory.WrapJsonb(Meos.JsonbPathQueryFirst(this.Ptr, jp.Ptr, vars.Ptr, silent, tz));

public Text? Pretty()
=> MEOSFactory.WrapText(Meos.JsonbPretty(this.Ptr));

Expand Down
120 changes: 120 additions & 0 deletions MEOS.NET/Types/MEOSFactory.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ public static class MEOSFactory
return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the JsonPath
/// class the model gives its runtime type.</summary>
public static JsonPath? WrapJsonPath(IntPtr ptr)
{
if (ptr == IntPtr.Zero)
{
return null;
}

return new JsonPath(ptr);
}

/// <summary>Every element of a C array of JsonPath pointers, wrapped.</summary>
public static JsonPath?[] WrapJsonPathArray(IntPtr[] ptrs)
{
JsonPath?[] wrapped = new JsonPath?[ptrs.Length];
for (int i = 0; i < ptrs.Length; i++)
{
wrapped[i] = WrapJsonPath(ptrs[i]);
}

return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the Jsonb
/// class the model gives its runtime type.</summary>
public static Jsonb? WrapJsonb(IntPtr ptr)
Expand All @@ -89,6 +113,30 @@ public static class MEOSFactory
return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the MeosArray
/// class the model gives its runtime type.</summary>
public static MeosArray? WrapMeosArray(IntPtr ptr)
{
if (ptr == IntPtr.Zero)
{
return null;
}

return new MeosArray(ptr);
}

/// <summary>Every element of a C array of MeosArray pointers, wrapped.</summary>
public static MeosArray?[] WrapMeosArrayArray(IntPtr[] ptrs)
{
MeosArray?[] wrapped = new MeosArray?[ptrs.Length];
for (int i = 0; i < ptrs.Length; i++)
{
wrapped[i] = WrapMeosArray(ptrs[i]);
}

return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the Npoint
/// class the model gives its runtime type.</summary>
public static Npoint? WrapNpoint(IntPtr ptr)
Expand Down Expand Up @@ -137,6 +185,30 @@ public static class MEOSFactory
return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the Pcschema
/// class the model gives its runtime type.</summary>
public static Pcschema? WrapPcschema(IntPtr ptr)
{
if (ptr == IntPtr.Zero)
{
return null;
}

return new Pcschema(ptr);
}

/// <summary>Every element of a C array of Pcschema pointers, wrapped.</summary>
public static Pcschema?[] WrapPcschemaArray(IntPtr[] ptrs)
{
Pcschema?[] wrapped = new Pcschema?[ptrs.Length];
for (int i = 0; i < ptrs.Length; i++)
{
wrapped[i] = WrapPcschema(ptrs[i]);
}

return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the Pcpatch
/// class the model gives its runtime type.</summary>
public static Pcpatch? WrapPcpatch(IntPtr ptr)
Expand Down Expand Up @@ -233,6 +305,30 @@ public static class MEOSFactory
return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the RTree
/// class the model gives its runtime type.</summary>
public static RTree? WrapRTree(IntPtr ptr)
{
if (ptr == IntPtr.Zero)
{
return null;
}

return new RTree(ptr);
}

/// <summary>Every element of a C array of RTree pointers, wrapped.</summary>
public static RTree?[] WrapRTreeArray(IntPtr[] ptrs)
{
RTree?[] wrapped = new RTree?[ptrs.Length];
for (int i = 0; i < ptrs.Length; i++)
{
wrapped[i] = WrapRTree(ptrs[i]);
}

return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the Raquet
/// class the model gives its runtime type.</summary>
public static Raquet? WrapRaquet(IntPtr ptr)
Expand All @@ -257,6 +353,30 @@ public static class MEOSFactory
return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the SPTree
/// class the model gives its runtime type.</summary>
public static SPTree? WrapSPTree(IntPtr ptr)
{
if (ptr == IntPtr.Zero)
{
return null;
}

return new SPTree(ptr);
}

/// <summary>Every element of a C array of SPTree pointers, wrapped.</summary>
public static SPTree?[] WrapSPTreeArray(IntPtr[] ptrs)
{
SPTree?[] wrapped = new SPTree?[ptrs.Length];
for (int i = 0; i < ptrs.Length; i++)
{
wrapped[i] = WrapSPTree(ptrs[i]);
}

return wrapped;
}

/// <summary>The value at <paramref name="ptr"/> as the STBox
/// class the model gives its runtime type.</summary>
public static STBox? WrapSTBox(IntPtr ptr)
Expand Down
36 changes: 36 additions & 0 deletions MEOS.NET/Types/MeosArray.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#nullable enable

using System.Runtime.InteropServices;

using MEOS.NET.Enums;
using MEOS.NET.Functions;
using MEOS.NET.Structures;

namespace MEOS.NET.Types
{
/// <summary>The growable array MEOS builds its own results in. MEOS registers it in no enum, so it names no temptype.</summary>
[System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")]
public class MeosArray : Value
{
internal MeosArray(IntPtr ptr) : base(ptr) { }

public int Count()
=> Meos.MeosArrayCount(this.Ptr);

public void Destroy()
=> Meos.MeosArrayDestroy(this.Ptr);

public void DestroyFree()
=> Meos.MeosArrayDestroyFree(this.Ptr);

public void Reset()
=> Meos.MeosArrayReset(this.Ptr);

public void ResetFree()
=> Meos.MeosArrayResetFree(this.Ptr);

public static MeosArray? Create(int elem_size)
=> MEOSFactory.WrapMeosArray(Meos.MeosArrayCreate(elem_size));

}
}
75 changes: 75 additions & 0 deletions MEOS.NET/Types/Pcpoint.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,81 @@ public int Cmp(Pcpoint pt2)
public Pcpoint? Copy()
=> MEOSFactory.WrapPcpoint(Meos.PcpointCopy(this.Ptr));

public double? GetDim(Pcschema schema, string name)
{
IntPtr _out = Marshal.AllocHGlobal(8);
try
{
if (!Meos.PcpointGetDim(this.Ptr, schema.Ptr, name, _out))
{
return null;
}

return Marshal.PtrToStructure<double>(_out);
}
finally
{
Marshal.FreeHGlobal(_out);
}
}

public uint GetPcid()
=> Meos.PcpointGetPcid(this.Ptr);

public double? GetX(Pcschema schema)
{
IntPtr _out = Marshal.AllocHGlobal(8);
try
{
if (!Meos.PcpointGetX(this.Ptr, schema.Ptr, _out))
{
return null;
}

return Marshal.PtrToStructure<double>(_out);
}
finally
{
Marshal.FreeHGlobal(_out);
}
}

public double? GetY(Pcschema schema)
{
IntPtr _out = Marshal.AllocHGlobal(8);
try
{
if (!Meos.PcpointGetY(this.Ptr, schema.Ptr, _out))
{
return null;
}

return Marshal.PtrToStructure<double>(_out);
}
finally
{
Marshal.FreeHGlobal(_out);
}
}

public double? GetZ(Pcschema schema)
{
IntPtr _out = Marshal.AllocHGlobal(8);
try
{
if (!Meos.PcpointGetZ(this.Ptr, schema.Ptr, _out))
{
return null;
}

return Marshal.PtrToStructure<double>(_out);
}
finally
{
Marshal.FreeHGlobal(_out);
}
}

public uint Hash()
=> Meos.PcpointHash(this.Ptr);

Expand All @@ -38,6 +110,9 @@ public string HexOut(int maxdd)
public Set? ToSet()
=> MEOSFactory.WrapSet(Meos.PcpointToSet(this.Ptr));

public TPCBox? ToTpcbox(Pcschema schema)
=> MEOSFactory.WrapTPCBox(Meos.PcpointToTpcbox(this.Ptr, schema.Ptr));

public static Pcpoint? FromHEXWKB(string hexwkb)
=> MEOSFactory.WrapPcpoint(Meos.PcpointFromHexwkb(hexwkb));

Expand Down
33 changes: 33 additions & 0 deletions MEOS.NET/Types/Pcschema.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#nullable enable

using System.Runtime.InteropServices;

using MEOS.NET.Enums;
using MEOS.NET.Functions;
using MEOS.NET.Structures;

namespace MEOS.NET.Types
{
/// <summary>The dimension schema a point cloud value is read through. Every pcpoint and pcpatch accessor takes one, and the process-global cache answers it for a pcid. MEOS registers it in no enum, so it names no temptype.</summary>
[System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")]
public class Pcschema : Value
{
internal Pcschema(IntPtr ptr) : base(ptr) { }

public static string? Compression(uint pcid)
=> Meos.MeosPcSchemaCompression(pcid);

public static Pcschema? Get(uint pcid)
=> MEOSFactory.WrapPcschema(Meos.MeosPcSchema(pcid));

public static int Ndims(uint pcid)
=> Meos.MeosPcSchemaNdims(pcid);

public static int SRID(uint pcid)
=> Meos.MeosPcSchemaSrid(pcid);

public static string? Xml(uint pcid)
=> Meos.MeosPcSchemaXml(pcid);

}
}
Loading
Loading