|
GameApi 28
Library used by GameApi Builder tool
|
Maps strings to Objects. More...
#include <chaiscript_prelude_docs.hpp>
Public Member Functions | |
| Range | range () |
| Returns an object that implements the Range concept for the Map_Pair's in this Map. | |
| Const_Range | range () const |
| Returns an object that implements the Const_Range concept for the Map_Pair's in this Map. | |
| int | size () const |
| Returns the number of elements in the Map. | |
| Object | operator[] (string) |
| Returns the item at the given key, creating an undefined Object if the key does not yet exist in the map. | |
| void | clear () |
| Clears the map of all items. | |
| int | count (string) const |
| Returns the number of items in the Map with the given key. Returns 0 or 1 since this is not an std::multimap. | |
| bool | empty () const |
| Returns true if the map contains no items. | |
Maps strings to Objects.
ChaiScript has a built in shortcut for generating Map objects:
Example:
Implemented as std::map<Boxed_Value>
| void ChaiScript_Language::Map::clear | ( | ) |
Clears the map of all items.
| int ChaiScript_Language::Map::count | ( | string | ) | const |
Returns the number of items in the Map with the given key. Returns 0 or 1 since this is not an std::multimap.
| bool ChaiScript_Language::Map::empty | ( | ) | const |
Returns true if the map contains no items.
Returns the item at the given key, creating an undefined Object if the key does not yet exist in the map.
| Range ChaiScript_Language::Map::range | ( | ) |
| Const_Range ChaiScript_Language::Map::range | ( | ) | const |
Returns an object that implements the Const_Range concept for the Map_Pair's in this Map.
| int ChaiScript_Language::Map::size | ( | ) | const |
Returns the number of elements in the Map.