File: ConstPointer.hx

package info (click to toggle)
haxe 1%3A3.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,464 kB
  • ctags: 9,612
  • sloc: ml: 83,200; ansic: 1,724; makefile: 473; java: 349; cs: 314; python: 250; sh: 43; cpp: 39; xml: 25
file content (41 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package cpp;

@:coreType @:include("cpp/Pointer.h") @:native("cpp.Pointer")
@:analyzer(no_simplification)
extern class ConstPointer<T>
{
   // ptr actually returns the pointer - not strictly a 'T' - for pointers to smart pointers
   // Use value or ref to get dereferenced value
	public var ptr:T;

   @:analyzer(no_simplification)
	public var value(get,never):T;
	public var raw(get,never):RawConstPointer<T>;

   @:analyzer(no_simplification)
   public function get_value() : T;

	public function lt(inOther:Pointer<T>):Bool;
	public function leq(inOther:Pointer<T>):Bool;
	public function gt(inOther:Pointer<T>):Bool;
	public function geq(inOther:Pointer<T>):Bool;

   public static function fromRaw<T>(ptr:RawConstPointer<T>) : ConstPointer<T>;

   public static function fromPointer<T>(inNativePointer:Dynamic) : ConstPointer<T>;

	public function reinterpret<Other>():Pointer<Other>;
	public function rawCast<Other>():RawPointer<Other>;

   @:analyzer(no_simplification)
	public function at(inIndex:Int):T;

	public function inc():ConstPointer<T>;
	public function dec():ConstPointer<T>;
   @:analyzer(no_simplification)
	public function postIncVal():T;
	public function incBy(inT:Int):ConstPointer<T>;
	public function add(inT:Int):ConstPointer<T>;

}