diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9219a11..f4bc093 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: run: python3 tools/objectgen.py "${{ steps.provision.outputs.catalog-path }}" --report - name: Report binding drift - run: git --no-pager diff --stat -- MEOS.NET/Functions MEOS.NET/Types/Generated || true + run: git --no-pager diff --stat -- MEOS.NET/Functions MEOS.NET/Types || true - name: Build solution run: dotnet build MEOS.NET.sln -c Release diff --git a/ExampleApp/Program.cs b/ExampleApp/Program.cs index dad7469..119daaf 100644 --- a/ExampleApp/Program.cs +++ b/ExampleApp/Program.cs @@ -1,63 +1,48 @@ -using MEOS.NET.Exceptions; -using MEOS.NET.Lifecycle; -using MEOS.NET.Types.Collections; -using MEOS.NET.Types.Collections.Float; -using MEOS.NET.Types.Temporal.Number.Float; - -var timezone = "UTC"; -MEOSLifecycle.Initialize(timezone); - -try -{ - Console.WriteLine("Creating temporal float instant with string : \"25.0@2024-12-06\""); - var tfi = TemporalFloatInstant.FromString("25.0@2024-12-06"); - Console.WriteLine($"Temporal Float Instant To String : {tfi}"); - Console.WriteLine($"Temporal Float Instant Timestamp : {tfi.Timestamp().ToLongDateString()}"); - Console.WriteLine($"Temporal Float Instant HexWKB : {tfi.BoundingBox().ToHexWKB()}"); - Console.WriteLine($"Temporal Float Instant Max Time: {tfi.BoundingBox().MaxT()}"); - Console.WriteLine($"Temporal Float Instant always 25.0 ? : {tfi.IsAlwaysEqualTo(25)}\n\n"); - - - Console.WriteLine("Creating temporal float instant from current date (UTC), with value 26"); - var tfi2 = TemporalFloatInstant.FromTimestamp(DateTime.UtcNow, 26); - Console.WriteLine($"Temporal Float Instant To String : {tfi2}"); - Console.WriteLine($"Temporal Float Instant Timestamp : {tfi2.Timestamp().ToLongDateString()}"); - Console.WriteLine($"Temporal Float Instant HexWKB : {tfi2.BoundingBox().ToHexWKB()}"); - Console.WriteLine($"Temporal Float Instant Max Time: {tfi2.BoundingBox().MaxT()}"); - Console.WriteLine($"Temporal Float Instant always less than 30.0 ? : {tfi2.IsAlwaysLessThanOrEqualTo(30)}"); - Console.WriteLine("Adding 34 to value of instant..."); - var tfi3 = tfi2.Add(34); - Console.WriteLine($"Temporal Float Instant (after addition) To String : {tfi3}"); - Console.WriteLine($"Temporal Float Instant (after addition) always less than 30.0 ? : {tfi3.IsAlwaysLessThanOrEqualTo(30)}\n\n"); // Should be false since we used "Add" - - Console.WriteLine("Creating float spanset with string \"{[8, 10], [11, 12]}\""); - var spanSet = FloatSpanSet.FromString("{[8, 10], [11, 12]}"); - Console.WriteLine("Dividing into spans..."); - var spans = spanSet.GetSpans(); - Console.WriteLine($"There are {spans.Count()} spans."); - var bytes = spanSet.ToBytes(); - Console.WriteLine($"Bytes of the spanset : "); - foreach (var b in bytes) - { - Console.Write(b + ", "); - } - Console.WriteLine("\n\n"); - - Console.WriteLine("Creating a new float spanset2 from the bytes of the preceding one"); - var spanSetRecreated = SpanSet.FromBytes(bytes); - Console.WriteLine($"Are the two spansets equal ? : {spanSetRecreated == spanSet}"); - Console.WriteLine("Dividing spanset2 into spans again..."); - var spans2 = spanSetRecreated.GetSpans(); - Console.WriteLine($"There are {spans2.Count()} spans in spanset2 !\n\n"); - - Console.WriteLine("Trying creation of temporal float instant with erroneous string : \"e25.0@2024-12-06\""); - TemporalFloatInstant.FromString("e25.0@2024-12-06"); -} -catch (MEOSException e) -{ - Console.WriteLine($"An error occurred in MEOS : {e.Code} - {e.Message}"); -} -finally -{ - MEOSLifecycle.Terminate(); -} \ No newline at end of file +using MEOS.NET.Exceptions; +using MEOS.NET.Functions; +using MEOS.NET.Lifecycle; +using MEOS.NET.Types; + +MEOSLifecycle.Initialize("UTC"); + +try +{ + Console.WriteLine("Reading a temporal float instant from \"25.0@2024-12-06\""); + Temporal tfi = TFloat.In("25.0@2024-12-06")!; + Console.WriteLine($" class : {tfi.GetType().Name}"); + Console.WriteLine($" text : {Meos.TfloatOut(tfi.Ptr, 15)}"); + Console.WriteLine($" start timestamp : {tfi.StartTimestamptz():u}"); + Console.WriteLine($" MF-JSON : {tfi.AsMFJSON(false, 0, 6, string.Empty)}"); + Console.WriteLine($" always 25.0? : {Meos.AlwaysEqTfloatFloat(tfi.Ptr, 25.0) == 1}\n"); + + Console.WriteLine("Making one from a value and a moment"); + Temporal made = TFloatInst.Make(26.0, DateTime.UtcNow)!; + Console.WriteLine($" text : {Meos.TfloatOut(made.Ptr, 15)}"); + Console.WriteLine(" adding 34 to its value"); + Temporal sum = MEOSFactory.WrapTemporal(Meos.AddTfloatFloat(made.Ptr, 34.0))!; + Console.WriteLine($" text : {Meos.TfloatOut(sum.Ptr, 15)}"); + Console.WriteLine($" always <= 30.0? : {Meos.AlwaysLeTfloatFloat(sum.Ptr, 30.0) == 1}\n"); + + Console.WriteLine("Reading a float span set from \"{[8, 10], [11, 12]}\""); + SpanSet spanset = FloatSpanSet.In("{[8, 10], [11, 12]}")!; + Console.WriteLine($" class : {spanset.GetType().Name}"); + Console.WriteLine($" spans : {spanset.NumSpans()}"); + foreach (Span? span in spanset.Spanarr()) + { + Console.WriteLine($" {((FloatSpan)span!).Out(15)}"); + } + + Console.WriteLine($" contains 9.0? : {Meos.ContainsSpansetFloat(spanset.Ptr, 9.0)}"); + Console.WriteLine($" width : {((FloatSpanSet)spanset).Width(false)}\n"); + + Console.WriteLine("Reading a temporal float instant from \"e25.0@2024-12-06\""); + TFloat.In("e25.0@2024-12-06"); +} +catch (MEOSException e) +{ + Console.WriteLine($" MEOS reports {e.Code}: {e.Message}"); +} +finally +{ + MEOSLifecycle.Terminate(); +} diff --git a/MEOS.NET.Tests/BorrowedStringTests.cs b/MEOS.NET.Tests/BorrowedStringTests.cs index edc77ee..904a48c 100644 --- a/MEOS.NET.Tests/BorrowedStringTests.cs +++ b/MEOS.NET.Tests/BorrowedStringTests.cs @@ -1,5 +1,4 @@ -using MEOS.NET.Enums; -using MEOS.NET.Types.Temporal.Number.Float; +using MEOS.NET.Types; namespace MEOS.NET.Tests { @@ -14,26 +13,34 @@ public class BorrowedStringTests : MeosTest [TestMethod] public void InterpolationOfALinearSequenceIsRead() { - TemporalFloat temp = TemporalFloat.FromString("[25.0@2024-12-06, 27.0@2024-12-07]"); + Temporal temp = TFloat.In("[25.0@2024-12-06, 27.0@2024-12-07]")!; - Assert.AreEqual(InterpolationType.Linear, temp.Interpolation()); + Assert.AreEqual("Linear", temp.Interp()); } [TestMethod] public void InterpolationOfADiscreteSequenceIsRead() { - TemporalFloat temp = TemporalFloat.FromString("{25.0@2024-12-06, 27.0@2024-12-07}"); + Temporal temp = TFloat.In("{25.0@2024-12-06, 27.0@2024-12-07}")!; - Assert.AreEqual(InterpolationType.Discrete, temp.Interpolation()); + Assert.AreEqual("Discrete", temp.Interp()); } [TestMethod] public void TheSameBorrowedNameIsReadableTwice() { - TemporalFloat first = TemporalFloat.FromString("[25.0@2024-12-06, 27.0@2024-12-07]"); - TemporalFloat second = TemporalFloat.FromString("[1.0@2024-12-06, 2.0@2024-12-07]"); + Temporal first = TFloat.In("[25.0@2024-12-06, 27.0@2024-12-07]")!; + Temporal second = TFloat.In("[1.0@2024-12-06, 2.0@2024-12-07]")!; - Assert.AreEqual(first.Interpolation(), second.Interpolation()); + Assert.AreEqual(first.Interp(), second.Interp()); + } + + [TestMethod] + public void SubtypeOfASequenceIsRead() + { + Temporal temp = TFloat.In("[25.0@2024-12-06, 27.0@2024-12-07]")!; + + Assert.AreEqual("Sequence", temp.Subtype()); } } } diff --git a/MEOS.NET.Tests/GeneratedObjectLayerTests.cs b/MEOS.NET.Tests/GeneratedObjectLayerTests.cs index 3296648..1577ab8 100644 --- a/MEOS.NET.Tests/GeneratedObjectLayerTests.cs +++ b/MEOS.NET.Tests/GeneratedObjectLayerTests.cs @@ -1,5 +1,5 @@ using MEOS.NET.Exceptions; -using MEOS.NET.Types.Generated; +using MEOS.NET.Types; namespace MEOS.NET.Tests { diff --git a/MEOS.NET/Functions/Meos.Native.g.cs b/MEOS.NET/Functions/Meos.Native.g.cs index fe364ae..b40fd7e 100644 --- a/MEOS.NET/Functions/Meos.Native.g.cs +++ b/MEOS.NET/Functions/Meos.Native.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.CodeDom.Compiler; using System.Runtime.InteropServices; diff --git a/MEOS.NET/Functions/Meos.hashtable.g.cs b/MEOS.NET/Functions/Meos.hashtable.g.cs index e9ec0a6..0046658 100644 --- a/MEOS.NET/Functions/Meos.hashtable.g.cs +++ b/MEOS.NET/Functions/Meos.hashtable.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos.g.cs b/MEOS.NET/Functions/Meos.meos.g.cs index c4d5b27..3f8d40f 100644 --- a/MEOS.NET/Functions/Meos.meos.g.cs +++ b/MEOS.NET/Functions/Meos.meos.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_catalog.g.cs b/MEOS.NET/Functions/Meos.meos_catalog.g.cs index bc148aa..fe6baf3 100644 --- a/MEOS.NET/Functions/Meos.meos_catalog.g.cs +++ b/MEOS.NET/Functions/Meos.meos_catalog.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs b/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs index 78d3cc5..a2fe1af 100644 --- a/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs +++ b/MEOS.NET/Functions/Meos.meos_cbuffer.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_cellindex.g.cs b/MEOS.NET/Functions/Meos.meos_cellindex.g.cs index a10a5c5..7baeef9 100644 --- a/MEOS.NET/Functions/Meos.meos_cellindex.g.cs +++ b/MEOS.NET/Functions/Meos.meos_cellindex.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_geo.g.cs b/MEOS.NET/Functions/Meos.meos_geo.g.cs index 0f6d201..3a1f76f 100644 --- a/MEOS.NET/Functions/Meos.meos_geo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_geo.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_h3.g.cs b/MEOS.NET/Functions/Meos.meos_h3.g.cs index 771ba81..edd4f5e 100644 --- a/MEOS.NET/Functions/Meos.meos_h3.g.cs +++ b/MEOS.NET/Functions/Meos.meos_h3.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_internal.g.cs b/MEOS.NET/Functions/Meos.meos_internal.g.cs index 2445801..8e8612b 100644 --- a/MEOS.NET/Functions/Meos.meos_internal.g.cs +++ b/MEOS.NET/Functions/Meos.meos_internal.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs b/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs index 098751c..5e2f247 100644 --- a/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_internal_geo.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_json.g.cs b/MEOS.NET/Functions/Meos.meos_json.g.cs index 96237ab..5385087 100644 --- a/MEOS.NET/Functions/Meos.meos_json.g.cs +++ b/MEOS.NET/Functions/Meos.meos_json.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_npoint.g.cs b/MEOS.NET/Functions/Meos.meos_npoint.g.cs index 6773d3d..a7eccdb 100644 --- a/MEOS.NET/Functions/Meos.meos_npoint.g.cs +++ b/MEOS.NET/Functions/Meos.meos_npoint.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs b/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs index 31019d2..351ea04 100644 --- a/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs +++ b/MEOS.NET/Functions/Meos.meos_pointcloud.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_pose.g.cs b/MEOS.NET/Functions/Meos.meos_pose.g.cs index 83e012f..6a21533 100644 --- a/MEOS.NET/Functions/Meos.meos_pose.g.cs +++ b/MEOS.NET/Functions/Meos.meos_pose.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_quadbin.g.cs b/MEOS.NET/Functions/Meos.meos_quadbin.g.cs index 5f3d81e..1d979a5 100644 --- a/MEOS.NET/Functions/Meos.meos_quadbin.g.cs +++ b/MEOS.NET/Functions/Meos.meos_quadbin.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_raster.g.cs b/MEOS.NET/Functions/Meos.meos_raster.g.cs index d046b5d..47cc5f7 100644 --- a/MEOS.NET/Functions/Meos.meos_raster.g.cs +++ b/MEOS.NET/Functions/Meos.meos_raster.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_rgeo.g.cs b/MEOS.NET/Functions/Meos.meos_rgeo.g.cs index 27bed41..ad2c484 100644 --- a/MEOS.NET/Functions/Meos.meos_rgeo.g.cs +++ b/MEOS.NET/Functions/Meos.meos_rgeo.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.meos_s2cell.g.cs b/MEOS.NET/Functions/Meos.meos_s2cell.g.cs index c972d3f..42bd0a1 100644 --- a/MEOS.NET/Functions/Meos.meos_s2cell.g.cs +++ b/MEOS.NET/Functions/Meos.meos_s2cell.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pc_api.g.cs b/MEOS.NET/Functions/Meos.pc_api.g.cs index 12f557a..2ed3dd7 100644 --- a/MEOS.NET/Functions/Meos.pc_api.g.cs +++ b/MEOS.NET/Functions/Meos.pc_api.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_bool.g.cs b/MEOS.NET/Functions/Meos.pg_bool.g.cs index 1c84d8e..cc8bb5a 100644 --- a/MEOS.NET/Functions/Meos.pg_bool.g.cs +++ b/MEOS.NET/Functions/Meos.pg_bool.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_date.g.cs b/MEOS.NET/Functions/Meos.pg_date.g.cs index 98355e3..eddf146 100644 --- a/MEOS.NET/Functions/Meos.pg_date.g.cs +++ b/MEOS.NET/Functions/Meos.pg_date.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_float.g.cs b/MEOS.NET/Functions/Meos.pg_float.g.cs index 248435e..02a4f88 100644 --- a/MEOS.NET/Functions/Meos.pg_float.g.cs +++ b/MEOS.NET/Functions/Meos.pg_float.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_int.g.cs b/MEOS.NET/Functions/Meos.pg_int.g.cs index e03b097..3ad943d 100644 --- a/MEOS.NET/Functions/Meos.pg_int.g.cs +++ b/MEOS.NET/Functions/Meos.pg_int.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_interval.g.cs b/MEOS.NET/Functions/Meos.pg_interval.g.cs index c7fe2ed..8d6a1a8 100644 --- a/MEOS.NET/Functions/Meos.pg_interval.g.cs +++ b/MEOS.NET/Functions/Meos.pg_interval.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_numeric.g.cs b/MEOS.NET/Functions/Meos.pg_numeric.g.cs index f00e3da..62e037e 100644 --- a/MEOS.NET/Functions/Meos.pg_numeric.g.cs +++ b/MEOS.NET/Functions/Meos.pg_numeric.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_text.g.cs b/MEOS.NET/Functions/Meos.pg_text.g.cs index d955e6c..4c5ec7e 100644 --- a/MEOS.NET/Functions/Meos.pg_text.g.cs +++ b/MEOS.NET/Functions/Meos.pg_text.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_time.g.cs b/MEOS.NET/Functions/Meos.pg_time.g.cs index 71fb4bd..06a32e8 100644 --- a/MEOS.NET/Functions/Meos.pg_time.g.cs +++ b/MEOS.NET/Functions/Meos.pg_time.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pg_timestamp.g.cs b/MEOS.NET/Functions/Meos.pg_timestamp.g.cs index dfc914e..b5f18bc 100644 --- a/MEOS.NET/Functions/Meos.pg_timestamp.g.cs +++ b/MEOS.NET/Functions/Meos.pg_timestamp.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pgsql_compat.g.cs b/MEOS.NET/Functions/Meos.pgsql_compat.g.cs index 1df0e25..770134e 100644 --- a/MEOS.NET/Functions/Meos.pgsql_compat.g.cs +++ b/MEOS.NET/Functions/Meos.pgsql_compat.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Functions/Meos.pgtypes.g.cs b/MEOS.NET/Functions/Meos.pgtypes.g.cs index 9187a86..6a77cde 100644 --- a/MEOS.NET/Functions/Meos.pgtypes.g.cs +++ b/MEOS.NET/Functions/Meos.pgtypes.g.cs @@ -1,3 +1,5 @@ +#nullable enable + using System.Runtime.InteropServices; namespace MEOS.NET.Functions diff --git a/MEOS.NET/Helpers/AllocHelper.cs b/MEOS.NET/Helpers/AllocHelper.cs deleted file mode 100644 index 7d02c16..0000000 --- a/MEOS.NET/Helpers/AllocHelper.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System.Runtime.InteropServices; - -namespace MEOS.NET.Helpers -{ - internal static class AllocHelper - { - /// - /// Allocates a pointer of given size, executes a given action, and frees the memory after. - /// - /// The size of the pointer, in bytes - /// The callback to execute between the allocation and the freeing. - internal static void AllocatePointer(int size, Action callback) - { - var pointer = Marshal.AllocHGlobal(size); - - try - { - callback(pointer); - } - finally - { - Marshal.FreeHGlobal(pointer); - } - - } - - internal static TReturnType AllocatePointer(int size, Func callback) - { - var pointer = Marshal.AllocHGlobal(size); - - try - { - var result = callback(pointer); - return result; - } - finally - { - Marshal.FreeHGlobal(pointer); - } - } - - internal static TReturnType AllocateArrayPointer(IEnumerable enumerable, Func callback) - { - GCHandle pinnedArray = default; - - try - { - pinnedArray = GCHandle.Alloc(enumerable, GCHandleType.Pinned); - IntPtr pointer = pinnedArray.AddrOfPinnedObject(); - - return callback(pointer); - } - finally - { - if (pinnedArray.IsAllocated) - { - pinnedArray.Free(); - } - } - } - - internal static T ToStructure(this IntPtr pointer) where T : struct - => Marshal.PtrToStructure(pointer); - - internal static T[] ToArrayOfType(this IntPtr pointer, int arraySize) where T : struct - { - T[] arr = new T[arraySize]; - - for (int i = 0; i < arraySize; i++) - { - IntPtr currentPtr = IntPtr.Add(pointer, Marshal.SizeOf() * i); - arr[i] = currentPtr.ToStructure(); - } - - return arr; - } - } -} diff --git a/MEOS.NET/Helpers/DateHelper.cs b/MEOS.NET/Helpers/DateHelper.cs deleted file mode 100644 index 51a43e9..0000000 --- a/MEOS.NET/Helpers/DateHelper.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MEOS.NET.Functions; -using MEOS.NET.Structures; - -namespace MEOS.NET.Helpers -{ - internal static class DateHelper - { - internal static DateTime ToDateTime(this TimestampTz pgTimestamp) - { - var str = Meos.TimestamptzOut(pgTimestamp.Time); - return DateTime.Parse(str); - } - - internal static long ToPgTimestamp(this DateTime dateTime) - { - var res = Meos.TimestamptzIn(dateTime.ToString("s"), -1); // ToString("s") -> ISO 8601 formatted date string - return res; - } - } -} diff --git a/MEOS.NET/Helpers/EnumConverter.cs b/MEOS.NET/Helpers/EnumConverter.cs deleted file mode 100644 index a4bfb0d..0000000 --- a/MEOS.NET/Helpers/EnumConverter.cs +++ /dev/null @@ -1,31 +0,0 @@ -using MEOS.NET.Enums; - -namespace MEOS.NET.Helpers -{ - public static class EnumConverter - { - public static InterpolationType InterpolationTypeFromString(string str) - { - var lowered = str.ToLowerInvariant(); - - switch (lowered) - { - case "none": - return InterpolationType.None; - - case "discrete": - return InterpolationType.Discrete; - - case "stepwise": - return InterpolationType.Stepwise; - - case "linear": - return InterpolationType.Linear; - - default: - throw new ArgumentException("Given string does not represent an existing interpolation type"); - } - } - } -} - diff --git a/MEOS.NET/MEOS.NET.csproj b/MEOS.NET/MEOS.NET.csproj index 47c64ee..bd44ee5 100644 --- a/MEOS.NET/MEOS.NET.csproj +++ b/MEOS.NET/MEOS.NET.csproj @@ -1,51 +1,10 @@ - - - - net8.0 - enable - enable - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + net8.0 + enable + enable + true + + + diff --git a/MEOS.NET/Structures/TimestampTz.cs b/MEOS.NET/Structures/TimestampTz.cs deleted file mode 100644 index ac71ea6..0000000 --- a/MEOS.NET/Structures/TimestampTz.cs +++ /dev/null @@ -1,10 +0,0 @@ - using System.Runtime.InteropServices; - -namespace MEOS.NET.Structures -{ - [StructLayout(LayoutKind.Sequential)] - public struct TimestampTz - { - public long Time; - } -} diff --git a/MEOS.NET/Types/Generated/BigIntSet.g.cs b/MEOS.NET/Types/BigIntSet.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/BigIntSet.g.cs rename to MEOS.NET/Types/BigIntSet.g.cs index bea5bf9..8c856d2 100644 --- a/MEOS.NET/Types/Generated/BigIntSet.g.cs +++ b/MEOS.NET/Types/BigIntSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The BigIntSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/BigIntSpan.g.cs b/MEOS.NET/Types/BigIntSpan.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/BigIntSpan.g.cs rename to MEOS.NET/Types/BigIntSpan.g.cs index 3e44ff3..008919a 100644 --- a/MEOS.NET/Types/Generated/BigIntSpan.g.cs +++ b/MEOS.NET/Types/BigIntSpan.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The BigIntSpan class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/BigIntSpanSet.g.cs b/MEOS.NET/Types/BigIntSpanSet.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/BigIntSpanSet.g.cs rename to MEOS.NET/Types/BigIntSpanSet.g.cs index c2ef18b..314653a 100644 --- a/MEOS.NET/Types/Generated/BigIntSpanSet.g.cs +++ b/MEOS.NET/Types/BigIntSpanSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The BigIntSpanSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/Box.g.cs b/MEOS.NET/Types/Box.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/Box.g.cs rename to MEOS.NET/Types/Box.g.cs index c0a4b17..cd06e96 100644 --- a/MEOS.NET/Types/Generated/Box.g.cs +++ b/MEOS.NET/Types/Box.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Bounding-box family. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Boxes/SpatioTemporalBox.cs b/MEOS.NET/Types/Boxes/SpatioTemporalBox.cs deleted file mode 100644 index 871dbdb..0000000 --- a/MEOS.NET/Types/Boxes/SpatioTemporalBox.cs +++ /dev/null @@ -1,11 +0,0 @@ -using MEOS.NET.Types.General; - -namespace MEOS.NET.Types.Boxes -{ - public class SpatioTemporalBox : MEOSObject - { - internal SpatioTemporalBox(IntPtr ptr) : base(ptr) - { } - } -} - diff --git a/MEOS.NET/Types/Boxes/TemporalBox.cs b/MEOS.NET/Types/Boxes/TemporalBox.cs deleted file mode 100644 index 7b0ea21..0000000 --- a/MEOS.NET/Types/Boxes/TemporalBox.cs +++ /dev/null @@ -1,293 +0,0 @@ -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Structures; -using MEOS.NET.Types.Collections; -using MEOS.NET.Types.Collections.Float; -using MEOS.NET.Types.Collections.Integer; -using MEOS.NET.Types.Collections.Time.Timestamp; -using MEOS.NET.Types.General; -using MEOS.NET.Types.Temporal.Number; - -namespace MEOS.NET.Types.Boxes -{ - public class TemporalBox : MEOSObject - { - internal TemporalBox(IntPtr ptr) : base(ptr) - { } - - public static TemporalBox FromString(string input) - { - var res = Meos.TboxIn(input); - return new TemporalBox(res); - } - - public static TemporalBox FromBytes(byte[] bytes) - { - var tBoxPtr = AllocHelper.AllocateArrayPointer(bytes, (bytesPtr) => - { - return Meos.TboxFromWkb(bytesPtr, (ulong)bytes.Length); - }); - - return new TemporalBox(tBoxPtr); - } - - public static TemporalBox FromHexWKB(string str) - { - var res = Meos.TboxFromHexwkb(str); - return new TemporalBox(res); - } - - public static TemporalBox FromBounds(int xMin, int xMax, DateTime tMin, DateTime tMax, - bool xMinInclusive = true, bool tMinInclusive = true, bool xMaxInclusive = false, bool tMaxInclusive = false) - { - var span = IntegerSpan.FromBounds(xMin, xMax, xMinInclusive, xMaxInclusive); - var tsTzSpan = TimestampTzSpan.FromBounds(tMin, tMax, tMinInclusive, tMaxInclusive); - - var res = Meos.TboxMake(span._ptr, tsTzSpan._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromValue(int value) - { - var res = Meos.IntToTbox(value); - return new TemporalBox(res); - } - - public static TemporalBox FromValue(double value) - { - var res = Meos.FloatToTbox(value); - return new TemporalBox(res); - } - - public static TemporalBox FromTime(DateTime timestamp) - { - var res = Meos.TimestamptzToTbox(timestamp.ToPgTimestamp()); - return new TemporalBox(res); - } - - public static TemporalBox FromTime(TimestampTzSet set) - { - var res = Meos.SetToTbox(set._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromTime(TimestampTzSpan span) - { - var res = Meos.SpanToTbox(span._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromTime(TimestampTzSpanSet spanSet) - { - var res = Meos.SpansetToTbox(spanSet._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(int value, DateTime time) - { - var res = Meos.IntTimestamptzToTbox(value, time.ToPgTimestamp()); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(double value, DateTime time) - { - var res = Meos.FloatTimestamptzToTbox(value, time.ToPgTimestamp()); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(IntegerSpan value, DateTime time) - { - var res = Meos.NumspanTimestamptzToTbox(value._ptr, time.ToPgTimestamp()); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(FloatSpan value, DateTime time) - { - var res = Meos.NumspanTimestamptzToTbox(value._ptr, time.ToPgTimestamp()); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(int value, TimestampTzSpan time) - { - var res = Meos.IntTstzspanToTbox(value, time._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(double value, TimestampTzSpan time) - { - var res = Meos.FloatTstzspanToTbox(value, time._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(IntegerSpan value, TimestampTzSpan time) - { - var res = Meos.NumspanTstzspanToTbox(value._ptr, time._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromValueTime(FloatSpan value, TimestampTzSpan time) - { - var res = Meos.NumspanTstzspanToTbox(value._ptr, time._ptr); - return new TemporalBox(res); - } - - public static TemporalBox FromTemporalNumber(TemporalNumber temporal) - { - var res = Meos.TnumberToTbox(temporal._ptr); - return new TemporalBox(res); - } - - public TemporalBox Copy() - { - var res = Meos.TboxCopy(this._ptr); - return new TemporalBox(res); - } - - public string Format(int maxDecimals = 15) - => Meos.TboxOut(this._ptr, maxdd: maxDecimals); - - public override string ToString() - => this.Format(); - - public byte[] ToBytes() - { - int arrSize = 0; - var arr = AllocHelper.AllocatePointer(sizeof(int), (countPtr) => - { - var res = Meos.TboxAsWkb(this._ptr, variant: 4, countPtr); - arrSize = countPtr.ToStructure(); - - return res; - }); - - return arr.ToArrayOfType(arrSize); - } - - public string ToHexWKB() - { - return AllocHelper.AllocatePointer(sizeof(int), (sizePtr) => - { - return Meos.TboxAsHexwkb(this._ptr, 0, sizePtr); - }); - } - - public FloatSpan ToFloatSpan() - { - var res = Meos.TboxToFloatspan(this._ptr); - return new FloatSpan(res); - } - - public TimestampTzSpan ToTimestampTzSpan() - { - var res = Meos.TboxToTstzspan(this._ptr); - return new TimestampTzSpan(res); - } - - public bool HasX() - => (Meos.TboxHasx(this._ptr)); - - public bool HasT() - => (Meos.TboxHast(this._ptr)); - - public bool IsMinXInclusive() - { - return AllocHelper.AllocatePointer(sizeof(bool), (resultPtr) => - { - var successful = (Meos.TboxXminInc(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : false; - }); - } - - public bool IsMaxXInclusive() - { - return AllocHelper.AllocatePointer(sizeof(bool), (resultPtr) => - { - var successful = (Meos.TboxXmaxInc(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : false; - }); - } - - public bool IsMinTInclusive() - { - return AllocHelper.AllocatePointer(sizeof(bool), (resultPtr) => - { - var successful = (Meos.TboxTminInc(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : false; - }); - } - - public bool IsMaxTInclusive() - { - return AllocHelper.AllocatePointer(sizeof(bool), (resultPtr) => - { - var successful = (Meos.TboxTmaxInc(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : false; - }); - } - - public double MinX() - { - return AllocHelper.AllocatePointer(sizeof(double), (resultPtr) => - { - var successful = (Meos.TboxXmin(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : throw new InvalidOperationException("No X Min available"); - }); - } - - public double MaxX() - { - return AllocHelper.AllocatePointer(sizeof(double), (resultPtr) => - { - var successful = (Meos.TboxXmax(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : throw new InvalidOperationException("No X Max available"); - }); - } - - public DateTime MinT() - { - var timestamp = AllocHelper.AllocatePointer(sizeof(long), (resultPtr) => - { - var successful = (Meos.TboxTmin(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : throw new InvalidOperationException("No T Min available"); - }); - - return timestamp.ToDateTime(); - } - - public DateTime MaxT() - { - var timestamp = AllocHelper.AllocatePointer(sizeof(long), (resultPtr) => - { - var successful = (Meos.TboxTmax(this._ptr, resultPtr)); - return successful ? resultPtr.ToStructure() : throw new InvalidOperationException("No T Max available"); - }); - - return timestamp.ToDateTime(); - } - - public bool IsLeftOf(TemporalBox other) - => (Meos.LeftTboxTbox(this._ptr, other._ptr)); - - public bool IsLeftOf(TemporalNumber other) - => this.IsLeftOf(other.BoundingBox()); - - public bool IsOverOrLeftOf(TemporalBox other) - => (Meos.OverleftTboxTbox(this._ptr, other._ptr)); - - public bool IsOverOrLeftOf(TemporalNumber other) - => this.IsOverOrLeftOf(other.BoundingBox()); - - public bool IsRightOf(TemporalBox other) - => (Meos.RightTboxTbox(this._ptr, other._ptr)); - - public bool IsRightOf(TemporalNumber other) - => this.IsRightOf(other.BoundingBox()); - - public bool IsOverOrRightOf(TemporalBox other) - => (Meos.OverrightTboxTbox(this._ptr, other._ptr)); - - public bool IsOverOrRightOf(TemporalNumber other) - => this.IsOverOrRightOf(other.BoundingBox()); - } -} - diff --git a/MEOS.NET/Types/Generated/CbufferSet.g.cs b/MEOS.NET/Types/CbufferSet.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/CbufferSet.g.cs rename to MEOS.NET/Types/CbufferSet.g.cs index 5828df0..4ab70b1 100644 --- a/MEOS.NET/Types/Generated/CbufferSet.g.cs +++ b/MEOS.NET/Types/CbufferSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The CbufferSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/Collection.g.cs b/MEOS.NET/Types/Collection.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/Collection.g.cs rename to MEOS.NET/Types/Collection.g.cs index 1fc168a..6b65e5b 100644 --- a/MEOS.NET/Types/Generated/Collection.g.cs +++ b/MEOS.NET/Types/Collection.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The Collection class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Collections/Float/FloatSet.cs b/MEOS.NET/Types/Collections/Float/FloatSet.cs deleted file mode 100644 index 4d1f1fe..0000000 --- a/MEOS.NET/Types/Collections/Float/FloatSet.cs +++ /dev/null @@ -1,166 +0,0 @@ -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Types.Collections.Integer; - -namespace MEOS.NET.Types.Collections.Float -{ - public sealed class FloatSet : Set - { - internal FloatSet(IntPtr ptr) : base(ptr) - { } - - internal static FloatSet FromValues(double[] values) - { - var res = AllocHelper.AllocateArrayPointer(values, - (valuesPtr) => Meos.FloatsetMake(valuesPtr, values.Length)); - return new FloatSet(res); - } - - public IntegerSet ToIntegerSet() - { - var res = Meos.FloatsetToIntset(this._ptr); - return new IntegerSet(res); - } - - public double StartElement() - => Meos.FloatsetStartValue(this._ptr); - - public double EndElement() - => Meos.FloatsetEndValue(this._ptr); - - public double ElementAt(int position) - { - var count = this.Count(); - - if (position < 0 || position >= count) - { - throw new ArgumentOutOfRangeException(nameof(position), $"Requested element must be between 0 and {count - 1}"); - } - - return AllocHelper.AllocatePointer(sizeof(double), (resultPtr) => - { - var successful = (Meos.FloatsetValueN(this._ptr, position, resultPtr)); - return successful ? resultPtr.ToStructure() : throw new InvalidOperationException($"Could not retrieve element at position {position}"); - }); - } - - public double this[int position] - { - get => this.ElementAt(position); - } - - public IEnumerable Values() - => Meos.FloatsetValues(this._ptr); - - public FloatSet Shift(double delta) - { - var res = Meos.FloatsetShiftScale(this._ptr, delta, 0.0, hasshift: true, haswidth: false); - return new FloatSet(res); - } - - public FloatSet Scale(double newWidth) - { - var res = Meos.FloatsetShiftScale(this._ptr, 0.0, newWidth, hasshift: false, haswidth: true); - return new FloatSet(res); - } - - public FloatSet ShiftScale(double delta, double newWidth) - { - var res = Meos.FloatsetShiftScale(this._ptr, delta, newWidth, hasshift: true, haswidth: true); - return new FloatSet(res); - } - - public bool Contains(double value) - => (Meos.ContainsSetFloat(this._ptr, value)); - - public bool IsLeftOf(double value) - => (Meos.LeftSetFloat(this._ptr, value)); - - public bool IsOverOrLeftOf(double value) - => (Meos.OverleftSetFloat(this._ptr, value)); - - public bool IsRightOf(double value) - => (Meos.RightSetFloat(this._ptr, value)); - - public bool IsOverOrRightOf(double value) - => (Meos.OverrightSetFloat(this._ptr, value)); - - public FloatSet? IntersectionWith(double value) - { - var res = Meos.IntersectionSetFloat(this._ptr, value); - - if (res == IntPtr.Zero) - { - return default; - } - - return new FloatSet(res); - } - - public FloatSet? IntersectionWith(FloatSet set) - { - var res = Meos.IntersectionSetSet(this._ptr, set._ptr); - - if (res == IntPtr.Zero) - { - return default; - } - - return new FloatSet(res); - } - - public FloatSet Minus(double value) - { - var res = Meos.MinusSetFloat(this._ptr, value); - return new FloatSet(res); - } - - public FloatSet Minus(FloatSet set) - { - var res = Meos.MinusSetSet(this._ptr, set._ptr); - return new FloatSet(res); - } - - public FloatSet SubtractFrom(FloatSet set) - { - var res = Meos.MinusSetSet(set._ptr, this._ptr); - return new FloatSet(res); - } - - public FloatSet UnionWith(double value) - { - var res = Meos.UnionSetFloat(this._ptr, value); - return new FloatSet(res); - } - - public FloatSet UnionWith(FloatSet set) - { - var res = Meos.UnionSetSet(this._ptr, set._ptr); - return new FloatSet(res); - } - - public double DistanceTo(int value) - => this.DistanceTo((double)value); - - public double DistanceTo(double value) - => Meos.DistanceSetFloat(this._ptr, value); - - public double DistanceTo(FloatSet set) - => Meos.DistanceSetSet(this._ptr, set._ptr); - - public double DistanceTo(FloatSpan span) - => this.ToSpanSet().DistanceTo(span); - - public double DistanceTo(FloatSpanSet spanSet) - => this.ToSpanSet().DistanceTo(spanSet); - - public string Format(int maxDecimals = 15) - => Meos.FloatsetOut(this._ptr, maxdd: maxDecimals); - - public override string ToString() - => this.Format(maxDecimals: 15); - - // TODO : Operators - } -} - diff --git a/MEOS.NET/Types/Collections/Float/FloatSpan.cs b/MEOS.NET/Types/Collections/Float/FloatSpan.cs deleted file mode 100644 index 465299e..0000000 --- a/MEOS.NET/Types/Collections/Float/FloatSpan.cs +++ /dev/null @@ -1,192 +0,0 @@ -using MEOS.NET.Functions; -using MEOS.NET.Types.Collections.Integer; - -namespace MEOS.NET.Types.Collections.Float -{ - public sealed class FloatSpan : Span - { - internal FloatSpan(IntPtr ptr) : base(ptr) - { } - - public static FloatSpan FromString(string input) - { - var res = Meos.FloatspanIn(input); - return new FloatSpan(res); - } - - public static FloatSpan FromBounds(double xMin, double xMax, bool minInclusive = true, bool maxInclusive = false) - { - var res = Meos.FloatspanMake(xMin, xMax, minInclusive, maxInclusive); - return new FloatSpan(res); - } - - public override string ToString() - => this.Format(maxDecimals: 15); - - public string Format(int maxDecimals) - => Meos.FloatspanOut(this._ptr, maxdd: maxDecimals); - - public override FloatSpanSet ToSpanSet() - => (FloatSpanSet)this.ToSpanSet(); - - public IntegerSpan ToIntegerSpan() - { - var res = Meos.FloatspanToIntspan(this._ptr); - return new IntegerSpan(res); - } - - public double LowerBound() - => Meos.FloatspanLower(this._ptr); - - public double UpperBound() - => Meos.FloatspanUpper(this._ptr); - - public FloatSpan Shift(double delta) - { - var res = Meos.FloatspanShiftScale(this._ptr, delta, 0.0, hasshift: true, haswidth: false); - return new FloatSpan(res); - } - - public FloatSpan Scale(double newWidth) - { - var res = Meos.FloatspanShiftScale(this._ptr, 0.0, newWidth, hasshift: false, haswidth: true); - return new FloatSpan(res); - } - - public FloatSpan ShiftScale(double delta, double newWidth) - { - var res = Meos.FloatspanShiftScale(this._ptr, delta, newWidth, hasshift: true, haswidth: true); - return new FloatSpan(res); - } - - public bool IsAdjacent(double number) - => (Meos.AdjacentSpanFloat(this._ptr, number)); - - public bool IsAdjacent(int number) - => this.IsAdjacent((double)number); - - public bool Contains(double number) - => (Meos.ContainsSpanFloat(this._ptr, number)); - - public bool Contains(int number) - => this.Contains((double)number); - - public bool IsLeftOf(double number) - => (Meos.LeftSpanFloat(this._ptr, number)); - - public bool IsLeftOf(int number) - => this.IsLeftOf((double)number); - - public bool IsOverOrLeftOf(double number) - => (Meos.OverleftSpanFloat(this._ptr, number)); - - public bool IsOverOrLeftOf(int number) - => this.IsOverOrLeftOf((double)number); - - public bool IsRightOf(double number) - => (Meos.RightSpanFloat(this._ptr, number)); - - public bool IsRightOf(int number) - => this.IsRightOf((double)number); - - public bool IsOverOrRightOf(double number) - => (Meos.OverrightSpanFloat(this._ptr, number)); - - public bool IsOverOrRightOf(int number) - => this.IsOverOrRightOf((double)number); - - public double DistanceTo(double number) - => Meos.DistanceSpanFloat(this._ptr, number); - - public double DistanceTo(int number) - => this.DistanceTo((double)number); - - public FloatSpan IntersectionWith(double number) - { - var res = Meos.IntersectionSpanFloat(this._ptr, number); - return new FloatSpan(res); - } - - public FloatSpan IntersectionWith(int number) - => this.IntersectionWith((double)number); - - public FloatSpan IntersectionWith(FloatSpan span) - { - var res = Meos.IntersectionSpanSpan(this._ptr, span._ptr); - return new FloatSpan(res); - } - - public FloatSpanSet IntersectionWith(FloatSpanSet spanSet) - { - var res = Meos.IntersectionSpansetSpan(spanSet._ptr, this._ptr); - return new FloatSpanSet(res); - } - - public FloatSpanSet Minus(double number) - { - var res = Meos.MinusSpanFloat(this._ptr, number); - return new FloatSpanSet(res); - } - - public FloatSpanSet Minus(int number) - => this.Minus((double)number); - - public FloatSpanSet Minus(FloatSpan span) - { - var res = Meos.MinusSpanSpan(this._ptr, span._ptr); - return new FloatSpanSet(res); - } - - public FloatSpanSet Minus(FloatSpanSet spanSet) - { - var res = Meos.MinusSpansetSpan(spanSet._ptr, this._ptr); - return new FloatSpanSet(res); - } - - public FloatSpanSet UnionWith(double number) - { - var res = Meos.UnionSpanFloat(this._ptr, number); - return new FloatSpanSet(res); - } - - public FloatSpanSet UnionWith(int number) - => this.UnionWith((double)number); - - public FloatSpanSet UnionWith(FloatSpan span) - { - var res = Meos.UnionSpanSpan(this._ptr, span._ptr); - return new FloatSpanSet(res); - } - - public FloatSpanSet UnionWith(FloatSpanSet spanSet) - { - var res = Meos.UnionSpansetSpan(spanSet._ptr, this._ptr); - return new FloatSpanSet(res); - } - - public static FloatSpanSet operator +(FloatSpan span, double number) - => span.UnionWith(number); - - public static FloatSpanSet operator +(FloatSpan span, int number) - => span.UnionWith(number); - - public static FloatSpanSet operator +(FloatSpan span1, FloatSpan span2) - => span1.UnionWith(span2); - - public static FloatSpanSet operator +(FloatSpan span, FloatSpanSet spanSet) - => span.UnionWith(spanSet); - - public static FloatSpanSet operator -(FloatSpan span, double number) - => span.Minus(number); - - public static FloatSpanSet operator -(FloatSpan span, int number) - => span.Minus(number); - - public static FloatSpanSet operator -(FloatSpan span1, FloatSpan span2) - => span1.Minus(span2); - - public static FloatSpanSet operator -(FloatSpan span, FloatSpanSet spanSet) - => span.Minus(spanSet); - } -} - diff --git a/MEOS.NET/Types/Collections/Float/FloatSpanSet.cs b/MEOS.NET/Types/Collections/Float/FloatSpanSet.cs deleted file mode 100644 index c6f4b92..0000000 --- a/MEOS.NET/Types/Collections/Float/FloatSpanSet.cs +++ /dev/null @@ -1,141 +0,0 @@ -using MEOS.NET.Functions; -using MEOS.NET.Types.Collections.Integer; - -namespace MEOS.NET.Types.Collections.Float -{ - public sealed class FloatSpanSet : SpanSet - { - internal FloatSpanSet(IntPtr ptr) : base(ptr) - { } - - public static FloatSpanSet FromString(string input) - { - var res = Meos.FloatspansetIn(input); - return new FloatSpanSet(res); - } - - public override FloatSpan ToSpan() - => (FloatSpan)base.ToSpan(); - - public IntegerSpanSet ToIntegerSpanSet() - { - var res = Meos.FloatspansetToIntspanset(this._ptr); - return new IntegerSpanSet(res); - } - - public string Format(int maxDecimals) - => Meos.FloatspansetOut(this._ptr, maxdd: maxDecimals); - - public override string ToString() - => this.Format(15); - - public override FloatSpan StartSpan() - => (FloatSpan)base.StartSpan(); - - public override FloatSpan EndSpan() - => (FloatSpan)base.EndSpan(); - - public override FloatSpan SpanAt(int position) - => (FloatSpan)base.SpanAt(position); - - public FloatSpanSet Shift(double delta) - { - var res = Meos.FloatspansetShiftScale(this._ptr, delta, 0.0, hasshift: true, haswidth: false); - return new FloatSpanSet(res); - } - - public FloatSpanSet Scale(double newWidth) - { - var res = Meos.FloatspansetShiftScale(this._ptr, 0.0, newWidth, hasshift: false, haswidth: true); - return new FloatSpanSet(res); - } - - public FloatSpanSet ShiftScale(double delta, double newWidth) - { - var res = Meos.FloatspansetShiftScale(this._ptr, delta, newWidth, hasshift: true, haswidth: true); - return new FloatSpanSet(res); - } - - public bool IsAdjacent(double number) - => (Meos.AdjacentSpansetFloat(this._ptr, number)); - - public bool IsAdjacent(int number) - => this.IsAdjacent((double)number); - - public bool Contains(double number) - => (Meos.ContainsSpansetFloat(this._ptr, number)); - - public bool Contains(int number) - => this.IsAdjacent((double)number); - - public bool IsLeftOf(double number) - => (Meos.LeftSpansetFloat(this._ptr, number)); - - public bool IsLeftOf(int number) - => this.IsLeftOf((double)number); - - public bool IsOverOrLeftOf(double number) - => (Meos.OverleftSpansetFloat(this._ptr, number)); - - public bool IsOverOrLeftOf(int number) - => this.IsOverOrLeftOf((double)number); - - public bool IsRightOf(double number) - => (Meos.RightSpansetFloat(this._ptr, number)); - - public bool IsRightOf(int number) - => this.IsRightOf((double)number); - - public bool IsOverOrRightOf(double number) - => (Meos.OverrightSpansetFloat(this._ptr, number)); - - public bool IsOverOrRightOf(int number) - => this.IsOverOrLeftOf((double)number); - - public double DistanceTo(double number) - => Meos.DistanceSpansetFloat(this._ptr, number); - - public double DistanceTo(int number) - => this.DistanceTo((double)number); - - public FloatSpanSet IntersectionWith(double number) - { - var res = Meos.IntersectionSpansetFloat(this._ptr, number); - return new FloatSpanSet(res); - } - - public FloatSpanSet IntersectionWith(int number) - => this.IntersectionWith((double)number); - - public FloatSpanSet Minus(double number) - { - var res = Meos.MinusSpansetFloat(this._ptr, number); - return new FloatSpanSet(res); - } - - public FloatSpanSet Minus(int number) - => this.Minus((double)number); - - public FloatSpanSet UnionWith(double number) - { - var res = Meos.UnionSpansetFloat(this._ptr, number); - return new FloatSpanSet(res); - } - - public FloatSpanSet UnionWith(int number) - => this.UnionWith((double)number); - - public static FloatSpanSet operator +(FloatSpanSet spanSet, double number) - => spanSet.UnionWith(number); - - public static FloatSpanSet operator +(FloatSpanSet spanSet, int number) - => spanSet.UnionWith((double)number); - - public static FloatSpanSet operator -(FloatSpanSet spanSet, double number) - => spanSet.Minus(number); - - public static FloatSpanSet operator -(FloatSpanSet spanSet, int number) - => spanSet.Minus((double)number); - } -} - diff --git a/MEOS.NET/Types/Collections/Geo/GeoSet.cs b/MEOS.NET/Types/Collections/Geo/GeoSet.cs deleted file mode 100644 index 8c97c91..0000000 --- a/MEOS.NET/Types/Collections/Geo/GeoSet.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace MEOS.NET.Types.Collections.Geo -{ - public sealed class GeoSet : Set - { - internal GeoSet(IntPtr ptr) : base(ptr) - { } - - // TODO : Implement methods accordingly to PyMEOS and FloatSet class - } -} - diff --git a/MEOS.NET/Types/Collections/ICollection.cs b/MEOS.NET/Types/Collections/ICollection.cs deleted file mode 100644 index 4ca5242..0000000 --- a/MEOS.NET/Types/Collections/ICollection.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace MEOS.NET.Types.Collections -{ - public interface ICollection - { - bool IsContainedIn(T collection); - bool Contains(T collection); - abstract bool Overlaps(T collection); - bool IsLeftOf(T collection); - bool IsOverOrLeftOf(T collection); - bool IsRightOf(T collection); - bool IsOverOrRightOf(T collection); - } -} - diff --git a/MEOS.NET/Types/Collections/Integer/IntegerSet.cs b/MEOS.NET/Types/Collections/Integer/IntegerSet.cs deleted file mode 100644 index ed08a42..0000000 --- a/MEOS.NET/Types/Collections/Integer/IntegerSet.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace MEOS.NET.Types.Collections.Integer -{ - public sealed class IntegerSet : Set - { - internal IntegerSet(IntPtr ptr) : base(ptr) - { } - - // TODO : Implement methods accordingly to PyMEOS and FloatSet class - } -} - diff --git a/MEOS.NET/Types/Collections/Integer/IntegerSpan.cs b/MEOS.NET/Types/Collections/Integer/IntegerSpan.cs deleted file mode 100644 index 5ffc6c6..0000000 --- a/MEOS.NET/Types/Collections/Integer/IntegerSpan.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MEOS.NET.Functions; - -namespace MEOS.NET.Types.Collections.Integer -{ - public sealed class IntegerSpan : Span - { - internal IntegerSpan(IntPtr ptr) : base(ptr) - { } - - public static IntegerSpan FromBounds(int xMin, int xMax, bool minInclusive = true, bool maxInclusive = false) - { - var res = Meos.IntspanMake(xMin, xMax, minInclusive, maxInclusive); - return new IntegerSpan(res); - } - - // TODO : Implement methods accordingly to PyMEOS and FloatSpan class - } -} - diff --git a/MEOS.NET/Types/Collections/Integer/IntegerSpanSet.cs b/MEOS.NET/Types/Collections/Integer/IntegerSpanSet.cs deleted file mode 100644 index b60f2ec..0000000 --- a/MEOS.NET/Types/Collections/Integer/IntegerSpanSet.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace MEOS.NET.Types.Collections.Integer -{ - public sealed class IntegerSpanSet : SpanSet - { - internal IntegerSpanSet(IntPtr ptr) : base(ptr) - { } - - // TODO : Implement methods accordingly to PyMEOS and FloatSpanSet class - } -} - diff --git a/MEOS.NET/Types/Collections/Set.cs b/MEOS.NET/Types/Collections/Set.cs deleted file mode 100644 index 7a6acae..0000000 --- a/MEOS.NET/Types/Collections/Set.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System.Runtime.InteropServices; -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Types.General; - -namespace MEOS.NET.Types.Collections -{ - public class Set : MEOSObject, ICollection - { - internal Set(IntPtr ptr) : base(ptr) - {} - - public static Set FromBytes(byte[] bytes) - { - var setPtr = AllocHelper.AllocateArrayPointer(bytes, (bytesPtr) => - { - return Meos.SetFromWkb(bytesPtr, (ulong)bytes.Length); - }); - - return new Set(setPtr); - } - - public static Set FromHexWKB(string hexWKB) - { - var res = Meos.SetFromHexwkb(hexWKB); - return new Set(res); - } - - public int Count() - => Meos.SetNumValues(this._ptr); - - public byte[] ToBytes() - { - int arrSize = 0; - var arr = AllocHelper.AllocatePointer(sizeof(int), (countPtr) => - { - var res = Meos.SetAsWkb(this._ptr, variant: 4, countPtr); - arrSize = countPtr.ToStructure(); - - return res; - }); - - return arr.ToArrayOfType(arrSize); - } - - public string ToHexWKB() - { - return AllocHelper.AllocatePointer(sizeof(int), (sizePtr) => - { - return Meos.SetAsHexwkb(this._ptr, 0, sizePtr); - }); - } - - public Span ToSpan() - { - var res = Meos.SetToSpan(this._ptr); - return new Span(res); - } - - public SpanSet ToSpanSet() - { - var res = Meos.SetToSpanset(this._ptr); - return new SpanSet(res); - } - - public bool Contains(Set collection) - => (Meos.ContainsSetSet(this._ptr, collection._ptr)); - - public bool IsContainedIn(Set collection) - => (Meos.ContainedSetSet(this._ptr, collection._ptr)); - - public bool Overlaps(Set collection) - => (Meos.OverlapsSetSet(this._ptr, collection._ptr)); - - public bool IsLeftOf(Set collection) - => (Meos.LeftSetSet(this._ptr, collection._ptr)); - - public bool IsOverOrLeftOf(Set collection) - => (Meos.OverleftSetSet(this._ptr, collection._ptr)); - - public bool IsOverOrRightOf(Set collection) - => (Meos.OverrightSetSet(this._ptr, collection._ptr)); - - public bool IsRightOf(Set collection) - => (Meos.RightSetSet(this._ptr, collection._ptr)); - - public override bool Equals(object? obj) - { - if (this.GetType() != obj?.GetType()) - { - return false; - } - - return (Meos.SetEq(this._ptr, ((Set)obj)._ptr)); - } - - public override int GetHashCode() - => (int)Meos.SetHash(this._ptr); - } -} - diff --git a/MEOS.NET/Types/Collections/Span.cs b/MEOS.NET/Types/Collections/Span.cs deleted file mode 100644 index 27b1d13..0000000 --- a/MEOS.NET/Types/Collections/Span.cs +++ /dev/null @@ -1,189 +0,0 @@ -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Types.General; - -namespace MEOS.NET.Types.Collections -{ - public class Span : MEOSObject - { - internal Span(IntPtr ptr) : base(ptr) - { } - - public static Span FromBytes(byte[] bytes) - { - var setPtr = AllocHelper.AllocateArrayPointer(bytes, (bytesPtr) => - { - return Meos.SpanFromWkb(bytesPtr, (ulong)bytes.Length); - }); - - return new Span(setPtr); - } - - public static Span FromHexWKB(string hexWKB) - { - var res = Meos.SpanFromHexwkb(hexWKB); - return new Span(res); - } - - public Span Copy() - { - var copy = Meos.SpanCopy(this._ptr); - return new Span(copy); - } - - public byte[] ToBytes() - { - int arrSize = 0; - var arr = AllocHelper.AllocatePointer(sizeof(int), (countPtr) => - { - var res = Meos.SpanAsWkb(this._ptr, variant: 4, countPtr); - arrSize = countPtr.ToStructure(); - - return res; - }); - - return arr.ToArrayOfType(arrSize); - } - - public string ToHexWKB() - { - return AllocHelper.AllocatePointer(sizeof(int), (sizePtr) => - { - return Meos.SpanAsHexwkb(this._ptr, 0, sizePtr); - }); - } - - public virtual SpanSet ToSpanSet() - { - var res = Meos.SpanToSpanset(this._ptr); - return new SpanSet(res); - } - - public bool IsLowerBoundInclusive() - => (Meos.SpanLowerInc(this._ptr)); - - public bool IsUpperBoundInclusive() - => (Meos.SpanUpperInc(this._ptr)); - - public bool IsAdjacent(Span span) - => (Meos.AdjacentSpanSpan(this._ptr, span._ptr)); - - public bool IsAdjacent(SpanSet spanSet) - => (Meos.AdjacentSpansetSpan(spanSet._ptr, this._ptr)); - - public bool IsContainedIn(Span span) - => (Meos.ContainedSpanSpan(this._ptr, span._ptr)); - - public bool IsContainedIn(SpanSet spanSet) - => (Meos.ContainedSpanSpanset(this._ptr, spanSet._ptr)); - - public bool Contains(Span span) - => (Meos.ContainsSpanSpan(this._ptr, span._ptr)); - - public bool Contains(SpanSet spanSet) - => (Meos.ContainsSpanSpanset(this._ptr, spanSet._ptr)); - - public bool Overlaps(Span span) - => (Meos.OverlapsSpanSpan(this._ptr, span._ptr)); - - public bool Overlaps(SpanSet spanSet) - => (Meos.OverlapsSpansetSpan(spanSet._ptr, this._ptr)); - - public bool Equals(Span span) - => (Meos.SpanEq(this._ptr, span._ptr)); - - public bool Equals(SpanSet spanSet) - { - var span = spanSet.ToSpan(); - return this.Equals(span); - } - - public double Width() - => Meos.NumspanWidth(this._ptr); - - public bool IsLeftOf(Span span) - => (Meos.LeftSpanSpan(this._ptr, span._ptr)); - - public bool IsLeftOf(SpanSet spanSet) - => (Meos.LeftSpanSpanset(this._ptr, spanSet._ptr)); - - public bool IsOverOrLeftOf(Span span) - => (Meos.OverleftSpanSpan(this._ptr, span._ptr)); - - public bool IsOverOrLeftOf(SpanSet spanSet) - => (Meos.OverleftSpanSpanset(this._ptr, spanSet._ptr)); - - public bool IsRightOf(Span span) - => (Meos.RightSpanSpan(this._ptr, span._ptr)); - - public bool IsRightOf(SpanSet spanSet) - => (Meos.RightSpanSpanset(this._ptr, spanSet._ptr)); - - public bool IsOverOrRightOf(Span span) - => (Meos.OverrightSpanSpan(this._ptr, span._ptr)); - - public bool IsOverOrRightOf(SpanSet spanSet) - => (Meos.OverrightSpanSpanset(this._ptr, spanSet._ptr)); - - public double DistanceTo(Span span) - => Meos.DistanceSpanSpan(this._ptr, span._ptr); - - public Span IntersectionWith(Span span) - { - var res = Meos.IntersectionSpanSpan(this._ptr, span._ptr); - return new Span(res); - } - - public SpanSet IntersectionWith(SpanSet spanSet) - { - var res = Meos.IntersectionSpansetSpan(spanSet._ptr, this._ptr); - return new SpanSet(res); - } - - public Span UnionWith(Span span) - { - var res = Meos.UnionSpanSpan(this._ptr, span._ptr); - return new Span(res); - } - - public SpanSet UnionWith(SpanSet spanSet) - { - var res = Meos.UnionSpansetSpan(spanSet._ptr, this._ptr); - return new SpanSet(res); - } - - public override int GetHashCode() - => (int)Meos.SpanHash(this._ptr); - - public static bool operator ==(Span span1, Span span2) - => span1.Equals(span2); - - public static bool operator !=(Span span1, Span span2) - => !span1.Equals(span2); - - public static bool operator ==(Span span, SpanSet spanSet) - => span.Equals(spanSet); - - public static bool operator !=(Span span, SpanSet spanSet) - => !span.Equals(spanSet); - - public static bool operator ==(SpanSet spanSet, Span span) - => span.Equals(spanSet); - - public static bool operator !=(SpanSet spanSet, Span span) - => !span.Equals(spanSet); - - public static bool operator <(Span span1, Span span2) - => (Meos.SpanLt(span1._ptr, span2._ptr)); - - public static bool operator >(Span span1, Span span2) - => (Meos.SpanGt(span1._ptr, span2._ptr)); - - public static bool operator <=(Span span1, Span span2) - => (Meos.SpanLe(span1._ptr, span2._ptr)); - - public static bool operator >=(Span span1, Span span2) - => (Meos.SpanGe(span1._ptr, span2._ptr)); - } -} - diff --git a/MEOS.NET/Types/Collections/SpanSet.cs b/MEOS.NET/Types/Collections/SpanSet.cs deleted file mode 100644 index 4cbf497..0000000 --- a/MEOS.NET/Types/Collections/SpanSet.cs +++ /dev/null @@ -1,230 +0,0 @@ -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Types.General; - -namespace MEOS.NET.Types.Collections -{ - public class SpanSet : MEOSObject - { - internal SpanSet(IntPtr ptr) : base(ptr) - { } - - public static SpanSet FromBytes(byte[] bytes) - { - var setPtr = AllocHelper.AllocateArrayPointer(bytes, (bytesPtr) => - { - return Meos.SpansetFromWkb(bytesPtr, (ulong)bytes.Length); - }); - - return new SpanSet(setPtr); - } - - public static SpanSet FromHexWKB(string hexWKB) - { - var res = Meos.SpansetFromHexwkb(hexWKB); - return new SpanSet(res); - } - - public SpanSet Copy() - { - var copy = Meos.SpansetCopy(this._ptr); - return new SpanSet(copy); - } - - public byte[] ToBytes() - { - int arrSize = 0; - var arr = AllocHelper.AllocatePointer(sizeof(int), (countPtr) => - { - var res = Meos.SpansetAsWkb(this._ptr, variant: 4, countPtr); - arrSize = countPtr.ToStructure(); - - return res; - }); - - return arr.ToArrayOfType(arrSize); - } - - public string ToHexWKB() - { - return AllocHelper.AllocatePointer(sizeof(int), (sizePtr) => - { - return Meos.SpansetAsHexwkb(this._ptr, 0, sizePtr); - }); - } - - public virtual Span ToSpan() - { - var res = Meos.SpansetSpan(this._ptr); - return new Span(res); - } - - public int SpanCount() - => Meos.SpansetNumSpans(this._ptr); - - public virtual Span StartSpan() - { - var res = Meos.SpansetStartSpan(this._ptr); - return new Span(res); - } - - public virtual Span EndSpan() - { - var res = Meos.SpansetEndSpan(this._ptr); - return new Span(res); - } - - public virtual Span SpanAt(int position) - { - var count = this.SpanCount(); - - if (position < 0 || position + 1 > count) - { - throw new ArgumentOutOfRangeException(nameof(position), $"Requested element must be between 0 and {count - 1}"); - } - - var res = Meos.SpansetSpanN(this._ptr, position); - return new Span(res); - } - - public virtual IEnumerable GetSpans() - { - var spans = Meos.SpansetSpans(this._ptr); - List spanList = new List(spans.Length); - - foreach(var span in spans) - { - spanList.Add(new Span(span)); - } - - return spanList; - } - - public double Width(bool ignoreGaps = false) - => Meos.NumspansetWidth(this._ptr, ignoreGaps); - - public bool IsAdjacent(Span span) - => (Meos.AdjacentSpansetSpan(this._ptr, span._ptr)); - - public bool IsAdjacent(SpanSet spanSet) - => (Meos.AdjacentSpansetSpanset(this._ptr, spanSet._ptr)); - - public bool IsContainedIn(Span span) - => (Meos.ContainedSpansetSpan(this._ptr, span._ptr)); - - public bool IsContainedIn(SpanSet spanSet) - => (Meos.ContainedSpansetSpanset(this._ptr, spanSet._ptr)); - - public bool Contains(Span span) - => (Meos.ContainsSpansetSpan(this._ptr, span._ptr)); - - public bool Contains(SpanSet spanSet) - => (Meos.ContainsSpansetSpanset(this._ptr, spanSet._ptr)); - - public bool Overlaps(Span span) - => (Meos.OverlapsSpansetSpan(this._ptr, span._ptr)); - - public bool Overlaps(SpanSet spanSet) - => (Meos.OverlapsSpansetSpanset(this._ptr, spanSet._ptr)); - - public bool IsLeftOf(Span span) - => (Meos.LeftSpansetSpan(this._ptr, span._ptr)); - - public bool IsLeftOf(SpanSet spanSet) - => (Meos.LeftSpansetSpanset(this._ptr, spanSet._ptr)); - - public bool IsOverOrLeftOf(Span span) - => (Meos.OverleftSpansetSpan(this._ptr, span._ptr)); - - public bool IsOverOrLeftOf(SpanSet spanSet) - => (Meos.OverleftSpansetSpanset(this._ptr, spanSet._ptr)); - - public bool IsRightOf(Span span) - => (Meos.RightSpansetSpan(this._ptr, span._ptr)); - - public bool IsRightOf(SpanSet spanSet) - => (Meos.RightSpansetSpanset(this._ptr, spanSet._ptr)); - - public bool IsOverOrRightOf(Span span) - => (Meos.OverrightSpansetSpan(this._ptr, span._ptr)); - - public bool IsOverOrRightOf(SpanSet spanSet) - => (Meos.OverrightSpansetSpanset(this._ptr, spanSet._ptr)); - - public double DistanceTo(Set set) - => this.DistanceTo(set.ToSpanSet()); - - public double DistanceTo(Span span) - => Meos.DistanceSpansetSpan(this._ptr, span._ptr); - - public double DistanceTo(SpanSet spanSet) - => Meos.DistanceSpansetSpanset(this._ptr, spanSet._ptr); - - public SpanSet IntersectionWith(Span span) - { - var res = Meos.IntersectionSpansetSpan(this._ptr, span._ptr); - return new SpanSet(res); - } - - public SpanSet IntersectionWith(SpanSet spanSet) - { - var res = Meos.IntersectionSpansetSpanset(this._ptr, spanSet._ptr); - return new SpanSet(res); - } - - public SpanSet Minus(Span span) - { - var res = Meos.MinusSpansetSpan(this._ptr, span._ptr); - return new SpanSet(res); - } - - public SpanSet Minus(SpanSet spanSet) - { - var res = Meos.MinusSpansetSpanset(this._ptr, spanSet._ptr); - return new SpanSet(res); - } - - public SpanSet UnionWith(Span span) - { - var res = Meos.UnionSpansetSpan(this._ptr, span._ptr); - return new SpanSet(res); - } - - public SpanSet UnionWith(SpanSet spanSet) - { - var res = Meos.UnionSpansetSpanset(this._ptr, spanSet._ptr); - return new SpanSet(res); - } - - public bool Equals(SpanSet spanSet) - => (Meos.SpansetEq(this._ptr, spanSet._ptr)); - - public static SpanSet operator +(SpanSet spanSet1, SpanSet spanSet2) - => spanSet1.UnionWith(spanSet2); - - public static SpanSet operator -(SpanSet spanSet1, SpanSet spanSet2) - => spanSet1.Minus(spanSet2); - - public static bool operator ==(SpanSet spanSet1, SpanSet spanSet2) - => spanSet1.Equals(spanSet2); - - public static bool operator !=(SpanSet spanSet1, SpanSet spanSet2) - => (Meos.SpansetNe(spanSet1._ptr, spanSet2._ptr)); - - public static bool operator >(SpanSet spanSet1, SpanSet spanSet2) - => (Meos.SpansetGt(spanSet1._ptr, spanSet2._ptr)); - - public static bool operator <(SpanSet spanSet1, SpanSet spanSet2) - => (Meos.SpansetLt(spanSet1._ptr, spanSet2._ptr)); - - public static bool operator >=(SpanSet spanSet1, SpanSet spanSet2) - => (Meos.SpansetGe(spanSet1._ptr, spanSet2._ptr)); - - public static bool operator <=(SpanSet spanSet1, SpanSet spanSet2) - => (Meos.SpansetLe(spanSet1._ptr, spanSet2._ptr)); - - public override int GetHashCode() - => (int)Meos.SpansetHash(this._ptr); - } -} - diff --git a/MEOS.NET/Types/Collections/Text/TextSet.cs b/MEOS.NET/Types/Collections/Text/TextSet.cs deleted file mode 100644 index 1ca0164..0000000 --- a/MEOS.NET/Types/Collections/Text/TextSet.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace MEOS.NET.Types.Collections.Text -{ - public sealed class TextSet : Set - { - internal TextSet(IntPtr ptr) : base(ptr) - { } - - // TODO : Implement methods accordingly to PyMEOS and FloatSet class - } -} - diff --git a/MEOS.NET/Types/Collections/Time/Date/DateSet.cs b/MEOS.NET/Types/Collections/Time/Date/DateSet.cs deleted file mode 100644 index 89bd9c1..0000000 --- a/MEOS.NET/Types/Collections/Time/Date/DateSet.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace MEOS.NET.Types.Collections.Time.Date -{ - public sealed class DateSet : Set, ITimeCollection - { - internal DateSet(IntPtr ptr) : base(ptr) - { } - - public bool Contains(DateSet collection) - { - throw new NotImplementedException(); - } - - public bool IsAfter(DateSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsBefore(DateSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsContainedIn(DateSet collection) - { - throw new NotImplementedException(); - } - - public bool IsLeftOf(DateSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrAfter(DateSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrBefore(DateSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrLeftOf(DateSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrRightOf(DateSet collection) - { - throw new NotImplementedException(); - } - - public bool IsRightOf(DateSet collection) - { - throw new NotImplementedException(); - } - - public bool Overlaps(DateSet collection) - { - throw new NotImplementedException(); - } - - // TODO : Implement methods accordingly to PyMEOS and FloatSet class - } -} - diff --git a/MEOS.NET/Types/Collections/Time/Date/DateSpan.cs b/MEOS.NET/Types/Collections/Time/Date/DateSpan.cs deleted file mode 100644 index fb7bb6a..0000000 --- a/MEOS.NET/Types/Collections/Time/Date/DateSpan.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace MEOS.NET.Types.Collections.Time.Date -{ - public sealed class DateSpan : Span, ITimeCollection - { - internal DateSpan(IntPtr ptr) : base(ptr) - { } - - public bool Contains(DateSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsAfter(DateSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsBefore(DateSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsContainedIn(DateSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsLeftOf(DateSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrAfter(DateSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrBefore(DateSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrLeftOf(DateSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrRightOf(DateSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsRightOf(DateSpan collection) - { - throw new NotImplementedException(); - } - - public bool Overlaps(DateSpan collection) - { - throw new NotImplementedException(); - } - - // TODO : Implement methods accordingly to PyMEOS and FloatSpan class - } -} - diff --git a/MEOS.NET/Types/Collections/Time/Date/DateSpanSet.cs b/MEOS.NET/Types/Collections/Time/Date/DateSpanSet.cs deleted file mode 100644 index 16d067d..0000000 --- a/MEOS.NET/Types/Collections/Time/Date/DateSpanSet.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace MEOS.NET.Types.Collections.Time.Date -{ - public sealed class DateSpanSet : SpanSet, ITimeCollection - { - internal DateSpanSet(IntPtr ptr) : base(ptr) - { } - - public bool Contains(DateSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsAfter(DateSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsBefore(DateSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsContainedIn(DateSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsLeftOf(DateSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrAfter(DateSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrBefore(DateSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrLeftOf(DateSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrRightOf(DateSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsRightOf(DateSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool Overlaps(DateSpanSet collection) - { - throw new NotImplementedException(); - } - - // TODO : Implement methods accordingly to PyMEOS and FloatSpanSet class - } -} - diff --git a/MEOS.NET/Types/Collections/Time/ITimeCollection.cs b/MEOS.NET/Types/Collections/Time/ITimeCollection.cs deleted file mode 100644 index 3260734..0000000 --- a/MEOS.NET/Types/Collections/Time/ITimeCollection.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace MEOS.NET.Types.Collections.Time -{ - public interface ITimeCollection : ICollection - where T : ICollection - { - bool IsBefore(T timeCollection); - bool IsOverOrBefore(T timeCollection); - bool IsOverOrAfter(T timeCollection); - bool IsAfter(T timeCollection); - } -} - diff --git a/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSet.cs b/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSet.cs deleted file mode 100644 index 011f725..0000000 --- a/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSet.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace MEOS.NET.Types.Collections.Time.Timestamp -{ - public sealed class TimestampTzSet : Set, ITimeCollection - { - internal TimestampTzSet(IntPtr ptr) : base(ptr) - { } - - public bool Contains(TimestampTzSet collection) - { - throw new NotImplementedException(); - } - - public bool IsAfter(TimestampTzSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsBefore(TimestampTzSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsContainedIn(TimestampTzSet collection) - { - throw new NotImplementedException(); - } - - public bool IsLeftOf(TimestampTzSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrAfter(TimestampTzSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrBefore(TimestampTzSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrLeftOf(TimestampTzSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrRightOf(TimestampTzSet collection) - { - throw new NotImplementedException(); - } - - public bool IsRightOf(TimestampTzSet collection) - { - throw new NotImplementedException(); - } - - public bool Overlaps(TimestampTzSet collection) - { - throw new NotImplementedException(); - } - - // TODO : Implement methods accordingly to PyMEOS and FloatSet class - } -} - diff --git a/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSpan.cs b/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSpan.cs deleted file mode 100644 index 76fbf37..0000000 --- a/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSpan.cs +++ /dev/null @@ -1,75 +0,0 @@ -using MEOS.NET.Helpers; -using MEOS.NET.Functions; - -namespace MEOS.NET.Types.Collections.Time.Timestamp -{ - public sealed class TimestampTzSpan : Span, ITimeCollection - { - internal TimestampTzSpan(IntPtr ptr) : base(ptr) - { } - - public static TimestampTzSpan FromBounds(DateTime tMin, DateTime tMax, bool tMinInclusive = true, bool tMaxInclusive = false) - { - var res = Meos.TstzspanMake(tMin.ToPgTimestamp(), tMax.ToPgTimestamp(), tMinInclusive, tMaxInclusive); - return new TimestampTzSpan(res); - } - - public bool Contains(TimestampTzSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsAfter(TimestampTzSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsBefore(TimestampTzSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsContainedIn(TimestampTzSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsLeftOf(TimestampTzSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrAfter(TimestampTzSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrBefore(TimestampTzSpan timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrLeftOf(TimestampTzSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrRightOf(TimestampTzSpan collection) - { - throw new NotImplementedException(); - } - - public bool IsRightOf(TimestampTzSpan collection) - { - throw new NotImplementedException(); - } - - public bool Overlaps(TimestampTzSpan collection) - { - throw new NotImplementedException(); - } - - // TODO : Implement methods accordingly to PyMEOS and FloatSpan class - } -} - diff --git a/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSpanSet.cs b/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSpanSet.cs deleted file mode 100644 index c494307..0000000 --- a/MEOS.NET/Types/Collections/Time/Timestamp/TimestampTzSpanSet.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace MEOS.NET.Types.Collections.Time.Timestamp -{ - public sealed class TimestampTzSpanSet : SpanSet, ITimeCollection - { - internal TimestampTzSpanSet(IntPtr ptr) : base(ptr) - { } - - public bool Contains(TimestampTzSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsAfter(TimestampTzSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsBefore(TimestampTzSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsContainedIn(TimestampTzSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsLeftOf(TimestampTzSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrAfter(TimestampTzSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrBefore(TimestampTzSpanSet timeCollection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrLeftOf(TimestampTzSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsOverOrRightOf(TimestampTzSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool IsRightOf(TimestampTzSpanSet collection) - { - throw new NotImplementedException(); - } - - public bool Overlaps(TimestampTzSpanSet collection) - { - throw new NotImplementedException(); - } - - // TODO : Implement methods accordingly to PyMEOS and FloatSpanSet class - } -} - diff --git a/MEOS.NET/Types/Generated/DateSet.g.cs b/MEOS.NET/Types/DateSet.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/DateSet.g.cs rename to MEOS.NET/Types/DateSet.g.cs index f90a156..af3f604 100644 --- a/MEOS.NET/Types/Generated/DateSet.g.cs +++ b/MEOS.NET/Types/DateSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The DateSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/DateSpan.g.cs b/MEOS.NET/Types/DateSpan.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/DateSpan.g.cs rename to MEOS.NET/Types/DateSpan.g.cs index bcb9029..11fab6c 100644 --- a/MEOS.NET/Types/Generated/DateSpan.g.cs +++ b/MEOS.NET/Types/DateSpan.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The DateSpan class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/DateSpanSet.g.cs b/MEOS.NET/Types/DateSpanSet.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/DateSpanSet.g.cs rename to MEOS.NET/Types/DateSpanSet.g.cs index fb91d7b..c925128 100644 --- a/MEOS.NET/Types/Generated/DateSpanSet.g.cs +++ b/MEOS.NET/Types/DateSpanSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The DateSpanSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/FloatSet.g.cs b/MEOS.NET/Types/FloatSet.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/FloatSet.g.cs rename to MEOS.NET/Types/FloatSet.g.cs index 006c471..6249570 100644 --- a/MEOS.NET/Types/Generated/FloatSet.g.cs +++ b/MEOS.NET/Types/FloatSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The FloatSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/FloatSpan.g.cs b/MEOS.NET/Types/FloatSpan.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/FloatSpan.g.cs rename to MEOS.NET/Types/FloatSpan.g.cs index d0d7d65..ca88751 100644 --- a/MEOS.NET/Types/Generated/FloatSpan.g.cs +++ b/MEOS.NET/Types/FloatSpan.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The FloatSpan class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/FloatSpanSet.g.cs b/MEOS.NET/Types/FloatSpanSet.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/FloatSpanSet.g.cs rename to MEOS.NET/Types/FloatSpanSet.g.cs index 5879a81..83f29b5 100644 --- a/MEOS.NET/Types/Generated/FloatSpanSet.g.cs +++ b/MEOS.NET/Types/FloatSpanSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The FloatSpanSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/General/MEOSObject.cs b/MEOS.NET/Types/General/MEOSObject.cs deleted file mode 100644 index 7f93a4b..0000000 --- a/MEOS.NET/Types/General/MEOSObject.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace MEOS.NET.Types.General -{ - public abstract class MEOSObject - { - internal IntPtr _ptr { get; private set; } - - internal MEOSObject(IntPtr ptr) - => this._ptr = ptr; - } -} - diff --git a/MEOS.NET/Types/Generated/GeogSet.g.cs b/MEOS.NET/Types/GeogSet.g.cs similarity index 92% rename from MEOS.NET/Types/Generated/GeogSet.g.cs rename to MEOS.NET/Types/GeogSet.g.cs index 307d7f5..e37f3fe 100644 --- a/MEOS.NET/Types/Generated/GeogSet.g.cs +++ b/MEOS.NET/Types/GeogSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The GeogSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/GeomSet.g.cs b/MEOS.NET/Types/GeomSet.g.cs similarity index 92% rename from MEOS.NET/Types/Generated/GeomSet.g.cs rename to MEOS.NET/Types/GeomSet.g.cs index 56ddc4e..6f92b60 100644 --- a/MEOS.NET/Types/Generated/GeomSet.g.cs +++ b/MEOS.NET/Types/GeomSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The GeomSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/IntSet.g.cs b/MEOS.NET/Types/IntSet.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/IntSet.g.cs rename to MEOS.NET/Types/IntSet.g.cs index 33ad2f8..cd912d1 100644 --- a/MEOS.NET/Types/Generated/IntSet.g.cs +++ b/MEOS.NET/Types/IntSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The IntSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/IntSpan.g.cs b/MEOS.NET/Types/IntSpan.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/IntSpan.g.cs rename to MEOS.NET/Types/IntSpan.g.cs index a235483..1bcda31 100644 --- a/MEOS.NET/Types/Generated/IntSpan.g.cs +++ b/MEOS.NET/Types/IntSpan.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The IntSpan class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/IntSpanSet.g.cs b/MEOS.NET/Types/IntSpanSet.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/IntSpanSet.g.cs rename to MEOS.NET/Types/IntSpanSet.g.cs index 5f54ca1..5e48d6b 100644 --- a/MEOS.NET/Types/Generated/IntSpanSet.g.cs +++ b/MEOS.NET/Types/IntSpanSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The IntSpanSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/MEOSConvert.g.cs b/MEOS.NET/Types/MEOSConvert.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/MEOSConvert.g.cs rename to MEOS.NET/Types/MEOSConvert.g.cs index c506a3e..724e782 100644 --- a/MEOS.NET/Types/Generated/MEOSConvert.g.cs +++ b/MEOS.NET/Types/MEOSConvert.g.cs @@ -4,7 +4,7 @@ using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The MEOS scalar time types as .NET values, and back. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/MEOSFactory.g.cs b/MEOS.NET/Types/MEOSFactory.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/MEOSFactory.g.cs rename to MEOS.NET/Types/MEOSFactory.g.cs index 823438e..0292374 100644 --- a/MEOS.NET/Types/Generated/MEOSFactory.g.cs +++ b/MEOS.NET/Types/MEOSFactory.g.cs @@ -2,19 +2,24 @@ using System.Runtime.InteropServices; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// /// Wraps a MEOS pointer in the class the model gives its runtime type. /// The discriminator is the struct field the catalog records, read at the /// offset the catalog's own field layout puts it at. /// + /// + /// This is the way back from a function on + /// , which answers the MEOS pointer, + /// into the object layer. + /// [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] - internal static class MEOSFactory + public static class MEOSFactory { /// The value at as the Temporal /// class the model gives its runtime type. - internal static Temporal? WrapTemporal(IntPtr ptr) + public static Temporal? WrapTemporal(IntPtr ptr) { if (ptr == IntPtr.Zero) { @@ -43,7 +48,7 @@ internal static class MEOSFactory } /// Every element of a C array of Temporal pointers, wrapped. - internal static Temporal?[] WrapTemporalArray(IntPtr[] ptrs) + public static Temporal?[] WrapTemporalArray(IntPtr[] ptrs) { Temporal?[] wrapped = new Temporal?[ptrs.Length]; for (int i = 0; i < ptrs.Length; i++) @@ -210,7 +215,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) /// The value at as the Set /// class the model gives its runtime type. - internal static Set? WrapSet(IntPtr ptr) + public static Set? WrapSet(IntPtr ptr) { if (ptr == IntPtr.Zero) { @@ -236,7 +241,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) } /// Every element of a C array of Set pointers, wrapped. - internal static Set?[] WrapSetArray(IntPtr[] ptrs) + public static Set?[] WrapSetArray(IntPtr[] ptrs) { Set?[] wrapped = new Set?[ptrs.Length]; for (int i = 0; i < ptrs.Length; i++) @@ -249,7 +254,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) /// The value at as the Span /// class the model gives its runtime type. - internal static Span? WrapSpan(IntPtr ptr) + public static Span? WrapSpan(IntPtr ptr) { if (ptr == IntPtr.Zero) { @@ -269,7 +274,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) } /// Every element of a C array of Span pointers, wrapped. - internal static Span?[] WrapSpanArray(IntPtr[] ptrs) + public static Span?[] WrapSpanArray(IntPtr[] ptrs) { Span?[] wrapped = new Span?[ptrs.Length]; for (int i = 0; i < ptrs.Length; i++) @@ -282,7 +287,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) /// The value at as the SpanSet /// class the model gives its runtime type. - internal static SpanSet? WrapSpanSet(IntPtr ptr) + public static SpanSet? WrapSpanSet(IntPtr ptr) { if (ptr == IntPtr.Zero) { @@ -302,7 +307,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) } /// Every element of a C array of SpanSet pointers, wrapped. - internal static SpanSet?[] WrapSpanSetArray(IntPtr[] ptrs) + public static SpanSet?[] WrapSpanSetArray(IntPtr[] ptrs) { SpanSet?[] wrapped = new SpanSet?[ptrs.Length]; for (int i = 0; i < ptrs.Length; i++) @@ -315,7 +320,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) /// The value at as the TBox /// class the model gives its runtime type. - internal static TBox? WrapTBox(IntPtr ptr) + public static TBox? WrapTBox(IntPtr ptr) { if (ptr == IntPtr.Zero) { @@ -326,7 +331,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) } /// Every element of a C array of TBox pointers, wrapped. - internal static TBox?[] WrapTBoxArray(IntPtr[] ptrs) + public static TBox?[] WrapTBoxArray(IntPtr[] ptrs) { TBox?[] wrapped = new TBox?[ptrs.Length]; for (int i = 0; i < ptrs.Length; i++) @@ -339,7 +344,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) /// The value at as the STBox /// class the model gives its runtime type. - internal static STBox? WrapSTBox(IntPtr ptr) + public static STBox? WrapSTBox(IntPtr ptr) { if (ptr == IntPtr.Zero) { @@ -350,7 +355,7 @@ private static TText WrapTTextSubtype(IntPtr ptr) } /// Every element of a C array of STBox pointers, wrapped. - internal static STBox?[] WrapSTBoxArray(IntPtr[] ptrs) + public static STBox?[] WrapSTBoxArray(IntPtr[] ptrs) { STBox?[] wrapped = new STBox?[ptrs.Length]; for (int i = 0; i < ptrs.Length; i++) diff --git a/MEOS.NET/Types/Generated/MEOSObject.g.cs b/MEOS.NET/Types/MEOSObject.g.cs similarity index 65% rename from MEOS.NET/Types/Generated/MEOSObject.g.cs rename to MEOS.NET/Types/MEOSObject.g.cs index c9dd778..7236839 100644 --- a/MEOS.NET/Types/Generated/MEOSObject.g.cs +++ b/MEOS.NET/Types/MEOSObject.g.cs @@ -1,6 +1,6 @@ #nullable enable -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// /// A handle on a value MEOS owns. The pointer is what every generated method @@ -9,7 +9,9 @@ namespace MEOS.NET.Types.Generated [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] public abstract class MEOSObject { - internal IntPtr Ptr { get; } + /// The MEOS value this object holds, for the functions on + /// that take it. + public IntPtr Ptr { get; } internal MEOSObject(IntPtr ptr) => this.Ptr = ptr; } diff --git a/MEOS.NET/Types/Generated/NpointSet.g.cs b/MEOS.NET/Types/NpointSet.g.cs similarity index 94% rename from MEOS.NET/Types/Generated/NpointSet.g.cs rename to MEOS.NET/Types/NpointSet.g.cs index 36d26d1..6edafb3 100644 --- a/MEOS.NET/Types/Generated/NpointSet.g.cs +++ b/MEOS.NET/Types/NpointSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The NpointSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/PoseSet.g.cs b/MEOS.NET/Types/PoseSet.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/PoseSet.g.cs rename to MEOS.NET/Types/PoseSet.g.cs index 94fb76b..0cbd1d3 100644 --- a/MEOS.NET/Types/Generated/PoseSet.g.cs +++ b/MEOS.NET/Types/PoseSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The PoseSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/STBox.g.cs b/MEOS.NET/Types/STBox.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/STBox.g.cs rename to MEOS.NET/Types/STBox.g.cs index 151cbe9..d18080a 100644 --- a/MEOS.NET/Types/Generated/STBox.g.cs +++ b/MEOS.NET/Types/STBox.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Space x time box (bbox of TSpatial). [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/Set.g.cs b/MEOS.NET/Types/Set.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/Set.g.cs rename to MEOS.NET/Types/Set.g.cs index 8aefa47..cba7a51 100644 --- a/MEOS.NET/Types/Generated/Set.g.cs +++ b/MEOS.NET/Types/Set.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Unordered set of base values. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/Span.g.cs b/MEOS.NET/Types/Span.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/Span.g.cs rename to MEOS.NET/Types/Span.g.cs index 9fae792..4d1d016 100644 --- a/MEOS.NET/Types/Generated/Span.g.cs +++ b/MEOS.NET/Types/Span.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Contiguous range over an ordered base type. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/SpanSet.g.cs b/MEOS.NET/Types/SpanSet.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/SpanSet.g.cs rename to MEOS.NET/Types/SpanSet.g.cs index 3c907ec..a0c1502 100644 --- a/MEOS.NET/Types/Generated/SpanSet.g.cs +++ b/MEOS.NET/Types/SpanSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Set of disjoint spans. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TAlpha.g.cs b/MEOS.NET/Types/TAlpha.g.cs similarity index 92% rename from MEOS.NET/Types/Generated/TAlpha.g.cs rename to MEOS.NET/Types/TAlpha.g.cs index 3a37e47..c87c5e8 100644 --- a/MEOS.NET/Types/Generated/TAlpha.g.cs +++ b/MEOS.NET/Types/TAlpha.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Non-numeric, non-spatial temporal types (step/discrete interpolation only). A real MEOS grouping (talpha_type) with no user-facing class name in PyMEOS — see corrections. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBigint.g.cs b/MEOS.NET/Types/TBigint.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TBigint.g.cs rename to MEOS.NET/Types/TBigint.g.cs index 6a79e7c..6137372 100644 --- a/MEOS.NET/Types/Generated/TBigint.g.cs +++ b/MEOS.NET/Types/TBigint.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TBigint class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBigintInst.g.cs b/MEOS.NET/Types/TBigintInst.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/TBigintInst.g.cs rename to MEOS.NET/Types/TBigintInst.g.cs index 1dc325b..53f7416 100644 --- a/MEOS.NET/Types/Generated/TBigintInst.g.cs +++ b/MEOS.NET/Types/TBigintInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TBigint of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBigintSeq.g.cs b/MEOS.NET/Types/TBigintSeq.g.cs similarity index 94% rename from MEOS.NET/Types/Generated/TBigintSeq.g.cs rename to MEOS.NET/Types/TBigintSeq.g.cs index 600845b..eb92b2b 100644 --- a/MEOS.NET/Types/Generated/TBigintSeq.g.cs +++ b/MEOS.NET/Types/TBigintSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TBigint of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBigintSeqSet.g.cs b/MEOS.NET/Types/TBigintSeqSet.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/TBigintSeqSet.g.cs rename to MEOS.NET/Types/TBigintSeqSet.g.cs index f221a5b..1c0a8a8 100644 --- a/MEOS.NET/Types/Generated/TBigintSeqSet.g.cs +++ b/MEOS.NET/Types/TBigintSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TBigint of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBool.g.cs b/MEOS.NET/Types/TBool.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/TBool.g.cs rename to MEOS.NET/Types/TBool.g.cs index d8e55b6..06304be 100644 --- a/MEOS.NET/Types/Generated/TBool.g.cs +++ b/MEOS.NET/Types/TBool.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TBool class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBoolInst.g.cs b/MEOS.NET/Types/TBoolInst.g.cs similarity index 92% rename from MEOS.NET/Types/Generated/TBoolInst.g.cs rename to MEOS.NET/Types/TBoolInst.g.cs index 4c6afbd..3a14e5a 100644 --- a/MEOS.NET/Types/Generated/TBoolInst.g.cs +++ b/MEOS.NET/Types/TBoolInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TBool of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBoolSeq.g.cs b/MEOS.NET/Types/TBoolSeq.g.cs similarity index 94% rename from MEOS.NET/Types/Generated/TBoolSeq.g.cs rename to MEOS.NET/Types/TBoolSeq.g.cs index b1dbe30..dcc7129 100644 --- a/MEOS.NET/Types/Generated/TBoolSeq.g.cs +++ b/MEOS.NET/Types/TBoolSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TBool of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBoolSeqSet.g.cs b/MEOS.NET/Types/TBoolSeqSet.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/TBoolSeqSet.g.cs rename to MEOS.NET/Types/TBoolSeqSet.g.cs index 6d610e1..73c8520 100644 --- a/MEOS.NET/Types/Generated/TBoolSeqSet.g.cs +++ b/MEOS.NET/Types/TBoolSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TBool of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TBox.g.cs b/MEOS.NET/Types/TBox.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TBox.g.cs rename to MEOS.NET/Types/TBox.g.cs index 97bc264..9058f99 100644 --- a/MEOS.NET/Types/Generated/TBox.g.cs +++ b/MEOS.NET/Types/TBox.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Numeric x time box (bbox of TNumber). [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TCbuffer.g.cs b/MEOS.NET/Types/TCbuffer.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/TCbuffer.g.cs rename to MEOS.NET/Types/TCbuffer.g.cs index 3c79c98..c5d3404 100644 --- a/MEOS.NET/Types/Generated/TCbuffer.g.cs +++ b/MEOS.NET/Types/TCbuffer.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TCbuffer class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TCbufferInst.g.cs b/MEOS.NET/Types/TCbufferInst.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TCbufferInst.g.cs rename to MEOS.NET/Types/TCbufferInst.g.cs index d4b70b2..cfb28fb 100644 --- a/MEOS.NET/Types/Generated/TCbufferInst.g.cs +++ b/MEOS.NET/Types/TCbufferInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TCbuffer of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TCbufferSeq.g.cs b/MEOS.NET/Types/TCbufferSeq.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TCbufferSeq.g.cs rename to MEOS.NET/Types/TCbufferSeq.g.cs index 7e85048..a914339 100644 --- a/MEOS.NET/Types/Generated/TCbufferSeq.g.cs +++ b/MEOS.NET/Types/TCbufferSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TCbuffer of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TCbufferSeqSet.g.cs b/MEOS.NET/Types/TCbufferSeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TCbufferSeqSet.g.cs rename to MEOS.NET/Types/TCbufferSeqSet.g.cs index 5983af8..e2d07be 100644 --- a/MEOS.NET/Types/Generated/TCbufferSeqSet.g.cs +++ b/MEOS.NET/Types/TCbufferSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TCbuffer of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TFloat.g.cs b/MEOS.NET/Types/TFloat.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TFloat.g.cs rename to MEOS.NET/Types/TFloat.g.cs index 254f642..8459555 100644 --- a/MEOS.NET/Types/Generated/TFloat.g.cs +++ b/MEOS.NET/Types/TFloat.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TFloat class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TFloatInst.g.cs b/MEOS.NET/Types/TFloatInst.g.cs similarity index 92% rename from MEOS.NET/Types/Generated/TFloatInst.g.cs rename to MEOS.NET/Types/TFloatInst.g.cs index 1b4d69d..45e38fd 100644 --- a/MEOS.NET/Types/Generated/TFloatInst.g.cs +++ b/MEOS.NET/Types/TFloatInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TFloat of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TFloatSeq.g.cs b/MEOS.NET/Types/TFloatSeq.g.cs similarity index 94% rename from MEOS.NET/Types/Generated/TFloatSeq.g.cs rename to MEOS.NET/Types/TFloatSeq.g.cs index 81ed831..22fc35c 100644 --- a/MEOS.NET/Types/Generated/TFloatSeq.g.cs +++ b/MEOS.NET/Types/TFloatSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TFloat of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TFloatSeqSet.g.cs b/MEOS.NET/Types/TFloatSeqSet.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/TFloatSeqSet.g.cs rename to MEOS.NET/Types/TFloatSeqSet.g.cs index 284bc08..dd75d6f 100644 --- a/MEOS.NET/Types/Generated/TFloatSeqSet.g.cs +++ b/MEOS.NET/Types/TFloatSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TFloat of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeo.g.cs b/MEOS.NET/Types/TGeo.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/TGeo.g.cs rename to MEOS.NET/Types/TGeo.g.cs index ad71c0c..5a547e8 100644 --- a/MEOS.NET/Types/Generated/TGeo.g.cs +++ b/MEOS.NET/Types/TGeo.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// All PostGIS-derived spatiotemporal types (geometry/geography-based). Authoritative parent per MobilityDB manual Ch.7 Figure 7.1 (= the broad C predicate tgeo_type_all). NOTE: the narrower C predicate tgeo_type() and most tgeo_* functions reject points — class membership (manual) is broader than tgeo_* API applicability; see correction OM-M1. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeogPoint.g.cs b/MEOS.NET/Types/TGeogPoint.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/TGeogPoint.g.cs rename to MEOS.NET/Types/TGeogPoint.g.cs index 9ef9e6a..7000248 100644 --- a/MEOS.NET/Types/Generated/TGeogPoint.g.cs +++ b/MEOS.NET/Types/TGeogPoint.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TGeogPoint class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeogPointInst.g.cs b/MEOS.NET/Types/TGeogPointInst.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeogPointInst.g.cs rename to MEOS.NET/Types/TGeogPointInst.g.cs index 642f359..e1e6325 100644 --- a/MEOS.NET/Types/Generated/TGeogPointInst.g.cs +++ b/MEOS.NET/Types/TGeogPointInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeogPoint of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeogPointSeq.g.cs b/MEOS.NET/Types/TGeogPointSeq.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeogPointSeq.g.cs rename to MEOS.NET/Types/TGeogPointSeq.g.cs index 9e9058e..eb4f4a7 100644 --- a/MEOS.NET/Types/Generated/TGeogPointSeq.g.cs +++ b/MEOS.NET/Types/TGeogPointSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeogPoint of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeogPointSeqSet.g.cs b/MEOS.NET/Types/TGeogPointSeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeogPointSeqSet.g.cs rename to MEOS.NET/Types/TGeogPointSeqSet.g.cs index 398b467..090e73e 100644 --- a/MEOS.NET/Types/Generated/TGeogPointSeqSet.g.cs +++ b/MEOS.NET/Types/TGeogPointSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeogPoint of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeography.g.cs b/MEOS.NET/Types/TGeography.g.cs similarity index 95% rename from MEOS.NET/Types/Generated/TGeography.g.cs rename to MEOS.NET/Types/TGeography.g.cs index 4e81a90..73a6594 100644 --- a/MEOS.NET/Types/Generated/TGeography.g.cs +++ b/MEOS.NET/Types/TGeography.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TGeography class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeographyInst.g.cs b/MEOS.NET/Types/TGeographyInst.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeographyInst.g.cs rename to MEOS.NET/Types/TGeographyInst.g.cs index 06f33e1..23b2feb 100644 --- a/MEOS.NET/Types/Generated/TGeographyInst.g.cs +++ b/MEOS.NET/Types/TGeographyInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeography of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeographySeq.g.cs b/MEOS.NET/Types/TGeographySeq.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeographySeq.g.cs rename to MEOS.NET/Types/TGeographySeq.g.cs index efac546..a132e8c 100644 --- a/MEOS.NET/Types/Generated/TGeographySeq.g.cs +++ b/MEOS.NET/Types/TGeographySeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeography of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeographySeqSet.g.cs b/MEOS.NET/Types/TGeographySeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeographySeqSet.g.cs rename to MEOS.NET/Types/TGeographySeqSet.g.cs index 05f421c..c5f1e78 100644 --- a/MEOS.NET/Types/Generated/TGeographySeqSet.g.cs +++ b/MEOS.NET/Types/TGeographySeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeography of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeomPoint.g.cs b/MEOS.NET/Types/TGeomPoint.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/TGeomPoint.g.cs rename to MEOS.NET/Types/TGeomPoint.g.cs index c480370..1ad0ebf 100644 --- a/MEOS.NET/Types/Generated/TGeomPoint.g.cs +++ b/MEOS.NET/Types/TGeomPoint.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TGeomPoint class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeomPointInst.g.cs b/MEOS.NET/Types/TGeomPointInst.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeomPointInst.g.cs rename to MEOS.NET/Types/TGeomPointInst.g.cs index 72ba2aa..8a87535 100644 --- a/MEOS.NET/Types/Generated/TGeomPointInst.g.cs +++ b/MEOS.NET/Types/TGeomPointInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeomPoint of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeomPointSeq.g.cs b/MEOS.NET/Types/TGeomPointSeq.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeomPointSeq.g.cs rename to MEOS.NET/Types/TGeomPointSeq.g.cs index f080720..08ad3b4 100644 --- a/MEOS.NET/Types/Generated/TGeomPointSeq.g.cs +++ b/MEOS.NET/Types/TGeomPointSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeomPoint of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeomPointSeqSet.g.cs b/MEOS.NET/Types/TGeomPointSeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeomPointSeqSet.g.cs rename to MEOS.NET/Types/TGeomPointSeqSet.g.cs index a008e6b..963b109 100644 --- a/MEOS.NET/Types/Generated/TGeomPointSeqSet.g.cs +++ b/MEOS.NET/Types/TGeomPointSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeomPoint of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeometry.g.cs b/MEOS.NET/Types/TGeometry.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/TGeometry.g.cs rename to MEOS.NET/Types/TGeometry.g.cs index b1c1b60..f76d612 100644 --- a/MEOS.NET/Types/Generated/TGeometry.g.cs +++ b/MEOS.NET/Types/TGeometry.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TGeometry class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeometryInst.g.cs b/MEOS.NET/Types/TGeometryInst.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeometryInst.g.cs rename to MEOS.NET/Types/TGeometryInst.g.cs index d7721b1..cfddf5e 100644 --- a/MEOS.NET/Types/Generated/TGeometryInst.g.cs +++ b/MEOS.NET/Types/TGeometryInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeometry of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeometrySeq.g.cs b/MEOS.NET/Types/TGeometrySeq.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeometrySeq.g.cs rename to MEOS.NET/Types/TGeometrySeq.g.cs index 0bbd507..d56fe31 100644 --- a/MEOS.NET/Types/Generated/TGeometrySeq.g.cs +++ b/MEOS.NET/Types/TGeometrySeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeometry of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TGeometrySeqSet.g.cs b/MEOS.NET/Types/TGeometrySeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TGeometrySeqSet.g.cs rename to MEOS.NET/Types/TGeometrySeqSet.g.cs index cf3d86b..561585e 100644 --- a/MEOS.NET/Types/Generated/TGeometrySeqSet.g.cs +++ b/MEOS.NET/Types/TGeometrySeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TGeometry of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TInstant.g.cs b/MEOS.NET/Types/TInstant.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TInstant.g.cs rename to MEOS.NET/Types/TInstant.g.cs index b57fdc3..0fb49ef 100644 --- a/MEOS.NET/Types/Generated/TInstant.g.cs +++ b/MEOS.NET/Types/TInstant.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TInstant class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TInt.g.cs b/MEOS.NET/Types/TInt.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TInt.g.cs rename to MEOS.NET/Types/TInt.g.cs index 2a7c452..028c1bf 100644 --- a/MEOS.NET/Types/Generated/TInt.g.cs +++ b/MEOS.NET/Types/TInt.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TInt class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TIntInst.g.cs b/MEOS.NET/Types/TIntInst.g.cs similarity index 92% rename from MEOS.NET/Types/Generated/TIntInst.g.cs rename to MEOS.NET/Types/TIntInst.g.cs index 95b66ee..d734142 100644 --- a/MEOS.NET/Types/Generated/TIntInst.g.cs +++ b/MEOS.NET/Types/TIntInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TInt of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TIntSeq.g.cs b/MEOS.NET/Types/TIntSeq.g.cs similarity index 94% rename from MEOS.NET/Types/Generated/TIntSeq.g.cs rename to MEOS.NET/Types/TIntSeq.g.cs index aa95c79..1ab09dd 100644 --- a/MEOS.NET/Types/Generated/TIntSeq.g.cs +++ b/MEOS.NET/Types/TIntSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TInt of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TIntSeqSet.g.cs b/MEOS.NET/Types/TIntSeqSet.g.cs similarity index 93% rename from MEOS.NET/Types/Generated/TIntSeqSet.g.cs rename to MEOS.NET/Types/TIntSeqSet.g.cs index ae3f5c7..35dfc94 100644 --- a/MEOS.NET/Types/Generated/TIntSeqSet.g.cs +++ b/MEOS.NET/Types/TIntSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TInt of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TJsonb.g.cs b/MEOS.NET/Types/TJsonb.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/TJsonb.g.cs rename to MEOS.NET/Types/TJsonb.g.cs index dabae06..f8797a5 100644 --- a/MEOS.NET/Types/Generated/TJsonb.g.cs +++ b/MEOS.NET/Types/TJsonb.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TJsonb class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TJsonbInst.g.cs b/MEOS.NET/Types/TJsonbInst.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TJsonbInst.g.cs rename to MEOS.NET/Types/TJsonbInst.g.cs index 16f612b..05487af 100644 --- a/MEOS.NET/Types/Generated/TJsonbInst.g.cs +++ b/MEOS.NET/Types/TJsonbInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TJsonb of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TJsonbSeq.g.cs b/MEOS.NET/Types/TJsonbSeq.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TJsonbSeq.g.cs rename to MEOS.NET/Types/TJsonbSeq.g.cs index 0c79fee..1358209 100644 --- a/MEOS.NET/Types/Generated/TJsonbSeq.g.cs +++ b/MEOS.NET/Types/TJsonbSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TJsonb of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TJsonbSeqSet.g.cs b/MEOS.NET/Types/TJsonbSeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TJsonbSeqSet.g.cs rename to MEOS.NET/Types/TJsonbSeqSet.g.cs index 31900cb..fdbf680 100644 --- a/MEOS.NET/Types/Generated/TJsonbSeqSet.g.cs +++ b/MEOS.NET/Types/TJsonbSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TJsonb of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TNpoint.g.cs b/MEOS.NET/Types/TNpoint.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TNpoint.g.cs rename to MEOS.NET/Types/TNpoint.g.cs index 0f65e9e..316dfed 100644 --- a/MEOS.NET/Types/Generated/TNpoint.g.cs +++ b/MEOS.NET/Types/TNpoint.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TNpoint class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TNpointInst.g.cs b/MEOS.NET/Types/TNpointInst.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TNpointInst.g.cs rename to MEOS.NET/Types/TNpointInst.g.cs index 57cf2eb..31ed367 100644 --- a/MEOS.NET/Types/Generated/TNpointInst.g.cs +++ b/MEOS.NET/Types/TNpointInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TNpoint of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TNpointSeq.g.cs b/MEOS.NET/Types/TNpointSeq.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TNpointSeq.g.cs rename to MEOS.NET/Types/TNpointSeq.g.cs index 076bef0..e945b60 100644 --- a/MEOS.NET/Types/Generated/TNpointSeq.g.cs +++ b/MEOS.NET/Types/TNpointSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TNpoint of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TNpointSeqSet.g.cs b/MEOS.NET/Types/TNpointSeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TNpointSeqSet.g.cs rename to MEOS.NET/Types/TNpointSeqSet.g.cs index 3a73197..3715e3c 100644 --- a/MEOS.NET/Types/Generated/TNpointSeqSet.g.cs +++ b/MEOS.NET/Types/TNpointSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TNpoint of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TNumber.g.cs b/MEOS.NET/Types/TNumber.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TNumber.g.cs rename to MEOS.NET/Types/TNumber.g.cs index 9265e94..68ff44f 100644 --- a/MEOS.NET/Types/Generated/TNumber.g.cs +++ b/MEOS.NET/Types/TNumber.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Temporal numbers; supports linear interpolation. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TPoint.g.cs b/MEOS.NET/Types/TPoint.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TPoint.g.cs rename to MEOS.NET/Types/TPoint.g.cs index 15ceb01..b9a6118 100644 --- a/MEOS.NET/Types/Generated/TPoint.g.cs +++ b/MEOS.NET/Types/TPoint.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Temporal points. API-level intermediate (C predicate tpoint_type + the tpoint_* method family); NOT drawn in the manual Figure 7.1 (a conceptual diagram) but required so the tpoint_* methods bind to a class — see correction OM-M6. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TPose.g.cs b/MEOS.NET/Types/TPose.g.cs similarity index 98% rename from MEOS.NET/Types/Generated/TPose.g.cs rename to MEOS.NET/Types/TPose.g.cs index fb8ed74..076af2e 100644 --- a/MEOS.NET/Types/Generated/TPose.g.cs +++ b/MEOS.NET/Types/TPose.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TPose class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TPoseInst.g.cs b/MEOS.NET/Types/TPoseInst.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TPoseInst.g.cs rename to MEOS.NET/Types/TPoseInst.g.cs index 2cfc4ea..8d5e5e3 100644 --- a/MEOS.NET/Types/Generated/TPoseInst.g.cs +++ b/MEOS.NET/Types/TPoseInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TPose of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TPoseSeq.g.cs b/MEOS.NET/Types/TPoseSeq.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TPoseSeq.g.cs rename to MEOS.NET/Types/TPoseSeq.g.cs index 4eeb69d..88aa0bf 100644 --- a/MEOS.NET/Types/Generated/TPoseSeq.g.cs +++ b/MEOS.NET/Types/TPoseSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TPose of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TPoseSeqSet.g.cs b/MEOS.NET/Types/TPoseSeqSet.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TPoseSeqSet.g.cs rename to MEOS.NET/Types/TPoseSeqSet.g.cs index 58dcdab..79e348e 100644 --- a/MEOS.NET/Types/Generated/TPoseSeqSet.g.cs +++ b/MEOS.NET/Types/TPoseSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TPose of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TRGeometry.g.cs b/MEOS.NET/Types/TRGeometry.g.cs similarity index 99% rename from MEOS.NET/Types/Generated/TRGeometry.g.cs rename to MEOS.NET/Types/TRGeometry.g.cs index ac82fb4..b2acb04 100644 --- a/MEOS.NET/Types/Generated/TRGeometry.g.cs +++ b/MEOS.NET/Types/TRGeometry.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TRGeometry class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TRGeometryInst.g.cs b/MEOS.NET/Types/TRGeometryInst.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TRGeometryInst.g.cs rename to MEOS.NET/Types/TRGeometryInst.g.cs index 932b77b..9432f2f 100644 --- a/MEOS.NET/Types/Generated/TRGeometryInst.g.cs +++ b/MEOS.NET/Types/TRGeometryInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TRGeometry of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TRGeometrySeq.g.cs b/MEOS.NET/Types/TRGeometrySeq.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TRGeometrySeq.g.cs rename to MEOS.NET/Types/TRGeometrySeq.g.cs index a4c2112..6868e48 100644 --- a/MEOS.NET/Types/Generated/TRGeometrySeq.g.cs +++ b/MEOS.NET/Types/TRGeometrySeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TRGeometry of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TRGeometrySeqSet.g.cs b/MEOS.NET/Types/TRGeometrySeqSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TRGeometrySeqSet.g.cs rename to MEOS.NET/Types/TRGeometrySeqSet.g.cs index 57e97e4..6401afb 100644 --- a/MEOS.NET/Types/Generated/TRGeometrySeqSet.g.cs +++ b/MEOS.NET/Types/TRGeometrySeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TRGeometry of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TSequence.g.cs b/MEOS.NET/Types/TSequence.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TSequence.g.cs rename to MEOS.NET/Types/TSequence.g.cs index b29ff4c..7f774f4 100644 --- a/MEOS.NET/Types/Generated/TSequence.g.cs +++ b/MEOS.NET/Types/TSequence.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TSequence class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TSequenceSet.g.cs b/MEOS.NET/Types/TSequenceSet.g.cs similarity index 90% rename from MEOS.NET/Types/Generated/TSequenceSet.g.cs rename to MEOS.NET/Types/TSequenceSet.g.cs index 596d3d3..df0c491 100644 --- a/MEOS.NET/Types/Generated/TSequenceSet.g.cs +++ b/MEOS.NET/Types/TSequenceSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TSequenceSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TSpatial.g.cs b/MEOS.NET/Types/TSpatial.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/TSpatial.g.cs rename to MEOS.NET/Types/TSpatial.g.cs index af11d87..1c87dd9 100644 --- a/MEOS.NET/Types/Generated/TSpatial.g.cs +++ b/MEOS.NET/Types/TSpatial.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Temporal types carrying an STBox spatial bounding box. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TText.g.cs b/MEOS.NET/Types/TText.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/TText.g.cs rename to MEOS.NET/Types/TText.g.cs index 526ec3d..729da6d 100644 --- a/MEOS.NET/Types/Generated/TText.g.cs +++ b/MEOS.NET/Types/TText.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TText class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TTextInst.g.cs b/MEOS.NET/Types/TTextInst.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TTextInst.g.cs rename to MEOS.NET/Types/TTextInst.g.cs index 6975d19..5f819bb 100644 --- a/MEOS.NET/Types/Generated/TTextInst.g.cs +++ b/MEOS.NET/Types/TTextInst.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TText of subtype TInstant. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TTextSeq.g.cs b/MEOS.NET/Types/TTextSeq.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TTextSeq.g.cs rename to MEOS.NET/Types/TTextSeq.g.cs index 094ff77..3fbb9d2 100644 --- a/MEOS.NET/Types/Generated/TTextSeq.g.cs +++ b/MEOS.NET/Types/TTextSeq.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TText of subtype TSequence. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TTextSeqSet.g.cs b/MEOS.NET/Types/TTextSeqSet.g.cs similarity index 89% rename from MEOS.NET/Types/Generated/TTextSeqSet.g.cs rename to MEOS.NET/Types/TTextSeqSet.g.cs index c1c0f64..87e1064 100644 --- a/MEOS.NET/Types/Generated/TTextSeqSet.g.cs +++ b/MEOS.NET/Types/TTextSeqSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// A TText of subtype TSequenceSet. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/Temporal.g.cs b/MEOS.NET/Types/Temporal.g.cs similarity index 99% rename from MEOS.NET/Types/Generated/Temporal.g.cs rename to MEOS.NET/Types/Temporal.g.cs index bd46ec9..de1f82a 100644 --- a/MEOS.NET/Types/Generated/Temporal.g.cs +++ b/MEOS.NET/Types/Temporal.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// Superclass of every temporal type; temporal_* functions are late-bound over `subtype` and `temptype`. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Temporal/Boolean/TemporalBoolean.cs b/MEOS.NET/Types/Temporal/Boolean/TemporalBoolean.cs deleted file mode 100644 index de9c840..0000000 --- a/MEOS.NET/Types/Temporal/Boolean/TemporalBoolean.cs +++ /dev/null @@ -1,13 +0,0 @@ -using MEOS.NET.Functions; - -namespace MEOS.NET.Types.Temporal.Boolean -{ - public class TemporalBoolean : Temporal - { - internal TemporalBoolean(IntPtr ptr) : base(ptr) - { } - - public static TemporalBoolean FromMFJson(string mfJsonStr) - => new TemporalBoolean(Meos.TboolFromMfjson(mfJsonStr)); - } -} diff --git a/MEOS.NET/Types/Temporal/IInstanteable.cs b/MEOS.NET/Types/Temporal/IInstanteable.cs deleted file mode 100644 index a956206..0000000 --- a/MEOS.NET/Types/Temporal/IInstanteable.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace MEOS.NET.Types.Temporal -{ - public interface IInstanteable - { - TemporalInstant Instant { get; init; } - - public TBase Value(); - } -} - diff --git a/MEOS.NET/Types/Temporal/ISequenceSetable.cs b/MEOS.NET/Types/Temporal/ISequenceSetable.cs deleted file mode 100644 index 49c8da7..0000000 --- a/MEOS.NET/Types/Temporal/ISequenceSetable.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MEOS.NET.Types.Temporal -{ - public interface ISequenceSetable - { - TemporalSequenceSet SequenceSet { get; init; } - } -} - diff --git a/MEOS.NET/Types/Temporal/ISequenceable.cs b/MEOS.NET/Types/Temporal/ISequenceable.cs deleted file mode 100644 index 1711308..0000000 --- a/MEOS.NET/Types/Temporal/ISequenceable.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MEOS.NET.Types.Temporal -{ - public interface ISequenceable - { - TemporalSequence Sequence { get; init; } - } -} - diff --git a/MEOS.NET/Types/Temporal/ITemporallyComparable.cs b/MEOS.NET/Types/Temporal/ITemporallyComparable.cs deleted file mode 100644 index 46c24ed..0000000 --- a/MEOS.NET/Types/Temporal/ITemporallyComparable.cs +++ /dev/null @@ -1,13 +0,0 @@ -using MEOS.NET.Types.Temporal.Boolean; - -namespace MEOS.NET.Types.Temporal -{ - public interface ITemporallyComparable - { - TemporalBoolean TemporalLessThan(T other); - TemporalBoolean TemporalLessThanOrEqualTo(T other); - TemporalBoolean TemporalGreaterThan(T other); - TemporalBoolean TemporalGreaterThanOrEqualTo(T other); - } -} - diff --git a/MEOS.NET/Types/Temporal/ITemporallyEquatable.cs b/MEOS.NET/Types/Temporal/ITemporallyEquatable.cs deleted file mode 100644 index 692824c..0000000 --- a/MEOS.NET/Types/Temporal/ITemporallyEquatable.cs +++ /dev/null @@ -1,10 +0,0 @@ -using MEOS.NET.Types.Temporal.Boolean; - -namespace MEOS.NET.Types.Temporal -{ - public interface ITemporallyEquatable - { - TemporalBoolean TemporalEqual(T other); - TemporalBoolean TemporalNotEqual(T other); - } -} \ No newline at end of file diff --git a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloat.cs b/MEOS.NET/Types/Temporal/Number/Float/TemporalFloat.cs deleted file mode 100644 index 8e5ecd2..0000000 --- a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloat.cs +++ /dev/null @@ -1,298 +0,0 @@ -using MEOS.NET.Enums; -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Types.Collections.Float; -using MEOS.NET.Types.Temporal.Boolean; -using MEOS.NET.Types.Temporal.Number.Integer; - -namespace MEOS.NET.Types.Temporal.Number.Float -{ - public class TemporalFloat : TemporalNumber, - ITemporallyEquatable, ITemporallyEquatable, - ITemporallyComparable, ITemporallyComparable - { - internal TemporalFloat(IntPtr ptr) : base(ptr) - { } - - public static TemporalFloat FromBaseTemporal(Temporal temporal, double value) - { - var res = Meos.TfloatFromBaseTemp(value, temporal._ptr); - return new TemporalFloat(res); - } - - public static TemporalFloat FromString(string input) - { - var res = Meos.TfloatIn(input); - return new TemporalFloatInstant(res); - } - - public static TemporalFloat FromMFJson(string mfJsonStr) - => new TemporalFloat(Meos.TfloatFromMfjson(mfJsonStr)); - - public string Format(int maxDecimals) - => Meos.TfloatOut(this._ptr, maxdd: maxDecimals); - - public override string ToString() - => this.Format(15); - - public TemporalInteger ToTemporalInteger() - { - if (this.Interpolation() == InterpolationType.Linear) - { - throw new InvalidOperationException("Cannot convert a temporal float with linear" + - "interpolation to a temporal integer."); - } - - var res = Meos.TfloatToTint(this._ptr); - return new TemporalInteger(res); - } - - public FloatSpan ToFloatSpan() - { - var res = Meos.TnumberToSpan(this._ptr); - return new FloatSpan(res); - } - - public FloatSpanSet ToFloatSpanSet() - { - var res = Meos.TnumberValuespans(this._ptr); - return new FloatSpanSet(res); - } - - public double StartValue() - => Meos.TfloatStartValue(this._ptr); - - public double EndValue() - => Meos.TfloatEndValue(this._ptr); - - public double MinValue() - => Meos.TfloatMinValue(this._ptr); - - public double MaxValue() - => Meos.TfloatMaxValue(this._ptr); - - public FloatSet ToFloatSet() - { - var values = Meos.TfloatValues(this._ptr); - return FloatSet.FromValues(values); - } - - public bool IsAlwaysLessThan(double value) - => (Meos.AlwaysLtTfloatFloat(this._ptr, value) != 0); - - public bool IsAlwaysLessThanOrEqualTo(double value) - => (Meos.AlwaysLeTfloatFloat(this._ptr, value) != 0); - - public bool IsAlwaysEqualTo(double value) - => (Meos.AlwaysEqTfloatFloat(this._ptr, value) != 0); - - public bool IsEverLessThan(double value) - => (Meos.EverLtTfloatFloat(this._ptr, value) != 0); - - public bool IsEverLessThanOrEqualTo(double value) - => (Meos.EverLeTfloatFloat(this._ptr, value) != 0); - - public bool IsEverEqualTo(double value) - => (Meos.EverEqTfloatFloat(this._ptr, value) != 0); - - public TemporalBoolean TemporalEqual(int other) - => this.TemporalEqual((double)other); - - public TemporalBoolean TemporalNotEqual(int other) - => this.TemporalNotEqual((double)other); - - public TemporalBoolean TemporalEqual(double other) - { - var res = Meos.TeqTfloatFloat(this._ptr, other); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalNotEqual(double other) - { - var res = Meos.TneTfloatFloat(this._ptr, other); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalLessThan(double other) - { - var res = Meos.TltTfloatFloat(this._ptr, other); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalLessThanOrEqualTo(double other) - { - var res = Meos.TleTfloatFloat(this._ptr, other); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalGreaterThan(double other) - { - var res = Meos.TgtTfloatFloat(this._ptr, other); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalGreaterThanOrEqualTo(double other) - { - var res = Meos.TgeTfloatFloat(this._ptr, other); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalLessThan(int other) - => this.TemporalLessThan((double)other); - - public TemporalBoolean TemporalLessThanOrEqualTo(int other) - => this.TemporalLessThanOrEqualTo((double)other); - - public TemporalBoolean TemporalGreaterThan(int other) - => this.TemporalGreaterThan((double)other); - - public TemporalBoolean TemporalGreaterThanOrEqualTo(int other) - => this.TemporalGreaterThanOrEqualTo((double)other); - - public TemporalFloat At(double value) - { - var res = Meos.TfloatAtValue(this._ptr, value); - return new TemporalFloat(res); - } - - public TemporalFloat At(int value) - => this.At((double)value); - - public double ValueAtTimestamp(DateTime timestamp) - { - var res = AllocHelper.AllocatePointer(sizeof(double), (resultPtr) => - { - var successful = (Meos.TfloatValueAtTimestamptz(this._ptr, timestamp.ToPgTimestamp(), strict: true, resultPtr)); - return successful ? resultPtr.ToStructure() : default; - }); - - if (!res.HasValue) - { - throw new InvalidOperationException("Cannot retrieve value at a timestamp that does not exist in the current context."); - } - - return res.Value; - } - - public TemporalFloat Derivative() - { - var res = Meos.TemporalDerivative(this._ptr); - return new TemporalFloat(res); - } - - public TemporalFloat ToDegrees(bool normalize = true) - { - var res = Meos.TfloatDegrees(this._ptr, normalize); - return new TemporalFloat(res); - } - - public TemporalFloat ToRadians() - { - var res = Meos.TfloatRadians(this._ptr); - return new TemporalFloat(res); - } - - public TemporalFloat Round(int maxDecimals = 0) - { - var res = Meos.TemporalRound(this._ptr, maxdd: maxDecimals); - return new TemporalFloat(res); - } - - public TemporalFloat Shift(double delta) - { - var res = Meos.TfloatShiftValue(this._ptr, delta); - return new TemporalFloat(res); - } - - public TemporalFloat Scale(double width) - { - var res = Meos.TfloatScaleValue(this._ptr, width); - return new TemporalFloat(res); - } - - public TemporalFloat ShiftScale(double delta, double width) - { - var res = Meos.TfloatShiftScaleValue(this._ptr, delta, width); - return new TemporalFloat(res); - } - - public TemporalFloat Add(int value) - => this.Add((double)value); - - public TemporalFloat Add(double value) - { - var res = Meos.AddTfloatFloat(this._ptr, value); - return new TemporalFloat(res); - } - - public TemporalFloat Minus(int value) - => this.Minus((double)value); - - public TemporalFloat Minus(double value) - { - var res = Meos.SubTfloatFloat(this._ptr, value); - return new TemporalFloat(res); - } - - public TemporalFloat Multiply(int value) - => this.Multiply((double)value); - - public TemporalFloat Multiply(double value) - { - var res = Meos.MulTfloatFloat(this._ptr, value); - return new TemporalFloat(res); - } - - public TemporalFloat Divide(int value) - => this.Divide((double)value); - - public TemporalFloat Divide(double value) - { - var res = Meos.DivTfloatFloat(this._ptr, value); - return new TemporalFloat(res); - } - - public TemporalFloat DistanceTo(double other) - { - var res = Meos.TdistanceTfloatFloat(this._ptr, other); - return new TemporalFloat(res); - } - - public TemporalFloat DistanceTo(int other) - => this.DistanceTo((double)other); - - public double NearestApproachDistance(TemporalFloat other) - => Meos.NadTfloatTfloat(this._ptr, other._ptr); - - public double NearestApproachDistance(double other) - => Meos.NadTfloatFloat(this._ptr, other); - - public double NearestApproachDistance(int other) - => this.NearestApproachDistance((double)other); - - public static TemporalFloat operator +(TemporalFloat tFloat, int number) - => tFloat.Add(number); - - public static TemporalFloat operator +(TemporalFloat tFloat, double number) - => tFloat.Add(number); - - public static TemporalFloat operator -(TemporalFloat tFloat, int number) - => tFloat.Minus(number); - - public static TemporalFloat operator -(TemporalFloat tFloat, double number) - => tFloat.Minus(number); - - public static TemporalFloat operator *(TemporalFloat tFloat, int number) - => tFloat.Multiply(number); - - public static TemporalFloat operator *(TemporalFloat tFloat, double number) - => tFloat.Multiply(number); - - public static TemporalFloat operator /(TemporalFloat tFloat, int number) - => tFloat.Divide(number); - - public static TemporalFloat operator /(TemporalFloat tFloat, double number) - => tFloat.Divide(number); - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatInstant.cs b/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatInstant.cs deleted file mode 100644 index f5e6036..0000000 --- a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatInstant.cs +++ /dev/null @@ -1,26 +0,0 @@ -using MEOS.NET.Helpers; -using MEOS.NET.Functions; - -namespace MEOS.NET.Types.Temporal.Number.Float -{ - public class TemporalFloatInstant : TemporalFloat, IInstanteable - { - public TemporalInstant Instant { get; init; } - - internal TemporalFloatInstant(IntPtr ptr) : base(ptr) - => this.Instant = new TemporalInstant(ptr); - - public static new TemporalFloatInstant FromString(string input) - => (TemporalFloatInstant)TemporalFloat.FromString(input); - - public static TemporalFloatInstant FromTimestamp(DateTime timestamp, double value) - { - var res = Meos.TfloatinstMake(value, timestamp.ToPgTimestamp()); - return new TemporalFloatInstant(res); - } - - public double Value() - => Meos.TfloatStartValue(this._ptr); - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatInstantExtensions.cs b/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatInstantExtensions.cs deleted file mode 100644 index 014679b..0000000 --- a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatInstantExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace MEOS.NET.Types.Temporal.Number.Float -{ - public static class TemporalFloatInstantExtensions - { - public static DateTime Timestamp(this IInstanteable floatInstant) - => floatInstant.Instant.Timestamp(); - - public static IEnumerable TimestampAsEnumerable(this IInstanteable floatInstant) - => floatInstant.Instant.TimestampAsEnumerable(); - - public static IEnumerable> ToEnumerable(this IInstanteable floatInstant) - => floatInstant.Instant.ToEnumerable(); - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequence.cs b/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequence.cs deleted file mode 100644 index 7d3d661..0000000 --- a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequence.cs +++ /dev/null @@ -1,27 +0,0 @@ -using MEOS.NET.Enums; -using MEOS.NET.Functions; -using MEOS.NET.Types.Collections.Time.Timestamp; - -namespace MEOS.NET.Types.Temporal.Number.Float -{ - public class TemporalFloatSequence : TemporalFloat, ISequenceable - { - public TemporalSequence Sequence { get; init; } - - internal TemporalFloatSequence(IntPtr ptr) : base(ptr) - => this.Sequence = new TemporalSequence(ptr); - - public static TemporalFloatSequence FromTimestampSet(TimestampTzSet tsTzSet, double value) - { - var res = Meos.TfloatseqFromBaseTstzset(value, tsTzSet._ptr); - return new TemporalFloatSequence(res); - } - - public static TemporalFloatSequence FromTimestampSpan(TimestampTzSpan tsTzSpan, double value, InterpolationType interpolation = InterpolationType.None) - { - var res = Meos.TfloatseqFromBaseTstzspan(value, tsTzSpan._ptr, (int)interpolation); - return new TemporalFloatSequence(res); - } - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceExtensions.cs b/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceExtensions.cs deleted file mode 100644 index 2c47952..0000000 --- a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MEOS.NET.Types.Temporal.Number.Float -{ - public class TemporalFloatSequenceExtensions - { - // TODO : Implement extension methods for float sequence - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceSet.cs b/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceSet.cs deleted file mode 100644 index ea92481..0000000 --- a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceSet.cs +++ /dev/null @@ -1,21 +0,0 @@ -using MEOS.NET.Enums; -using MEOS.NET.Functions; -using MEOS.NET.Types.Collections.Time.Timestamp; - -namespace MEOS.NET.Types.Temporal.Number.Float -{ - public class TemporalFloatSequenceSet : TemporalFloat, ISequenceSetable - { - public TemporalSequenceSet SequenceSet { get; init; } - - internal TemporalFloatSequenceSet(IntPtr ptr) : base(ptr) - => this.SequenceSet = new TemporalSequenceSet(ptr); - - public static TemporalFloatSequenceSet FromTimestampSpanSet(TimestampTzSpanSet tsTzSpanSet, double value, InterpolationType interpolation = InterpolationType.None) - { - var res = Meos.TfloatseqsetFromBaseTstzspanset(value, tsTzSpanSet._ptr, (int)interpolation); - return new TemporalFloatSequenceSet(res); - } - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceSetExtensions.cs b/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceSetExtensions.cs deleted file mode 100644 index dc12d05..0000000 --- a/MEOS.NET/Types/Temporal/Number/Float/TemporalFloatSequenceSetExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MEOS.NET.Types.Temporal.Number.Float -{ - public static class TemporalFloatSequenceSetExtensions - { - // TODO : Implement extension methods for float sequence set - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/Integer/TemporalInteger.cs b/MEOS.NET/Types/Temporal/Number/Integer/TemporalInteger.cs deleted file mode 100644 index f050d51..0000000 --- a/MEOS.NET/Types/Temporal/Number/Integer/TemporalInteger.cs +++ /dev/null @@ -1,38 +0,0 @@ -using MEOS.NET.Functions; - -namespace MEOS.NET.Types.Temporal.Number.Integer -{ - public class TemporalInteger : Temporal - { - internal TemporalInteger(IntPtr ptr) : base(ptr) - { } - - public TemporalInteger Shift(int delta) - { - var res = Meos.TintShiftValue(this._ptr, delta); - return new TemporalInteger(res); - } - - public TemporalInteger Scale(int width) - { - var res = Meos.TintScaleValue(this._ptr, width); - return new TemporalInteger(res); - } - - public TemporalInteger ShiftScale(int delta, int width) - { - var res = Meos.TintShiftScaleValue(this._ptr, delta, width); - return new TemporalInteger(res); - } - - public TemporalInteger Add(int value) - { - var res = Meos.AddTintInt(this._ptr, value); - return new TemporalInteger(res); - } - - public static TemporalInteger operator +(TemporalInteger tInteger, int number) - => tInteger.Add(number); - } -} - diff --git a/MEOS.NET/Types/Temporal/Number/TemporalNumber.cs b/MEOS.NET/Types/Temporal/Number/TemporalNumber.cs deleted file mode 100644 index aeaf442..0000000 --- a/MEOS.NET/Types/Temporal/Number/TemporalNumber.cs +++ /dev/null @@ -1,217 +0,0 @@ -using MEOS.NET.Functions; -using MEOS.NET.Types.Boxes; -using MEOS.NET.Types.Collections; -using MEOS.NET.Types.Collections.Float; -using MEOS.NET.Types.Collections.Integer; -using MEOS.NET.Types.Temporal.Number.Float; - -namespace MEOS.NET.Types.Temporal.Number -{ - public class TemporalNumber : Temporal - { - internal TemporalNumber(IntPtr ptr) : base(ptr) - { } - - private TemporalNumber At(Set set) - { - var res = Meos.TemporalAtValues(this._ptr, set._ptr); - return new TemporalNumber(res); - } - - private TemporalNumber At(Span span) - { - var res = Meos.TnumberAtSpan(this._ptr, span._ptr); - return new TemporalNumber(res); - } - - private TemporalNumber At(SpanSet spanSet) - { - var res = Meos.TnumberAtSpanset(this._ptr, spanSet._ptr); - return new TemporalNumber(res); - } - - private TemporalNumber Minus(Set set) - { - var res = Meos.TemporalMinusValues(this._ptr, set._ptr); - return new TemporalNumber(res); - } - - private TemporalNumber Minus(Span span) - { - var res = Meos.TnumberMinusSpan(this._ptr, span._ptr); - return new TemporalNumber(res); - } - - private TemporalNumber Minus(SpanSet spanSet) - { - var res = Meos.TnumberMinusSpanset(this._ptr, spanSet._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber At(FloatSet set) - => this.At(set as Set); - - public TemporalNumber At(IntegerSet set) - => this.At(set as Set); - - public TemporalNumber At(FloatSpan span) - => this.At(span as Span); - - public TemporalNumber At(IntegerSpan span) - => this.At(span as Span); - - public TemporalNumber At(FloatSpanSet spanSet) - => this.At(spanSet as SpanSet); - - public TemporalNumber At(IntegerSpanSet spanSet) - => this.At(spanSet as SpanSet); - - public TemporalNumber At(TemporalBox box) - { - var res = Meos.TnumberAtTbox(this._ptr, box._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber Minus(FloatSet set) - => this.Minus(set as Set); - - public TemporalNumber Minus(IntegerSet set) - => this.Minus(set as Set); - - public TemporalNumber Minus(FloatSpan span) - => this.Minus(span as Span); - - public TemporalNumber Minus(IntegerSpan span) - => this.Minus(span as Span); - - public TemporalNumber Minus(FloatSpanSet spanSet) - => this.Minus(spanSet as SpanSet); - - public TemporalNumber Minus(IntegerSpanSet spanSet) - => this.Minus(spanSet as SpanSet); - - public TemporalNumber Minus(TemporalBox box) - { - var res = Meos.TnumberMinusTbox(this._ptr, box._ptr); - return new TemporalNumber(res); - } - - public TemporalBox BoundingBox() - { - var res = Meos.TnumberToTbox(this._ptr); - return new TemporalBox(res); - } - - public double Integral() - => Meos.TnumberIntegral(this._ptr); - - public double TimeWeightedAverage() - => Meos.TnumberTwavg(this._ptr); - - public bool IsLeftOf(TemporalBox other) - => this.BoundingBox().IsLeftOf(other); - - public bool IsLeftOf(TemporalNumber other) - => this.BoundingBox().IsLeftOf(other); - - public bool IsOverOrLeftOf(TemporalBox other) - => this.BoundingBox().IsOverOrLeftOf(other); - - public bool IsOverOrLeftOf(TemporalNumber other) - => this.BoundingBox().IsOverOrLeftOf(other); - - public bool IsRightOf(TemporalBox other) - => this.BoundingBox().IsRightOf(other); - - public bool IsRightOf(TemporalNumber other) - => this.BoundingBox().IsRightOf(other); - - public bool IsOverOrRightOf(TemporalBox other) - => this.BoundingBox().IsOverOrRightOf(other); - - public bool IsOverOrRightOf(TemporalNumber other) - => this.BoundingBox().IsOverOrRightOf(other); - - public TemporalNumber Add(TemporalNumber other) - { - var res = Meos.AddTnumberTnumber(this._ptr, other._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber Minus(TemporalNumber other) - { - var res = Meos.SubTnumberTnumber(this._ptr, other._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber Multiply(TemporalNumber other) - { - var res = Meos.MulTnumberTnumber(this._ptr, other._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber Divide(TemporalNumber other) - { - var res = Meos.DivTnumberTnumber(this._ptr, other._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber Absolute() - { - var res = Meos.TnumberAbs(this._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber Delta() - { - var res = Meos.TnumberDeltaValue(this._ptr); - return new TemporalNumber(res); - } - - public TemporalNumber DistanceTo(TemporalNumber other) - { - var res = Meos.TdistanceTnumberTnumber(this._ptr, other._ptr); - return new TemporalNumber(res); - } - - public double NearestApproachDistance(TemporalNumber other) - => Meos.NadTfloatTfloat(this._ptr, other._ptr); - - public double NearestApproachDistance(TemporalBox other) - => Meos.NadTnumberTbox(this._ptr, other._ptr); - - public static TemporalNumber operator /(TemporalNumber tNumber1, TemporalNumber tNumber2) - => tNumber1.Divide(tNumber2); - - public static TemporalNumber operator *(TemporalNumber tNumber1, TemporalNumber tNumber2) - => tNumber1.Multiply(tNumber2); - - public static TemporalNumber operator +(TemporalNumber tNumber1, TemporalNumber tNumber2) - => tNumber1.Add(tNumber2); - - public static TemporalNumber operator -(TemporalNumber tNumber1, TemporalNumber tNumber2) - => tNumber1.Minus(tNumber2); - - public static TemporalNumber operator -(TemporalNumber tNumber, FloatSet set) - => tNumber.Minus(set); - - public static TemporalNumber operator -(TemporalNumber tNumber, IntegerSet set) - => tNumber.Minus(set); - - public static TemporalNumber operator -(TemporalNumber tNumber, FloatSpan span) - => tNumber.Minus(span); - - public static TemporalNumber operator -(TemporalNumber tNumber, IntegerSpan span) - => tNumber.Minus(span); - - public static TemporalNumber operator -(TemporalNumber tNumber, FloatSpanSet spanSet) - => tNumber.Minus(spanSet); - - public static TemporalNumber operator -(TemporalNumber tNumber, IntegerSpanSet spanSet) - => tNumber.Minus(spanSet); - - public static TemporalNumber operator -(TemporalNumber tNumber, TemporalBox box) - => tNumber.Minus(box); - } -} - diff --git a/MEOS.NET/Types/Temporal/Temporal.cs b/MEOS.NET/Types/Temporal/Temporal.cs deleted file mode 100644 index e7ff996..0000000 --- a/MEOS.NET/Types/Temporal/Temporal.cs +++ /dev/null @@ -1,164 +0,0 @@ -using MEOS.NET.Enums; -using MEOS.NET.Errors; -using MEOS.NET.Exceptions; -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Types.General; -using MEOS.NET.Types.Collections.Time.Timestamp; -using MEOS.NET.Types.Temporal.Boolean; - -namespace MEOS.NET.Types.Temporal -{ - public class Temporal : MEOSObject, ITemporallyEquatable, ITemporallyComparable - { - internal Temporal(IntPtr ptr) : base(ptr) - { } - - // MEOS 1.3 split mfjson parsing per subtype: tbool_from_mfjson, - // tint_from_mfjson, tfloat_from_mfjson, ttext_from_mfjson, - // tgeogpoint_from_mfjson. The previously-generic - // temporal_from_mfjson(mfjson) no longer exists in MEOS; the new - // temporal_from_mfjson(mfjson, meosType) requires the temptype enum - // at the call site. Provide the typed factories on each subclass - // (TemporalBoolean.FromMFJson, TemporalFloat.FromMFJson, ...) - // rather than a generic Temporal.FromMFJson that can't pick a - // subtype from the JSON content alone. - - public TemporalBoolean TemporalEqual(Temporal other) - { - var res = Meos.TeqTemporalTemporal(this._ptr, other._ptr); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalNotEqual(Temporal other) - { - var res = Meos.TneTemporalTemporal(this._ptr, other._ptr); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalGreaterThan(Temporal other) - { - var res = Meos.TgtTemporalTemporal(this._ptr, other._ptr); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalGreaterThanOrEqualTo(Temporal other) - { - var res = Meos.TgeTemporalTemporal(this._ptr, other._ptr); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalLessThan(Temporal other) - { - var res = Meos.TltTemporalTemporal(this._ptr, other._ptr); - return new TemporalBoolean(res); - } - - public TemporalBoolean TemporalLessThanOrEqualTo(Temporal other) - { - var res = Meos.TleTemporalTemporal(this._ptr, other._ptr); - return new TemporalBoolean(res); - } - - public Temporal Copy() - { - var res = Meos.TemporalCopy(this._ptr); - return new Temporal(res); - } - - public Temporal Minus(DateTime timestamp) - { - var res = Meos.TemporalMinusTimestamptz(this._ptr, timestamp.ToPgTimestamp()); - return new Temporal(res); - } - - public Temporal Minus(TimestampTzSet tsTzSet) - { - var res = Meos.TemporalMinusTstzset(this._ptr, tsTzSet._ptr); - return new Temporal(res); - } - - public Temporal Minus(TimestampTzSpan tsTzSpan) - { - var res = Meos.TemporalMinusTstzspan(this._ptr, tsTzSpan._ptr); - return new Temporal(res); - } - - public Temporal Minus(TimestampTzSpanSet tsTzSpanSet) - { - var res = Meos.TemporalMinusTstzspanset(this._ptr, tsTzSpanSet._ptr); - return new Temporal(res); - } - - public Temporal At(DateTime timestamp) - { - var res = Meos.TemporalAtTimestamptz(this._ptr, timestamp.ToPgTimestamp()); - return new Temporal(res); - } - - public Temporal At(TimestampTzSet tsTzSet) - { - var res = Meos.TemporalAtTstzset(this._ptr, tsTzSet._ptr); - return new Temporal(res); - } - - public Temporal At(TimestampTzSpan tsTzSpan) - { - var res = Meos.TemporalAtTstzspan(this._ptr, tsTzSpan._ptr); - return new Temporal(res); - } - - public Temporal At(TimestampTzSpanSet tsTzSpanSet) - { - var res = Meos.TemporalAtTstzspanset(this._ptr, tsTzSpanSet._ptr); - return new Temporal(res); - } - - public string ToMfJSON(bool boundingBox = true, int flags = 3, int precision = 6, string srs = "") - => Meos.TemporalAsMfjson(this._ptr, boundingBox, flags, precision, srs); - - public TimestampTzSpan BoundingBox() - { - var res = Meos.TemporalToTstzspan(this._ptr); - return new TimestampTzSpan(res); - } - - public InterpolationType Interpolation() - { - // temporal_interp names one of the interpolations MEOS defines, out of - // its own static table, so the name is there for every temporal value. - var interpolationStr = Meos.TemporalInterp(this._ptr) - ?? throw new MEOSInternalErrorException( - (int)MEOSErrorCodes.InternalError, - MEOSErrorCodes.InternalError, - "MEOS named no interpolation for this temporal value"); - return EnumConverter.InterpolationTypeFromString(interpolationStr); - } - - public TimestampTzSpanSet Time() - { - var res = Meos.TemporalTime(this._ptr); - return new TimestampTzSpanSet(res); - } - - public string Duration(bool ignoreGaps = false) - { - var res = Meos.TemporalDuration(this._ptr, ignoreGaps); - return Meos.IntervalOut(res); - } - - public TimestampTzSpan TimeSpan() - { - var res = Meos.TemporalToTstzspan(this._ptr); - return new TimestampTzSpan(res); - } - - public TimestampTzSpan ToTimestampTzSpan() - => this.TimeSpan(); - - public int InstantsCount() - => Meos.TemporalNumInstants(this._ptr); - - // TODO : Implement other, generic, temporal methods - } -} diff --git a/MEOS.NET/Types/Temporal/TemporalInstant.cs b/MEOS.NET/Types/Temporal/TemporalInstant.cs deleted file mode 100644 index 971b1dd..0000000 --- a/MEOS.NET/Types/Temporal/TemporalInstant.cs +++ /dev/null @@ -1,40 +0,0 @@ -using MEOS.NET.Helpers; -using MEOS.NET.Functions; -using MEOS.NET.Structures; - -namespace MEOS.NET.Types.Temporal -{ - public class TemporalInstant : Temporal - { - public TemporalInstant(IntPtr ptr) : base(ptr) - { } - - public DateTime Timestamp() - { - var timestamps = Meos.TemporalTimestamps(this._ptr); - - if (timestamps.Length != 1) - { - throw new InvalidOperationException("The number of elements in the array of instants should be 1 for a single instant."); - } - - return new TimestampTz { Time = timestamps[0] }.ToDateTime(); - } - - public IEnumerable TimestampAsEnumerable() - { - return new List - { - this.Timestamp(), - }; - } - - public IEnumerable> ToEnumerable() - { - return new List> - { - this, - }; - } - } -} diff --git a/MEOS.NET/Types/Temporal/TemporalSequence.cs b/MEOS.NET/Types/Temporal/TemporalSequence.cs deleted file mode 100644 index 9e2bc7f..0000000 --- a/MEOS.NET/Types/Temporal/TemporalSequence.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace MEOS.NET.Types.Temporal -{ - public class TemporalSequence : Temporal - { - public TemporalSequence(IntPtr ptr) : base(ptr) - { } - - // TODO : Sequence methods - } -} diff --git a/MEOS.NET/Types/Temporal/TemporalSequenceSet.cs b/MEOS.NET/Types/Temporal/TemporalSequenceSet.cs deleted file mode 100644 index faf6a8f..0000000 --- a/MEOS.NET/Types/Temporal/TemporalSequenceSet.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace MEOS.NET.Types.Temporal -{ - public class TemporalSequenceSet : Temporal - { - internal TemporalSequenceSet(IntPtr ptr) : base(ptr) - { } - - // TODO : Sequence set methods - } -} diff --git a/MEOS.NET/Types/Generated/TextSet.g.cs b/MEOS.NET/Types/TextSet.g.cs similarity index 95% rename from MEOS.NET/Types/Generated/TextSet.g.cs rename to MEOS.NET/Types/TextSet.g.cs index 657c084..4bbfb5a 100644 --- a/MEOS.NET/Types/Generated/TextSet.g.cs +++ b/MEOS.NET/Types/TextSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TextSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TsTzSet.g.cs b/MEOS.NET/Types/TsTzSet.g.cs similarity index 96% rename from MEOS.NET/Types/Generated/TsTzSet.g.cs rename to MEOS.NET/Types/TsTzSet.g.cs index c783421..937f2ec 100644 --- a/MEOS.NET/Types/Generated/TsTzSet.g.cs +++ b/MEOS.NET/Types/TsTzSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TsTzSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TsTzSpan.g.cs b/MEOS.NET/Types/TsTzSpan.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/TsTzSpan.g.cs rename to MEOS.NET/Types/TsTzSpan.g.cs index 5831265..00b26c7 100644 --- a/MEOS.NET/Types/Generated/TsTzSpan.g.cs +++ b/MEOS.NET/Types/TsTzSpan.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TsTzSpan class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/MEOS.NET/Types/Generated/TsTzSpanSet.g.cs b/MEOS.NET/Types/TsTzSpanSet.g.cs similarity index 97% rename from MEOS.NET/Types/Generated/TsTzSpanSet.g.cs rename to MEOS.NET/Types/TsTzSpanSet.g.cs index 77d5dec..d27013b 100644 --- a/MEOS.NET/Types/Generated/TsTzSpanSet.g.cs +++ b/MEOS.NET/Types/TsTzSpanSet.g.cs @@ -3,7 +3,7 @@ using MEOS.NET.Enums; using MEOS.NET.Functions; -namespace MEOS.NET.Types.Generated +namespace MEOS.NET.Types { /// The TsTzSpanSet class of the MEOS object model. [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "0.1.0")] diff --git a/tools/README.md b/tools/README.md index 967047c..ab04148 100644 --- a/tools/README.md +++ b/tools/README.md @@ -8,8 +8,9 @@ C name in PascalCase — `tfloat_in` reads `TfloatIn`, `meos_initialize` reads `MeosInitialize` — the spelling GoMEOS exports, so one rule serves the ecosystem rather than a per-binding invention. -`objectgen.py` regenerates `MEOS.NET/Types/Generated/*.g.cs` — the object -layer — from the same catalog's `objectModel`, which is the ecosystem-wide +`objectgen.py` regenerates `MEOS.NET/Types/*.g.cs` — the object layer — +and the error taxonomy under `MEOS.NET/Errors/` and `MEOS.NET/Exceptions/`, +from the same catalog's `objectModel`, which is the ecosystem-wide source of truth for the class hierarchy implicit in MEOS. This replaces the previous regex-based `MEOS.NET.Builder` workflow, which @@ -39,8 +40,7 @@ single-line-only regex, hardcoded developer DllPath). `MEOS.NET/Functions/` is rewritten with a binding for every MEOS function in the catalog, and -`MEOS.NET/Types/Generated/` is rewritten with one class per object-model -class. `--report` lists, per class, every method the object layer leaves +`MEOS.NET/Types/` is rewritten with one class per object-model class. `--report` lists, per class, every method the object layer leaves to the raw binding and why. ## DllPath diff --git a/tools/codegen.py b/tools/codegen.py index 0a7bbbe..281a751 100755 --- a/tools/codegen.py +++ b/tools/codegen.py @@ -209,6 +209,8 @@ def csharp_param_name(name: str) -> str: def gen_external_functions(funcs: list[dict]) -> str: lines: list[str] = [] + lines.append("#nullable enable") + lines.append("") lines.append("using System.CodeDom.Compiler;") lines.append("using System.Runtime.InteropServices;") lines.append("") @@ -539,6 +541,10 @@ def gen_exposed_functions(funcs: list[dict], header: str | None = None) -> str: sibling-accessor length emits a Marshal.Copy unpack; other shapes fall back to the IntPtr passthrough today.""" lines: list[str] = [] + # A `.g.cs` file sits outside the project's nullable context, so it declares + # its own; the wrappers over a borrowed string return `string?`. + lines.append("#nullable enable") + lines.append("") lines.append("using System.Runtime.InteropServices;") lines.append("") lines.append(f"namespace {NAMESPACE}") diff --git a/tools/objectgen.py b/tools/objectgen.py index 1dc482a..c5bdf83 100644 --- a/tools/objectgen.py +++ b/tools/objectgen.py @@ -18,7 +18,8 @@ Usage: python3 tools/objectgen.py path/to/meos-idl.json [--report] -Writes MEOS.NET/Types/Generated/*.g.cs, replacing that directory's contents. +Writes MEOS.NET/Types/*.g.cs, plus the error taxonomy under MEOS.NET/Errors + and MEOS.NET/Exceptions, replacing those directories. """ from __future__ import annotations @@ -33,7 +34,7 @@ import codegen GENERATOR_VERSION = "0.1.0" -NAMESPACE = "MEOS.NET.Types.Generated" +NAMESPACE = "MEOS.NET.Types" ERROR_NAMESPACE = "MEOS.NET.Errors" EXCEPTION_NAMESPACE = "MEOS.NET.Exceptions" @@ -423,7 +424,9 @@ def base_file(self) -> str: [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "{GENERATOR_VERSION}")] public abstract class MEOSObject {{ - internal IntPtr Ptr {{ get; }} + /// The MEOS value this object holds, for the functions on + /// that take it. + public IntPtr Ptr {{ get; }} internal MEOSObject(IntPtr ptr) => this.Ptr = ptr; }} @@ -615,8 +618,13 @@ def factory_file(self) -> str: " /// The discriminator is the struct field the catalog records, read at the", " /// offset the catalog's own field layout puts it at.", " /// ", + " /// ", + " /// This is the way back from a function on", + " /// , which answers the MEOS pointer,", + " /// into the object layer.", + " /// ", f' [System.CodeDom.Compiler.GeneratedCode("MEOS.NET.ObjectGen", "{GENERATOR_VERSION}")]', - " internal static class MEOSFactory", + " public static class MEOSFactory", " {", ] temptype_offset = self.m.struct_offset("Temporal", "temptype") @@ -647,7 +655,7 @@ def _wrap_method(self, root: str, discriminator, subtype_offset: int, lines = [ f" /// The value at as the {root}", f" /// class the model gives its runtime type.", - f" internal static {root}? Wrap{root}(IntPtr ptr)", + f" public static {root}? Wrap{root}(IntPtr ptr)", " {", " if (ptr == IntPtr.Zero)", " {", @@ -693,7 +701,7 @@ def _wrap_method(self, root: str, discriminator, subtype_offset: int, " }", "", f" /// Every element of a C array of {root} pointers, wrapped.", - f" internal static {root}?[] Wrap{root}Array(IntPtr[] ptrs)", + f" public static {root}?[] Wrap{root}Array(IntPtr[] ptrs)", " {", f" {root}?[] wrapped = new {root}?[ptrs.Length];", " for (int i = 0; i < ptrs.Length; i++)", @@ -768,7 +776,7 @@ def main() -> int: model = Model(idl) gen = Generator(model) repo_root = Path(__file__).resolve().parent.parent - gen.run(repo_root / "MEOS.NET" / "Types" / "Generated") + gen.run(repo_root / "MEOS.NET" / "Types") gen.run_errors(repo_root / "MEOS.NET" / "Errors", repo_root / "MEOS.NET" / "Exceptions")