8 Reflex::CollFuncTable& collProxy,
10 m_returnType(iteratorReturnType),
12 m_collProxy(collProxy),
25 m_currentElement = m_collProxy.next_func(&m_collEnv);
31 return m_currentElement;
43 m_iteratorReturnType(),
44 m_isAssociative(
false ),
49 Reflex::Member
method =
m_type.MemberByName(
"createCollFuncTable");
51 Reflex::CollFuncTable* collProxyPtr;
52 method.Invoke( collProxyPtr );
56 throwException(
"Cannot find \"createCollFuncTable\" function for type \""+
m_type.Name(Reflex::SCOPED)+
"\"",
57 "STLContainerHandler::STLContainerHandler");
71 m_collEnv.fObject =
const_cast<void*
>(
address);
72 return *(
static_cast<size_t*
>(m_collProxy->size_func(&m_collEnv)));
78 if ( ! m_iteratorReturnType ) {
79 throwException(
"Missing the dictionary information for the value_type member of the container \"" +
80 m_type.Name(Reflex::SCOPED|Reflex::FINAL) +
"\"",
81 "STLContainerHandler::iterate" );
83 m_collEnv.fObject =
const_cast<void*
>(
address);
90 #if ROOT_VERSION_CODE < ROOT_VERSION(5,28,0)
93 m_collEnv.fStart =
data;
94 m_collProxy->feed_func(&m_collEnv);
96 m_collProxy->feed_func(data,address,1);
102 m_collEnv.fObject =
const_cast<void*
>(
address);
103 m_collProxy->clear_func(&m_collEnv);
108 return m_iteratorReturnType;
112 m_containerHandler(),
113 m_containerOffset( 0 )
116 dictionary.UpdateMembers();
117 for (
unsigned int i=0;
i<dictionary.DataMemberSize();
i++){
119 Reflex::Member field = dictionary.DataMemberAt(
i);
122 throwException(
"The dictionary of the underlying container of \"" +
123 dictionary.Name(Reflex::SCOPED|Reflex::FINAL) +
"\" is not available",
124 "SpecialSTLContainerHandler" );
133 throwException(
"Could not retrieve the underlying container of \"" +
134 dictionary.Name(Reflex::SCOPED|Reflex::FINAL) +
"\" is not available",
135 "SpecialSTLContainerHandler" );
148 return m_containerHandler->size( static_cast< const char* >( address ) + m_containerOffset );
155 return m_containerHandler->iterate( static_cast< const char* >( address ) + m_containerOffset );
162 m_containerHandler->appendNewElement( static_cast< char* >( address ) + m_containerOffset, data );
168 m_containerHandler->clear( static_cast< const char* >( address ) + m_containerOffset );
174 return m_containerHandler->iteratorReturnType();
~STLContainerIteratorHandler()
Destructor.
~SpecialSTLContainerHandler()
Destructor.
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
STLContainerHandler(const Reflex::Type &dictionary)
Constructor.
Reflex::CollFuncTable & m_collProxy
Proxy of the generic collection.
~STLContainerHandler()
Destructor.
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
Reflex::Type & iteratorReturnType()
Returns the iterator return type.
void * m_currentElement
Current element object pointer.
std::auto_ptr< IArrayHandler > m_containerHandler
The handler of the unserlying container.
Reflex::Type m_iteratorReturnType
The iterator return type.
SpecialSTLContainerHandler(const Reflex::Type &dictionary)
Constructor.
std::auto_ptr< Reflex::CollFuncTable > m_collProxy
Proxy of the generic collection.
Reflex::Environ< long > m_collEnv
Structure containing parameters of the collection instance.
bool isTypeContainer(const Reflex::Type &typ)
Reflex::Type containerValueType(const Reflex::Type &typ)
size_t size(const void *address)
Returns the size of the container.
Reflex::Type & iteratorReturnType()
Returns the iterator return type.
Reflex::Type resolvedType(const Reflex::Type &typ)
bool isTypeKeyedContainer(const Reflex::Type &typ)
Reflex::Type & returnType()
Returns the return type of the iterator dereference method.
int m_containerOffset
The offset of the underlying container.
Reflex::Type m_type
The dictionary information.
STLContainerIteratorHandler(const Reflex::Environ< long > &collEnv, Reflex::CollFuncTable &collProxy, const Reflex::Type &iteratorReturnType)
Constructor.
void increment()
Increments itself.
char data[epos_bytes_allocation]
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
bool m_isAssociative
Flag indicating whether the container is associative.
void throwException(const std::string &message, const std::string &methodName)
void clear(const void *address)
Clear the content of the container.
void clear(const void *address)
Clear the content of the container.
size_t size(const void *address)
Returns the size of the container.
void * object()
Returns the current object.