13 TVirtualCollectionProxy& collProxy,
16 m_returnType(iteratorReturnType),
17 m_collProxy(collProxy),
19 m_Iterators(TGenericCollectionIterator::New(address, &collProxy)),
20 m_startElement(startElement){
26 while(i<startElement){
38 m_currentElement = m_Iterators->Next();
43 return m_currentElement;
53 m_iteratorReturnType(),
55 m_persistentSizeAttributeOffset(0),
56 m_vecAttributeOffset(0)
59 if(privateVectorAttribute){
65 "PVectorHandler::PVectorHandler");
70 if( persistentSizeAttribute ){
84 TVirtualCollectionProxy::TPushPop helper(m_collProxy, static_cast<char*>(const_cast<void*>(address))+m_vecAttributeOffset );
85 return m_collProxy->Size();
90 const void* persistentSizeAddress =
static_cast<const char *
>(address) + m_persistentSizeAttributeOffset;
91 size_t persistentSize = *
static_cast<const size_t*
>(persistentSizeAddress);
93 TVirtualCollectionProxy::TPushPop helper(m_collProxy, static_cast<char*>(const_cast<void*>(address))+m_vecAttributeOffset );
94 size_t transientSize = m_collProxy->Size();
96 size_t startElement = 0;
97 if(persistentSize < transientSize) startElement = persistentSize;
102 void* persistentSizeAddress =
static_cast<char*
>(
const_cast<void*
>(address))+m_persistentSizeAttributeOffset;
103 return static_cast<size_t*
>(persistentSizeAddress);
108 if ( ! m_iteratorReturnType ) {
109 throwException(
"Missing the dictionary information for the value_type member of the container \"" +
110 m_type.cppName() +
"\"",
113 void *addr =
static_cast<char*
>(
const_cast<void*
>(address))+m_vecAttributeOffset;
121 void* addr =
static_cast<char*
>(
const_cast<void*
>(address))+m_vecAttributeOffset;
122 m_collProxy->Insert(data, addr, 1);
127 void* addr =
static_cast<char*
>(
const_cast<void*
>(address))+m_vecAttributeOffset;
128 TVirtualCollectionProxy::TPushPop helper(m_collProxy, const_cast<void*>(addr));
129 m_collProxy->Clear();
134 return m_iteratorReturnType;
138 size_t transSize =
size( address );
139 void* persistentSizeAttributeAddress =
static_cast<char*
>(address)+m_persistentSizeAttributeOffset;
140 *
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
char data[epos_bytes_allocation]
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.