12 TVirtualCollectionProxy& collProxy,
15 m_returnType(iteratorReturnType),
16 m_collProxy(collProxy),
18 m_Iterators(TGenericCollectionIterator::New(address, &collProxy)),
19 m_startElement(startElement){
25 while(i<startElement){
37 m_currentElement = m_Iterators->Next();
42 return m_currentElement;
52 m_iteratorReturnType(),
54 m_persistentSizeAttributeOffset(0),
55 m_vecAttributeOffset(0)
58 if(privateVectorAttribute){
64 "PVectorHandler::PVectorHandler");
69 if( persistentSizeAttribute ){
83 TVirtualCollectionProxy::TPushPop helper(m_collProxy, static_cast<char*>(const_cast<void*>(address))+m_vecAttributeOffset );
84 return m_collProxy->Size();
89 const void* persistentSizeAddress =
static_cast<const char *
>(address) + m_persistentSizeAttributeOffset;
90 size_t persistentSize = *
static_cast<const size_t*
>(persistentSizeAddress);
92 TVirtualCollectionProxy::TPushPop helper(m_collProxy, static_cast<char*>(const_cast<void*>(address))+m_vecAttributeOffset );
93 size_t transientSize = m_collProxy->Size();
95 size_t startElement = 0;
96 if(persistentSize < transientSize) startElement = persistentSize;
101 void* persistentSizeAddress =
static_cast<char*
>(
const_cast<void*
>(address))+m_persistentSizeAttributeOffset;
102 return static_cast<size_t*
>(persistentSizeAddress);
107 if ( ! m_iteratorReturnType ) {
108 throwException(
"Missing the dictionary information for the value_type member of the container \"" +
109 m_type.cppName() +
"\"",
112 void *addr =
static_cast<char*
>(
const_cast<void*
>(address))+m_vecAttributeOffset;
120 void* addr =
static_cast<char*
>(
const_cast<void*
>(address))+m_vecAttributeOffset;
121 m_collProxy->Insert(data, addr, 1);
126 void* addr =
static_cast<char*
>(
const_cast<void*
>(address))+m_vecAttributeOffset;
127 TVirtualCollectionProxy::TPushPop helper(m_collProxy, const_cast<void*>(addr));
128 m_collProxy->Clear();
133 return m_iteratorReturnType;
137 size_t transSize =
size( address );
138 void* persistentSizeAttributeAddress =
static_cast<char*
>(address)+m_persistentSizeAttributeOffset;
139 *
static_cast<size_t*
>(persistentSizeAttributeAddress) = transSize;
size_t m_persistentSizeAttributeOffset
edm::TypeWithDict m_iteratorReturnType
The iterator return type.
edm::TypeWithDict resolvedType(const edm::TypeWithDict &typ)
PVectorHandler(const edm::TypeWithDict &dictionary)
Constructor.
edm::TypeWithDict m_type
The dictionary information.
edm::TypeWithDict & returnType()
Returns the return type of the iterator dereference method.
size_t size(const void *address)
Returns the size of the container.
void finalize(void *address)
execute the ending procedure for the container
MemberWithDict dataMemberByName(std::string const &) const
edm::TypeWithDict & iteratorReturnType()
Returns the iterator return type.
TClass * getClass() const
std::string cppName() const
size_t m_vecAttributeOffset
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
TypeWithDict typeOf() const
virtual ~PVectorHandler()
Destructor.
void increment()
Increments itself.
size_t startElementIndex(const void *address)
Returns the index of the first element.
void * object()
Returns the current object.
PVectorIteratorHandler(void *address, TVirtualCollectionProxy &collProxy, const edm::TypeWithDict &iteratorReturnType, size_t startElement)
Constructor.
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
TGenericCollectionIterator * m_Iterators
edm::TypeWithDict containerValueType(const edm::TypeWithDict &typ)
size_t * persistentSize(const void *address)
Returns the persistent size of the container.
TVirtualCollectionProxy * m_collProxy
Proxy of the generic collection.
void * m_currentElement
Current element object pointer.
tuple size
Write out results.
virtual ~PVectorIteratorHandler()
Destructor.
void clear(const void *address)
Clear the content of the container.