beyondnet
beyondnet copied to clipboard
Kotlin To-Do's
- [x] Rename the class that encapsulates the JNA bindings to something like "CAPI" or "JNAAPI"
- [x] The native library name is currently hardcoded. I guess it should be derived from the target assembly name or from a build config value once automatic builds are supported. Oh it can't be derived from the target assembly because that's not the same as the native one so it must come from a config value. (added in https://github.com/royalapplications/beyondnet/commit/ec19a5c38fa5971e09d6b9a6b609ba321b9b0469)
- [ ] Ensure unsigned integers are handled correctly (see https://www.mkammerer.de/blog/jna-and-unsigned-integers/). NOTE: Tests suggest that everything works properly but I'm still not quite sure if it's correct.
- [x] Fix Nullability of method parameters (potentially also other cases)
- [x] Interfaces (added in https://github.com/royalapplications/beyondnet/commit/bac7635c0e3182258710793472d1fd1d02432782)
- [x] Casting/Type Checking (added in https://github.com/royalapplications/beyondnet/commit/facd6874b376bee2b77d44c4c7113a470f2513b6) The generic castAs/To functions use Java reflection which obviously is less than idea -> Fixed in https://github.com/royalapplications/beyondnet/commit/7df76ef2aa357efc9f3f9cbd3e52516d5d75de22)
- [x] Implement equality operators for DNObject. NOTE: As per https://kotlinlang.org/docs/operator-overloading.html#equality-and-inequality-operators identity checks (ie. === and !===) cannot be overridden so we can only implement/override equals (==, !=).
- [x] By ref arguments (added in https://github.com/royalapplications/beyondnet/commit/c1acdae14505a5a5c148394a8cf51e1d63a0a976)
- [x] Out parameter placeholders (like in Swift) (see
Memoryto allocate a temporary pointer; it's automatically freed when GCed) - [x] Boxing/Unboxing
- [x] Extension methods (added in https://github.com/royalapplications/beyondnet/commit/3666e8af0dd5e83e11bbc03821de9fb70d50e39c)
- [x] Arrays (added in https://github.com/royalapplications/beyondnet/commit/66ecb3887ea9073d3f7c8de5de6644249e04d301)
- [x] Get rid of reflection in Arrays (fixed in https://github.com/royalapplications/beyondnet/commit/04358b9f0167fe428ac3d01c04ff2fcfe814423f)
- [ ] Multidimensional Arrays
- [x] Add date conversion extension methods (added in https://github.com/royalapplications/beyondnet/commit/a3183731f7f6f3aab9637228e40555ea361928db)
- [x] Add Guid/UUID conversion extension methods (added in https://github.com/royalapplications/beyondnet/commit/54ec1c10f0ba75c187e00eeb5048b8d6f82f84f5)
- [x]
byte[]/sbyte[]->UByteArray/ByteArrayconversions (added in https://github.com/royalapplications/beyondnet/commit/6929f5aa1ae3ffce88235dae2b90ebd2c269ff2f) - [x]
UByteArray/ByteArray->byte[]/sbyte[]conversions (added in https://github.com/royalapplications/beyondnet/commit/90ffb4408aea7f201c0c34a35c8c927ab112d8c2) - [ ] Fix override issue (see https://github.com/royalapplications/beyondnet/commit/4f32c0a739ab75e8c03701be831d09cc3b23266d and https://github.com/royalapplications/beyondnet/commit/a208fa7a5f3c2d9c2d3292e9b516be68e5369b8c; seemingly related to Interfaces and Nullability; worked around for now with Kotlin-specific type/interface type excludes)
- [ ] ReadOnlySpanOfByte
- [x] Delegates
- [x] Extension methods
- [ ] Typealiases to restore namespace hierarchy
- [ ] Generate properties and fields as Kotlin properties instead of methods suffixed with _get/_set (WIP: Support for get-only properties was added in https://github.com/royalapplications/beyondnet/commit/b27cb6b0b78a4a1802661e0d37a95e26af13544a; Unfortunately for
varproperties I hit a roadblock. See kotlin-var-properties) - [x] Make documentation comments show up (fixed in https://github.com/royalapplications/beyondnet/commit/58cae50fe31464151958e46a7589d9493d2a638f)
- [ ] Automatic build support