temporary data storage to avoid storing on disk More...
#include <mia/core/datapool.hh>
Public Member Functions | |
void | add (const std::string &key, boost::any value) |
void | clear () |
boost::any | get (const std::string &key) const |
boost::any | get_and_remove (const std::string &key) |
bool | has_key (const std::string &key) const |
bool | has_unused_data () const |
void | remove (const std::string &key) |
Static Public Member Functions | |
static CDatapool & | instance () |
temporary data storage to avoid storing on disk
This class implements a data storage pool as a singelton that can be used to store some data temporarly like if it would be stored on disk. Each IO plugin automatically defines an interface to store in and load from this pool. The extension, by which this behaviour is triggered is ".@".
add delete key function,
add automatic key generation
(maybe) all plugins that load data should load to the pool first to enable loading from temporarly generated data
Definition at line 48 of file datapool.hh.
void CDatapool::add | ( | const std::string & | key, |
boost::any | value | ||
) |
add some data to the pool, if the key already exists, the value is replaced
key | unique identifier |
value | value to be stored |
void CDatapool::clear | ( | ) |
Remove all stored data from the pool.
boost::any CDatapool::get | ( | const std::string & | key | ) | const |
key | key of data to be retrieved |
Referenced by TDelayedParameter< T >::get().
boost::any CDatapool::get_and_remove | ( | const std::string & | key | ) |
gets some data and remove this data from the pool
key | key of data to be retrieved |
bool CDatapool::has_key | ( | const std::string & | key | ) | const |
key |
Referenced by TDelayedParameter< T >::pool_has_key().
bool CDatapool::has_unused_data | ( | ) | const |
function to be used for debugging purpouses
|
static |
Referenced by TDelayedParameter< T >::get(), and TDelayedParameter< T >::pool_has_key().
void CDatapool::remove | ( | const std::string & | key | ) |
remove this data from the pool
key | key of data to be retrieved |