|
Saga
Saga Game Engine
|
Map that has Types as key. More...
#include <typemap.h>
Public Types | |
| typedef Map::iterator | iterator |
| typedef Map::const_iterator | const_iterator |
| typedef Map::value_type | value_type |
Public Member Functions | |
| const_iterator | begin () const |
| Return a const iterator to the beginning of this typemap. | |
| const_iterator | end () const |
| Return a const iterator to the end of this typemap. | |
| iterator | begin () |
| Return an iterator to the beginning of this typemap. | |
| iterator | end () |
| Return an iterator to the end of this typemap. | |
| template<class KeyType > | |
| iterator | find () |
| Find a type inside this map. | |
| template<class KeyType > | |
| const_iterator | find () const |
| Find a type inside this map. | |
| template<class KeyType > | |
| bool | hasKey () |
| Determine if the map already maps a type to some value. | |
| template<class KeyType > | |
| void | put (DataType &&data) |
| Place an item inside the map. If the map already contains this KeyType as a key, then replace the mapping to data. Otherwise, create a mapping between KeyType and data. | |
| template<class KeyType > | |
| int | getTypeId () |
| Generate a unique ID for a type. Any call to this with the same type will return the same value. | |
| int | size () |
| Determine the number of mappings this map has. | |
Map that has Types as key.
| DataType | the type of the value of the map. |
| typedef Map::const_iterator Saga::TypeMap< DataType >::const_iterator |
| typedef Map::iterator Saga::TypeMap< DataType >::iterator |
| typedef Map::value_type Saga::TypeMap< DataType >::value_type |
|
inline |
Return an iterator to the beginning of this typemap.
|
inline |
Return a const iterator to the beginning of this typemap.
|
inline |
Return an iterator to the end of this typemap.
|
inline |
Return a const iterator to the end of this typemap.
|
inline |
Find a type inside this map.
| KeyType | the type to find. |
|
inline |
Find a type inside this map.
| KeyType | the type to find. |
|
inline |
Generate a unique ID for a type. Any call to this with the same type will return the same value.
| KeyType | the type. |
|
inline |
Determine if the map already maps a type to some value.
| KeyType | the type to search for. |

|
inline |
Place an item inside the map. If the map already contains this KeyType as a key, then replace the mapping to data. Otherwise, create a mapping between KeyType and data.
| KeyType | the key used in the mapping. |
| data | that we map KeyType to. |
|
inline |
Determine the number of mappings this map has.