Jump to content

apokroy

Members
  • Content Count

    3
  • Joined

  • Last visited

  • Days Won

    2

apokroy last won the day on June 23

apokroy had the most liked content!

Community Reputation

3 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Please look at https://github.com/apokroy/Ext.Types/blob/master/Source/Ext.Types.Date.pas
  2. Delphi bindings to libxml2 and libxslt libraries. One of the most important goals of the project is the cross-platform replacement of MSXML 6.0. Therefore, where possible, the library should follow the W3C DOM model, but compatibility with MSXML is a priority. Library For details, see readme on GITHUB https://github.com/apokroy/LX2 P.S. The library is still at an early stage of development, therefore, changes to the API are possible.
  3. Hello! Is there any way to overload operators for enumerations? I'm having fun trying to implement a Tri-State Boolean and Optional types, but I'm forced to use a record type for operators. Records look a bit ugly, have performance, RTTI and published properties issues ... Now, my code looks like this: TriBoolEnum = (Unknown, ExactFalse, ExactTrue); TriBoolSet = set of TriBoolEnum; TriBool = record private FValue: TriBoolEnum; public class operator Initialize(out Value: TriBool); class operator Implicit(const Value: Boolean): TriBool; static; inline; class operator Implicit(const Value: TriBool): Boolean; static; inline; class operator Implicit(const Value: TriBool): TriBoolEnum; static; inline; class operator Implicit(const Value: TriBoolEnum): TriBool; static; inline; class operator Equal(const L, R: TriBool): TriBool; static; inline; class operator Equal(const L: Boolean; R: TriBool): TriBool; static; inline; class operator Equal(const L: TriBool; R: Boolean): TriBool; static; inline; class operator LogicalOr(const L, R: TriBool): TriBool; static; inline; class operator LogicalOr(const L: Boolean; R: TriBool): TriBool; static; inline; class operator LogicalOr(const L: TriBool; R: Boolean): TriBool; static; inline; ... I want something like this: TriBool = (Unknown, ExactFalse, ExactTrue); TriBoolHelper = record helper for TriBool class operator ... It compiles, but overloading doesn't work. Thanks in advance.
×