VirtualArray.hx 1.0 KB

123456789101112131415161718192021222324252627282930
  1. package cpp;
  2. extern class VirtualArray
  3. {
  4. function new() : Void;
  5. var length(get,null) : Int;
  6. // concat<T>( a:Array<T> ) : Array<T> ?
  7. function concat( a : VirtualArray ) : VirtualArray;
  8. function join( sep : String ) : String;
  9. function pop() : Dynamic;
  10. function push(x : Dynamic) : Int;
  11. function reverse() : Void;
  12. function shift() : Dynamic;
  13. function slice( pos : Int, ?end : Int ) : VirtualArray;
  14. function sort( f : Dynamic -> Dynamic -> Int ) : Void;
  15. function splice( pos : Int, len : Int ) : VirtualArray;
  16. function toString() : String;
  17. function unshift( x : Dynamic ) : Void;
  18. function insert( pos : Int, x : Dynamic ) : Void;
  19. function remove( x : Dynamic ) : Bool;
  20. function indexOf( x : Dynamic, ?fromIndex:Int ) : Int;
  21. function lastIndexOf( x : Dynamic, ?fromIndex:Int ) : Int;
  22. function copy() : VirtualArray;
  23. function iterator() : Iterator<Dynamic>;
  24. function map<S>( f : Dynamic -> S ) : VirtualArray;
  25. function filter( f : Dynamic -> Bool ) : VirtualArray;
  26. }