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();
80 return m_dbContainer->mappingVersion();
84 return m_dbContainer->size();
94 m_dbContainer->extendSchema( type );
99 m_dbContainer->setAccessPermission( principal, forWrite );
103 return Object( m_dbContainer->fetchItem(itemId), m_dbContainer->type() );
107 const std::type_info& asTypeInfo){
109 void* ptr = m_dbContainer->fetchItemAsType(itemId, asType );
110 if(!ptr)
return boost::shared_ptr<void>();
111 return boost::shared_ptr<void>( ptr,
RflxDeleter( m_dbContainer->type() ) );
115 return m_dbContainer->lock();
119 return m_dbContainer->isLocked();
125 throwException(
"Object class has not been found in the dictionary.",
126 "Container::insertItem");
128 return m_dbContainer->insertItem( data.
address(), objType );
132 const std::type_info& typeInfo ){
134 return m_dbContainer->insertItem( data, type );
141 throwException(
"Object class has not been found in the dictionary.",
142 "Container::updateItem");
144 return m_dbContainer->updateItem( itemId, data.
address(), objType );
149 const std::type_info& typeInfo ){
151 m_dbContainer->updateItem( itemId, data, type );
155 m_dbContainer->erase(itemId );
159 m_dbContainer->flush();
164 m_dbContainer->setItemName( name, itemId );
168 return m_dbContainer->getNames( destination );
void updateItem(int itemId, const Object &data)
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()
const std::string & mappingVersion()
boost::shared_ptr< void > fetchItemAsType(int itemId, const std::type_info &asTypeInfo)
char data[epos_bytes_allocation]
boost::shared_ptr< void > getItemAsType(const std::type_info &asTypeInfo)
const Reflex::Type & type() const
Container & operator=(const Container &rhs)
void throwException(const std::string &message, const std::string &methodName)
virtual ~ContainerIterator()
bool getNames(std::vector< std::string > &destination)
Handle< DatabaseContainer > m_dbContainer
Reflex::Type lookupDictionary(const std::type_info &typeInfo, bool throwFlag=true)
ContainerIterator iterator()
ContainerIterator & operator=(const ContainerIterator &rhs)