#include "ObjectManagerTemplate.h"
Public Member Functions | |
| virtual | ~ObjectManagerTemplate () |
| bool | insert (const K &_key, V *_object) |
| Store the provided object for the given key. If there exists an entry for the given key the function will terminate. | |
| void | replace (const K &_key, V *_object) |
| Store the provided object for the given key. If there exists an entry for the given key the entry will be replaced. | |
| bool | contains (const K &_key) |
| Returns true if an entry exits for the given key. | |
| V *const | find (const K &_key) |
| Return stored pointer to object for the given key. Note that the Object Manager keeps the ownership. | |
| V * | grab (const K &_key) |
| Return stored pointer to object for the given key and remove from object manager. Note that the caller takes ownership. | |
| V *const | operator[] (const K &_key) |
| Return stored pointer to object for the given key. Note that the Object Manager keeps the ownership. | |
| K | Key type |
| V | Value/Object type |
|
inlinevirtual |
|
inline |
Returns true if an entry exits for the given key.
| _key | The key to check. |
| V *const ot::ObjectManagerTemplate< K, V >::find | ( | const K & | _key | ) |
Return stored pointer to object for the given key. Note that the Object Manager keeps the ownership.
| _key | The key to the object. |
| V * ot::ObjectManagerTemplate< K, V >::grab | ( | const K & | _key | ) |
Return stored pointer to object for the given key and remove from object manager. Note that the caller takes ownership.
| _key | The key to the object. |
| bool ot::ObjectManagerTemplate< K, V >::insert | ( | const K & | _key, |
| V * | _object ) |
Store the provided object for the given key. If there exists an entry for the given key the function will terminate.
| _object | Pointer to object to store (Object Manager takes ownership). |
| V *const ot::ObjectManagerTemplate< K, V >::operator[] | ( | const K & | _key | ) |
Return stored pointer to object for the given key. Note that the Object Manager keeps the ownership.
| _key | The key to the object. |
| void ot::ObjectManagerTemplate< K, V >::replace | ( | const K & | _key, |
| V * | _object ) |
Store the provided object for the given key. If there exists an entry for the given key the entry will be replaced.
| _object | Pointer to object to store (Object Manager takes ownership). |