ConstPointer.hx 982 B

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