CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CArrayStreamer.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_CARRAYSTREAMER_H
2 #define INCLUDE_ORA_CARRAYSTREAMER_H
3 
4 #include "DataElement.h"
5 #include "IRelationalStreamer.h"
6 #include "RelationalDeleter.h"
7 //
8 #include <memory>
9 // externals
10 #include "Reflex/Type.h"
11 
12 namespace ora {
13 
14  class MappingElement;
15  class ContainerSchema;
16 
17  class IArrayHandler;
18  class MultiRecordInsertOperation;
19  class MultiRecordSelectOperation;
20 
22 
23  public:
25  CArrayWriter( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
26  virtual ~CArrayWriter();
27 
28  bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer );
29 
30  void setRecordId( const std::vector<int>& identity );
31 
33  void write( int oid,const void* data );
34 
35  private:
39  std::vector<int> m_recordId;
41 
42  private:
45  std::auto_ptr<IArrayHandler> m_arrayHandler;
46  std::auto_ptr<IRelationalWriter> m_dataWriter;
47 
48  };
49 
51 
52  public:
53 
55  CArrayUpdater(const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
56 
57  virtual ~CArrayUpdater();
58 
59  bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
60 
61  void setRecordId( const std::vector<int>& identity );
62 
64  void update( int oid,const void* data );
65 
66  private:
67 
70  };
71 
73 
74  public:
75 
77  CArrayReader(const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
78 
79  virtual ~CArrayReader();
80 
81  bool build( DataElement& offset, IRelationalData& relationalData );
82 
83  void select( int oid );
84 
85  void setRecordId( const std::vector<int>& identity );
86 
88  void read( void* address );
89 
90  void clear();
91 
92  private:
96  std::vector<int> m_recordId;
98 
99  private:
101  std::auto_ptr<MultiRecordSelectOperation> m_query;
102  std::auto_ptr<IArrayHandler> m_arrayHandler;
103  std::auto_ptr<IRelationalReader> m_dataReader;
104  };
105 
107  {
108  public:
109  CArrayStreamer( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
110 
111  ~CArrayStreamer();
112 
114 
116 
118 
119  private:
123  };
124 
125 
126 }
127 
128 #endif
129 
130 
ContainerSchema & m_schema
DataElement * m_offset
ContainerSchema & m_schema
IRelationalReader * newReader()
char * address
Definition: mlp_lapack.h:14
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
void select(int oid)
CArrayUpdater(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
void update(int oid, const void *data)
Updates a data element.
MultiRecordInsertOperation * m_insertOperation
MappingElement & m_mappingElement
CArrayStreamer(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Reflex::Type m_objectType
Reflex::Type m_objectType
void setRecordId(const std::vector< int > &identity)
CArrayWriter m_writer
std::vector< int > m_recordId
RelationalDeleter m_deleter
void read(void *address)
Reads a data element.
std::auto_ptr< IArrayHandler > m_arrayHandler
Reflex::Type m_objectType
CArrayWriter(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
unsigned int offset(bool)
IRelationalUpdater * newUpdater()
std::auto_ptr< IArrayHandler > m_arrayHandler
MappingElement & m_mapping
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
void write(int oid, const void *data)
Writes a data element.
DataElement * m_offset
DataElement m_localElement
bool build(DataElement &offset, IRelationalData &relationalData)
std::vector< int > m_recordId
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::auto_ptr< IRelationalReader > m_dataReader
void setRecordId(const std::vector< int > &identity)
virtual ~CArrayWriter()
ContainerSchema & m_schema
MappingElement & m_mappingElement
IRelationalWriter * newWriter()
DataElement m_localElement
std::auto_ptr< IRelationalWriter > m_dataWriter
std::auto_ptr< MultiRecordSelectOperation > m_query
CArrayReader(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
void setRecordId(const std::vector< int > &identity)