|
luna engine
software engine
|
cached object memory class with a key handle. More...
#include <objectStorage.h>


Public Member Functions | |
| std::pair< storageResult, value > | operator[] (const storageObject &key) |
| objectStorage () | |
| deafault constructor whith default cache size of 200. More... | |
| objectStorage (size_t cacheSize) | |
| constructor with custom cache size. More... | |
| std::pair< storageResult, value > | putValue (storageObject *key, const value &_value) |
| puts a value in the object storage. More... | |
| std::pair< storageResult, value > | getValue (const storageObject &key, const value &_value=value()) |
| gets a value from the object storage. More... | |
| std::pair< storageResult, value > | setValue (const storageObject &key, const value &_value) |
| sets the value of a given key. More... | |
| std::pair< storageResult, value > | eraseValue (const storageObject &key) |
Private Attributes | |
| vectorCache< value > | objectCache |
| std::unordered_map< storageObject, value > | objectMemory |
cached object memory class with a key handle.
|
inline |
deafault constructor whith default cache size of 200.
|
inline |
constructor with custom cache size.
| size_t | cacheSize |
|
inline |
|
inline |
gets a value from the object storage.
| storageObject | key |
| value | _value |
|
inline |
|
inline |
puts a value in the object storage.
| storageObject* | key pointer to key |
| value | _value value/object to be stored. |
|
inline |
sets the value of a given key.
| storageObject | key |
| value | _value |
|
private |
|
private |