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
8 #include "Reflex/Reflex.h"
9 #include "Reflex/Builder/CollectionProxy.h"
10 
11 namespace ora {
12 
14  public:
16  STLContainerIteratorHandler( const Reflex::Environ<long>& collEnv,
17  Reflex::CollFuncTable& collProxy,
18  const Reflex::Type& iteratorReturnType );
19 
22 
24  void increment();
25 
27  void* object();
28 
31 
32  private:
33 
36 
38  Reflex::Environ<long> m_collEnv;
39 
41  Reflex::CollFuncTable& m_collProxy;
42 
45  };
46 
47 
48  class STLContainerHandler : virtual public IArrayHandler {
49 
50  public:
52  explicit STLContainerHandler( const Reflex::Type& dictionary );
53 
56 
58  size_t size( const void* address );
59 
61  IArrayIteratorHandler* iterate( const void* address );
62 
64  void appendNewElement( void* address, void* data );
65 
67  void clear( const void* address );
68 
71 
73  bool isAssociative() const { return m_isAssociative; }
74 
75  private:
78 
81 
84 
86  Reflex::Environ<long> m_collEnv;
87 
89  std::auto_ptr<Reflex::CollFuncTable> m_collProxy;
90 
91  };
92 
93 
94  class SpecialSTLContainerHandler : virtual public IArrayHandler {
95 
96  public:
98  explicit SpecialSTLContainerHandler( const Reflex::Type& dictionary );
99 
102 
104  size_t size( const void* address );
105 
107  IArrayIteratorHandler* iterate( const void* address );
108 
110  void appendNewElement( void* address, void* data );
111 
113  void clear( const void* address );
114 
117 
118  private:
120  std::auto_ptr<IArrayHandler> m_containerHandler;
121 
124  };
125 
126 
127 }
128 
129 #endif
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
STLContainerHandler(const Reflex::Type &dictionary)
Constructor.
char * address
Definition: mlp_lapack.h:14
Reflex::CollFuncTable & m_collProxy
Proxy of the generic collection.
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_returnType
The return type of the iterator dereference method.
Reflex::Type m_iteratorReturnType
The iterator return type.
SpecialSTLContainerHandler(const Reflex::Type &dictionary)
Constructor.
Reflex::Environ< long > m_collEnv
Structure containing parameters of the collection instance.
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 isAssociative() const
Returns the associativeness of the container.
size_t size(const void *address)
Returns the size of the container.
Reflex::Type & iteratorReturnType()
Returns the iterator return type.
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]
Definition: EPOS_Wrapper.h:82
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 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.