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
15 changes: 13 additions & 2 deletions MEOS.NET/Functions/Meos.meos.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3136,8 +3136,19 @@ public static int[] TintValues(IntPtr temp)
finally { Marshal.FreeHGlobal(_cnt); }
}

public static IntPtr TbigintValues(IntPtr temp, IntPtr count)
=> SafeExecution<IntPtr>(() => Native.TbigintValues(temp, count));
public static long[] TbigintValues(IntPtr temp)
{
IntPtr _cnt = Marshal.AllocHGlobal(sizeof(int));
try
{
IntPtr _p = SafeExecution<IntPtr>(() => Native.TbigintValues(temp, _cnt));
int _n = Marshal.ReadInt32(_cnt);
long[] _out = new long[_n];
Marshal.Copy(_p, _out, 0, _n);
return _out;
}
finally { Marshal.FreeHGlobal(_cnt); }
}

public static double TnumberAvgValue(IntPtr temp)
=> SafeExecution<double>(() => Native.TnumberAvgValue(temp));
Expand Down
48 changes: 48 additions & 0 deletions MEOS.NET/Types/MEOSFactory.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,30 @@ public static class MEOSFactory
return wrapped;
}

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

return new RTreeNNCursor(ptr);
}

/// <summary>Every element of a C array of RTreeNNCursor pointers, wrapped.</summary>
public static RTreeNNCursor?[] WrapRTreeNNCursorArray(IntPtr[] ptrs)
{
RTreeNNCursor?[] wrapped = new RTreeNNCursor?[ptrs.Length];
for (int i = 0; i < ptrs.Length; i++)
{
wrapped[i] = WrapRTreeNNCursor(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 @@ -353,6 +377,30 @@ public static class MEOSFactory
return wrapped;
}

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

return new SPNNCursor(ptr);
}

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

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)
Expand Down
24 changes: 24 additions & 0 deletions MEOS.NET/Types/RTreeNNCursor.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#nullable enable

using System.Runtime.InteropServices;

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

namespace MEOS.NET.Types
{
/// <summary>A walk over an R-tree's entries in order of distance from a query. MEOS registers it in no enum, so it names no temptype.</summary>
[System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")]
public class RTreeNNCursor : Value
{
internal RTreeNNCursor(IntPtr ptr) : base(ptr) { }

public void Close()
=> Meos.RtreeNnCursorClose(this.Ptr);

public static RTreeNNCursor? Open(RTree rtree, IntPtr query)
=> MEOSFactory.WrapRTreeNNCursor(Meos.RtreeNnCursorOpen(rtree.Ptr, query));

}
}
24 changes: 24 additions & 0 deletions MEOS.NET/Types/SPNNCursor.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#nullable enable

using System.Runtime.InteropServices;

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

namespace MEOS.NET.Types
{
/// <summary>The SP-tree's nearest-neighbour walk, the R-tree cursor's sibling. MEOS registers it in no enum, so it names no temptype.</summary>
[System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")]
public class SPNNCursor : Value
{
internal SPNNCursor(IntPtr ptr) : base(ptr) { }

public void Close()
=> Meos.SptreeNnCursorClose(this.Ptr);

public static SPNNCursor? Open(SPTree sptree, IntPtr query)
=> MEOSFactory.WrapSPNNCursor(Meos.SptreeNnCursorOpen(sptree.Ptr, query));

}
}
3 changes: 3 additions & 0 deletions MEOS.NET/Types/TBigint.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public long StartValue()
}
}

public long[] Values()
=> Meos.TbigintValues(this.Ptr);

public static Temporal? FromBaseTemp(long i, Temporal temp)
=> MEOSFactory.WrapTemporal(Meos.TbigintFromBaseTemp(i, temp.Ptr));

Expand Down
Loading