10 m_buffer( iteratorBuffer ){
14 m_buffer( rhs.m_buffer ){
21 if(
this != &rhs ) m_buffer = rhs.
m_buffer;
30 return m_buffer->next();
34 return m_buffer->itemId();
38 return Object( m_buffer->getItem(), m_buffer->type() );
43 void* ptr = m_buffer->getItemAsType( castType );
44 return boost::shared_ptr<void>( ptr,
RflxDeleter( m_buffer->type() ) );
52 m_dbContainer( dbContainer ){
56 m_dbContainer( rhs.m_dbContainer ){
68 return m_dbContainer->id();
72 return m_dbContainer->name();
76 return m_dbContainer->className();
82 ret.erase(
std::remove( ret.begin(), ret.end(),
' ' ), ret.end() );
87 return m_dbContainer->mappingVersion();
91 return m_dbContainer->size();
101 m_dbContainer->extendSchema( type );
106 m_dbContainer->setAccessPermission( principal, forWrite );
110 return Object( m_dbContainer->fetchItem(itemId), m_dbContainer->type() );
114 const std::type_info& asTypeInfo){
116 void* ptr = m_dbContainer->fetchItemAsType(itemId, asType );
117 if(!ptr)
return boost::shared_ptr<void>();
118 return boost::shared_ptr<void>( ptr,
RflxDeleter( m_dbContainer->type() ) );
122 return m_dbContainer->lock();
126 return m_dbContainer->isLocked();
132 throwException(
"Object class has not been found in the dictionary.",
133 "Container::insertItem");
135 return m_dbContainer->insertItem( data.
address(), objType );
139 const std::type_info& typeInfo ){
141 return m_dbContainer->insertItem( data, type );
148 throwException(
"Object class has not been found in the dictionary.",
149 "Container::updateItem");
151 return m_dbContainer->updateItem( itemId, data.
address(), objType );
156 const std::type_info& typeInfo ){
158 m_dbContainer->updateItem( itemId, data, type );
162 m_dbContainer->erase(itemId );
166 m_dbContainer->flush();
171 m_dbContainer->setItemName( name, itemId );
175 return m_dbContainer->getNames( destination );
void updateItem(int itemId, const Object &data)
const edm::TypeWithDict & type() const
Handle< IteratorBuffer > m_buffer
const std::string & name()
int insertItem(const Object &data)
void setAccessPermission(const std::string &principal, bool forWrite)
Object fetchItem(int itemId)
void setItemName(const std::string &name, int itemId)
const std::string & className()
std::string demangledName(const std::type_info &typeInfo)
const std::string & mappingVersion()
std::type_info const & typeInfo() const
boost::shared_ptr< void > fetchItemAsType(int itemId, const std::type_info &asTypeInfo)
edm::TypeWithDict lookupDictionary(const std::type_info &typeInfo, bool throwFlag=true)
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
std::string realClassName()
boost::shared_ptr< void > getItemAsType(const std::type_info &asTypeInfo)
Container & operator=(const Container &rhs)
virtual ~ContainerIterator()
bool getNames(std::vector< std::string > &destination)
Handle< DatabaseContainer > m_dbContainer
ContainerIterator iterator()
ContainerIterator & operator=(const ContainerIterator &rhs)
std::string className(const T &t)