Angelscript addon Template Containers  1.0
STL container powerr for Angelscript
map
template<typename T_key,typename T_value> class map{
//default constructor
map();
//copy constructor
map(map &in other);
//operator=
map& opAssign(map &in other);
void SetDirectcomp(bool yesno);
int size();
void clear();
bool empty();
void insert(T_key &in key,T_value &in value);
void erase(T_key &in key);
bool contains(T_key &in key);
//find without success notice
T_value& find(const T_key &in key);
//find with success notice
T_value& find(const T_key &in key,bool &out success);
//property accessors for opIndex
const T_value& get_opIndex(const T_key &in) const;
void set_opIndex(const T_key&in,const T_value&in);
/*
example for opindex get:
mymap.insert(1,"aa");
mymap.insert(2,"bb");
MyPrint(mymap[1]);
//prints: aa
example for opindex set:
mymap[1] = "aa";
mymap[2] = "bb";
MyPrint(mymap[2]);
//prints: bb
*/
map_iterator<T> begin();
map_iterator<T> end();
bool erase(const map_iterator<T> &in iterator);
int erase(const map_iterator<T> &in iterator_range_begin, const map_iterator<T> &in iterator_range_end);
//find that returns an iterator, returns end if not found
map_iterator<T> find_iterator(const T &in key);
};