ConstPointer.hx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package cpp;
  2. @:coreType @:include("cpp/Pointer.h") @:native("cpp.Pointer")
  3. @:analyzer(no_simplification)
  4. extern class ConstPointer<T>
  5. {
  6. // ptr actually returns the pointer - not strictly a 'T' - for pointers to smart pointers
  7. // Use value or ref to get dereferenced value
  8. public var ptr:T;
  9. @:analyzer(no_simplification)
  10. public var value(get,never):T;
  11. public var raw(get,never):RawConstPointer<T>;
  12. @:analyzer(no_simplification)
  13. public function get_value() : T;
  14. public function lt(inOther:Pointer<T>):Bool;
  15. public function leq(inOther:Pointer<T>):Bool;
  16. public function gt(inOther:Pointer<T>):Bool;
  17. public function geq(inOther:Pointer<T>):Bool;
  18. public static function fromRaw<T>(ptr:RawConstPointer<T>) : ConstPointer<T>;
  19. public static function fromPointer<T>(inNativePointer:Dynamic) : ConstPointer<T>;
  20. public function reinterpret<Other>():Pointer<Other>;
  21. public function rawCast<Other>():RawPointer<Other>;
  22. @:analyzer(no_simplification)
  23. public function at(inIndex:Int):T;
  24. public function inc():ConstPointer<T>;
  25. public function dec():ConstPointer<T>;
  26. @:analyzer(no_simplification)
  27. public function postIncVal():T;
  28. public function incBy(inT:Int):ConstPointer<T>;
  29. public function add(inT:Int):ConstPointer<T>;
  30. }