CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
STLContainerHandler.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_STLCONTAINERHANDLER_H
2 #define INCLUDE_ORA_STLCONTAINERHANDLER_H
3 
4 #include "IArrayHandler.h"
5 //
6 #include <memory>
7 // externals
10 
11 #include "TVirtualCollectionIterators.h"
12 #include "TVirtualCollectionProxy.h"
13 
14 namespace ora {
15 
17  public:
19  STLContainerIteratorHandler( void* address,
20  TVirtualCollectionProxy& collProxy,
21  const edm::TypeWithDict& iteratorReturnType );
22 
25 
27  void increment();
28 
30  void* object();
31 
34 
35  private:
36 
39 
41  TVirtualCollectionProxy& m_collProxy;
42 
45 
46  // holds the iterator when the branch is of fType==4.
47  TGenericCollectionIterator *m_Iterators;
48 
49  };
50 
51 
52  class STLContainerHandler : virtual public IArrayHandler {
53 
54  public:
56  explicit STLContainerHandler( const edm::TypeWithDict& dictionary );
57 
60 
62  size_t size( const void* address );
63 
65  IArrayIteratorHandler* iterate( const void* address );
66 
68  void appendNewElement( void* address, void* data );
69 
71  void clear( const void* address );
72 
75 
77  bool isAssociative() const { return m_isAssociative; }
78 
79  private:
82 
85 
88 
90  TVirtualCollectionProxy* m_collProxy;
91 
92  };
93 
94 
95  class SpecialSTLContainerHandler : virtual public IArrayHandler {
96 
97  public:
99  explicit SpecialSTLContainerHandler( const edm::TypeWithDict& dictionary );
100 
103 
105  size_t size( const void* address );
106 
108  IArrayIteratorHandler* iterate( const void* address );
109 
111  void appendNewElement( void* address, void* data );
112 
114  void clear( const void* address );
115 
118 
119  private:
121  std::auto_ptr<IArrayHandler> m_containerHandler;
122 
125  };
126 
127 
128 }
129 
130 #endif
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
edm::TypeWithDict m_returnType
The return type of the iterator dereference method.
edm::TypeWithDict & iteratorReturnType()
Returns the iterator return type.
edm::TypeWithDict m_type
The dictionary information.
TGenericCollectionIterator * m_Iterators
edm::TypeWithDict & returnType()
Returns the return type of the iterator dereference method.
SpecialSTLContainerHandler(const edm::TypeWithDict &dictionary)
Constructor.
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
void * m_currentElement
Current element object pointer.
std::auto_ptr< IArrayHandler > m_containerHandler
The handler of the unserlying container.
TVirtualCollectionProxy * m_collProxy
Proxy of the generic collection.
STLContainerIteratorHandler(void *address, TVirtualCollectionProxy &collProxy, const edm::TypeWithDict &iteratorReturnType)
Constructor.
STLContainerHandler(const edm::TypeWithDict &dictionary)
Constructor.
bool isAssociative() const
Returns the associativeness of the container.
size_t size(const void *address)
Returns the size of the container.
int m_containerOffset
The offset of the underlying container.
void increment()
Increments itself.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
edm::TypeWithDict m_iteratorReturnType
The iterator return type.
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
TVirtualCollectionProxy & m_collProxy
Proxy of the generic collection.
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 clear(const void *address)
Clear the content of the container.
void clear(const void *address)
Clear the content of the container.
edm::TypeWithDict & iteratorReturnType()
Returns the iterator return type.
size_t size(const void *address)
Returns the size of the container.
void * object()
Returns the current object.