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
8 #include "Reflex/Reflex.h"
9 #include "Reflex/Builder/CollectionProxy.h"
10 
11 namespace ora {
12 
14  {
15 
16  public:
18  PVectorIteratorHandler( const Reflex::Environ<long>& collEnv,
19  Reflex::CollFuncTable& collProxy,
20  const Reflex::Type& iteratorReturnType,
21  size_t startElement );
22 
24  virtual ~PVectorIteratorHandler();
25 
27  void increment();
28 
30  void* object();
31 
34 
35  private:
36 
39 
41  Reflex::Environ<long> m_collEnv;
42 
44  Reflex::CollFuncTable& m_collProxy;
45 
48 
50 
51  };
52 
53  class PVectorHandler : virtual public IArrayHandler {
54 
55  public:
57  explicit PVectorHandler( const Reflex::Type& dictionary );
58 
60  virtual ~PVectorHandler();
61 
63  size_t size( const void* address );
64 
66  size_t startElementIndex( const void* address );
67 
69  IArrayIteratorHandler* iterate( const void* address );
70 
72  void appendNewElement( void* address, void* data );
73 
75  void clear( const void* address );
76 
79 
81  bool isAssociative() const {
82  return m_isAssociative;
83  }
84 
86  size_t* persistentSize( const void* address );
87 
89  void finalize( void* address );
90 
91  private:
94 
97 
100 
102  Reflex::Environ<long> m_collEnv;
103 
105  std::auto_ptr<Reflex::CollFuncTable> m_collProxy;
106 
108 
110 
111  };
112 
113  }
114 
115 #endif
size_t m_persistentSizeAttributeOffset
Reflex::Type & iteratorReturnType()
Returns the iterator return type.
Reflex::Type m_type
The dictionary information.
char * address
Definition: mlp_lapack.h:14
PVectorIteratorHandler(const Reflex::Environ< long > &collEnv, Reflex::CollFuncTable &collProxy, const Reflex::Type &iteratorReturnType, size_t startElement)
Constructor.
size_t size(const void *address)
Returns the size of the container.
void finalize(void *address)
execute the ending procedure for the container
bool m_isAssociative
Flag indicating whether the container is associative.
bool isAssociative() const
Returns the associativeness of the container.
Reflex::Type m_iteratorReturnType
The iterator return type.
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
Reflex::Type m_returnType
The return type of the iterator dereference method.
Reflex::Environ< long > m_collEnv
Structure containing parameters of the collection instance.
Reflex::CollFuncTable & 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.
Reflex::Environ< long > m_collEnv
Structure containing parameters of the collection instance.
std::auto_ptr< Reflex::CollFuncTable > m_collProxy
Proxy of the generic collection.
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Reflex::Type & returnType()
Returns the return type of the iterator dereference method.
size_t * persistentSize(const void *address)
Returns the persistent size of the container.
void * m_currentElement
Current element object pointer.
PVectorHandler(const Reflex::Type &dictionary)
Constructor.
virtual ~PVectorIteratorHandler()
Destructor.
void clear(const void *address)
Clear the content of the container.