#include <Store.h>
Public Types | |
using | iterator = typename registry_type::iterator |
using | key_type = K |
using | name_type = N |
using | pimpl_type = I |
using | prep_type = Rep_type * |
using | registry_type = std::map< name_type, prep_type > |
using | Rep_type = rep_type< name_type, pimpl_type > |
Public Member Functions | |
auto | begin () |
void | clear () |
prep_type | create (const name_type &) |
prep_type | create (const name_type &, pimpl_type) |
auto | end () |
bool | isDefined (const name_type &n) const |
Store & | operator= (const Store &)=delete |
bool | readOnly () const |
void | setReadOnly (bool b) |
auto | size () const |
Store () | |
Store (const Store &)=delete | |
void | swap (Store &) |
~Store () | |
Protected Attributes | |
bool | readOnly_ |
std::map< name_type, prep_type > | reg_ |
A Store provides a place for objects of type I which are uniquely identified by there name of type N. The objects themselves can be accessed indirectly by the prep_type of the Store like
typedef Store<std::string,double> NamedDouble; NamedDouble::prep_type d = NamedDouble("Four", new double(4.)); double val = *(d->second); std::string name = d->first;
K is the key_type which is used as an index in the storage. It must fulfill all requirements for a key in a sorted associative container. N is the user-friendly name_type, which must be mapped uniquely to the key_type and vice versa. N itself must also fulfill all requirements of a key in a sorted associative container. The reason to provide K is that one might save some memory by compacting common parts of information contained in different instances of N, e.g. if N is a pair<string,string>, the first string being a 'namespace' the second a 'name' then K could be a pair<int,string> thus compacting the namespace-string to a simple int. K and N must support following unique conversions:
using DDI::Store< N, I, K >::iterator = typename registry_type::iterator |
using DDI::Store< N, I, K >::key_type = K |
using DDI::Store< N, I, K >::name_type = N |
using DDI::Store< N, I, K >::pimpl_type = I |
using DDI::Store< N, I, K >::prep_type = Rep_type* |
using DDI::Store< N, I, K >::registry_type = std::map<name_type, prep_type> |
using DDI::Store< N, I, K >::Rep_type = rep_type<name_type, pimpl_type> |
|
inline |
DDI::Store< N, I, K >::~Store | ( | ) |
|
delete |
|
inline |
void DDI::Store< N, I, K >::clear | ( | ) |
Referenced by BeautifulSoup.Tag::setString().
Store< N, I, K >::prep_type DDI::Store< N, I, K >::create | ( | const name_type & | n | ) |
Definition at line 78 of file Store.h.
Store< N, I, K >::prep_type DDI::Store< N, I, K >::create | ( | const name_type & | n, |
pimpl_type | p | ||
) |
Definition at line 92 of file Store.h.
|
inline |
Definition at line 48 of file Store.h.
Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().
bool DDI::Store< N, I, K >::isDefined | ( | const name_type & | n | ) | const |
|
delete |
|
inline |
|
inline |
|
inline |
Definition at line 49 of file Store.h.
Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().
void DDI::Store< N, I, K >::swap | ( | Store< N, I, K > & | storeToSwap | ) |
|
protected |
Definition at line 74 of file Store.h.
Referenced by DDI::Store< DDName, std::unique_ptr< DDI::Material > >::readOnly(), DDI::Store< DDName, std::unique_ptr< DDI::Material > >::setReadOnly(), and DDI::Store< DDName, std::unique_ptr< DDI::Material > >::swap().
|
protected |
Definition at line 73 of file Store.h.
Referenced by DDI::Store< DDName, std::unique_ptr< DDI::Material > >::begin(), DDI::Store< DDName, std::unique_ptr< DDI::Material > >::end(), DDI::Store< DDName, std::unique_ptr< DDI::Material > >::size(), and DDI::Store< DDName, std::unique_ptr< DDI::Material > >::swap().