CANCapture Scripting
|
Path: /sdk/add_on/scriptdictionary/
The dictionary object maps string values to values or objects of other types.
Register with RegisterScriptDictionary(asIScriptEngine*)
.
class dictionary { void set(const string &in key, ? &in value); bool get(const string &in value, ? &out value) const;
void set(const string &in key, int64 &in value); bool get(const string &in key, int64 &out value) const;
void set(const string &in key, double &in value); bool get(const string &in key, double &out value) const;
bool exists(const string &in key) const; void delete(const string &in key); void deleteAll(); }
dictionary dict; obj object; obj @handle;
dict.set("one", 1); dict.set("object", object); dict.set("handle", @handle);
if( dict.exists("one") ) { bool found = dict.get("handle", @handle); if( found ) { dict.delete("object"); } }
dict.deleteAll();