19template <
class TObj,
class TKey = SStringA>
28 SCmnMap(
void (*funOnKeyRemoved)(
const TObj &) = NULL)
69 obj = (*m_mapNamedObj)[key];
98 (*m_mapNamedObj)[key] = obj;
112 (*m_mapNamedObj)[key] = obj;
148 typename SMap<TKey, TObj>::CPair *p =
m_mapNamedObj->GetNext(pos);
void RemoveAll()
Removes all key-object pairs from the map.
virtual ~SCmnMap()
Destructor.
bool GetKeyObject(const TKey &key, TObj &obj) const
Retrieves an object associated with a key.
SCmnMap(void(*funOnKeyRemoved)(const TObj &)=NULL)
Constructor.
void SetKeyObject(const TKey &key, const TObj &obj)
Sets an object for a key, replacing any existing object.
TObj & GetKeyObject(const TKey &key) const
Retrieves an object associated with a key.
SMap< TKey, TObj > * m_mapNamedObj
bool AddKeyObject(const TKey &key, const TObj &obj)
Adds a key-object pair to the map.
size_t GetCount()
Gets the number of key-object pairs in the map.
bool RemoveKeyObject(const TKey &key)
Removes a key-object pair from the map.
bool HasKey(const TKey &key) const
Checks if a key exists in the map.
void(* m_pFunOnKeyRemoved)(const TObj &obj)