test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
STLContainerStreamer.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_STLCONTAINERSTREAMER_H
2 #define INCLUDE_ORA_STLCONTAINERSTREAMER_H
3 
4 #include "DataElement.h"
5 #include "IRelationalStreamer.h"
6 #include "RelationalDeleter.h"
7 //
8 #include <memory>
9 // externals
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:
26  virtual ~STLContainerWriter();
27 
31 
32  public:
33 
34  bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer );
35 
36  void setRecordId( const std::vector<int>& identity );
37 
39  void write( int oid,const void* data );
40 
41  private:
45  std::vector<int> m_recordId;
47 
48  private:
52  std::auto_ptr<IArrayHandler> m_arrayHandler;
53  std::auto_ptr<IRelationalWriter> m_keyWriter;
54  std::auto_ptr<IRelationalWriter> m_dataWriter;
55  };
56 
58 
59  public:
60 
62  STLContainerUpdater(const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
63 
64  virtual ~STLContainerUpdater();
65 
66  bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
67 
68  void setRecordId( const std::vector<int>& identity );
69 
71  void update( int oid,const void* data );
72 
73  private:
74 
77  };
78 
80 
81  public:
82 
84  STLContainerReader(const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
85 
86  virtual ~STLContainerReader();
87 
88  bool build( DataElement& offset, IRelationalData& relationalData );
89 
90  void select( int oid );
91 
92  void setRecordId( const std::vector<int>& identity );
93 
95  void read( void* address );
96 
97  void clear();
98 
99  private:
103  std::vector<int> m_recordId;
105 
106  private:
109  std::auto_ptr<MultiRecordSelectOperation> m_query;
110  std::auto_ptr<IArrayHandler> m_arrayHandler;
111  std::auto_ptr<IRelationalReader> m_keyReader;
112  std::auto_ptr<IRelationalReader> m_dataReader;
113  };
114 
116  {
117  public:
118  STLContainerStreamer( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
119 
121 
123 
125 
127 
128  private:
132  };
133 
134 
135 }
136 
137 inline
140  return m_mappingElement;
141 }
142 
143 inline
146  return m_offset;
147 }
148 
149 inline
152  return m_arrayHandler.get();
153 }
154 
155 #endif
156 
157 
std::auto_ptr< IRelationalReader > m_keyReader
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
MappingElement & m_mappingElement
std::vector< int > m_recordId
void setRecordId(const std::vector< int > &identity)
std::auto_ptr< IRelationalWriter > m_keyWriter
IRelationalReader * newReader()
STLContainerWriter(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
std::auto_ptr< IArrayHandler > m_arrayHandler
STLContainerReader(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
std::auto_ptr< MultiRecordSelectOperation > m_query
void write(int oid, const void *data)
Writes a data element.
MultiRecordInsertOperation * m_insertOperation
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
void read(void *address)
Reads a data element.
std::auto_ptr< IRelationalWriter > m_dataWriter
std::auto_ptr< IRelationalReader > m_dataReader
void setRecordId(const std::vector< int > &identity)
std::vector< int > m_recordId
void setRecordId(const std::vector< int > &identity)
edm::TypeWithDict m_objectType
edm::TypeWithDict m_objectType
STLContainerStreamer(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
void update(int oid, const void *data)
Updates a data element.
IRelationalWriter * newWriter()
STLContainerUpdater(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
bool build(DataElement &offset, IRelationalData &relationalData)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
IRelationalUpdater * newUpdater()
IArrayHandler * arrayHandler()
MappingElement & m_mappingElement
std::auto_ptr< IArrayHandler > m_arrayHandler