CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PVectorHandler.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_PVECTORHANDLER_H
2 #define INCLUDE_ORA_PVECTORHANDLER_H
3 
4 #include "IArrayHandler.h"
5 //
6 #include <memory>
7 // externals
9 
10 #include "TVirtualCollectionIterators.h"
11 #include "TVirtualCollectionProxy.h"
12 
13 namespace ora {
14 
16  {
17 
18  public:
20  PVectorIteratorHandler( void* address,
21  TVirtualCollectionProxy& collProxy,
22  const edm::TypeWithDict& iteratorReturnType,
23  size_t startElement );
24 
26  virtual ~PVectorIteratorHandler();
27 
29  void increment();
30 
32  void* object();
33 
36 
37  private:
38 
41 
43  TVirtualCollectionProxy& m_collProxy;
44 
47 
48  // holds the iterators when the branch is of fType==4.
49  TGenericCollectionIterator *m_Iterators;
50 
52 
53  };
54 
55  class PVectorHandler : virtual public IArrayHandler {
56 
57  public:
59  explicit PVectorHandler( const edm::TypeWithDict& dictionary );
60 
62  virtual ~PVectorHandler();
63 
65  size_t size( const void* address );
66 
68  size_t startElementIndex( const void* address );
69 
71  IArrayIteratorHandler* iterate( const void* address );
72 
74  void appendNewElement( void* address, void* data );
75 
77  void clear( const void* address );
78 
81 
83  bool isAssociative() const {
84  return false;
85  }
86 
88  size_t* persistentSize( const void* address );
89 
91  void finalize( void* address );
92 
93  private:
96 
99 
101  TVirtualCollectionProxy* m_collProxy;
102 
104 
106 
107  };
108 
109  }
110 
111 #endif
size_t m_persistentSizeAttributeOffset
edm::TypeWithDict m_iteratorReturnType
The iterator return type.
PVectorHandler(const edm::TypeWithDict &dictionary)
Constructor.
edm::TypeWithDict m_returnType
The return type of the iterator dereference method.
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
edm::TypeWithDict & iteratorReturnType()
Returns the iterator return type.
bool isAssociative() const
Returns the associativeness of the container.
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
TVirtualCollectionProxy & m_collProxy
Proxy of the generic collection.
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.
TGenericCollectionIterator * m_Iterators
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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.
virtual ~PVectorIteratorHandler()
Destructor.
void clear(const void *address)
Clear the content of the container.