CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OraPtrStreamer.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_ORAPTRSTREAMER_H
2 #define INCLUDE_ORA_ORAPTRSTREAMER_H
3 
4 #include "IRelationalStreamer.h"
5 #include "DataElement.h"
6 //
7 #include <memory>
8 #include <boost/shared_ptr.hpp>
9 // externals
11 
12 
13 namespace ora {
14 
15  class MappingElement;
16  class ContainerSchema;
17  class IPtrLoader;
18  class OraPtrReadBuffer;
19 
21 
22  public:
23 
24  OraPtrWriter( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
25 
26  virtual ~OraPtrWriter();
27 
28  bool build(DataElement& dataElement, 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:
36 
42  std::auto_ptr<IRelationalWriter> m_writer;
43  };
44 
46 
47  public:
48 
49  OraPtrUpdater( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
50 
51  virtual ~OraPtrUpdater();
52 
53  bool build(DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
54 
55  void setRecordId( const std::vector<int>& identity );
56 
58  void update( int oid,
59  const void* data );
60 
61  private:
62 
68  std::auto_ptr<IRelationalUpdater> m_updater;
69  };
70 
72 
73  public:
74 
75  OraPtrReader( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
76 
77  virtual ~OraPtrReader();
78 
79  bool build( DataElement& offset, IRelationalData& relationalData);
80 
81  void select( int oid );
82 
83  void setRecordId( const std::vector<int>& identity );
84 
86  void read( void* destination );
87 
88  void clear();
89 
90  private:
91 
94  std::auto_ptr<OraPtrReadBuffer> m_readBuffer;
95  std::vector<boost::shared_ptr<IPtrLoader> > m_loaders;
96  std::vector<int> m_tmpIds;
97  };
98 
100  {
101  public:
102  OraPtrStreamer( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
103 
104  ~OraPtrStreamer();
105 
107 
109 
111 
112  private:
116  };
117 
118 }
119 #endif
120 
121 
122 
void update(int oid, const void *data)
Updates a data element.
std::vector< boost::shared_ptr< IPtrLoader > > m_loaders
void setRecordId(const std::vector< int > &identity)
edm::TypeWithDict m_objectType
DataElement m_localElement
OraPtrUpdater(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
IRelationalUpdater * newUpdater()
void write(int oid, const void *data)
Writes a data element.
MappingElement & m_mappingElement
ContainerSchema & m_schema
ContainerSchema & m_schema
bool build(DataElement &offset, IRelationalData &relationalData)
std::auto_ptr< IRelationalUpdater > m_updater
void setRecordId(const std::vector< int > &identity)
DataElement * m_dataElement
void read(void *destination)
Reads a data element.
IRelationalWriter * newWriter()
edm::TypeWithDict m_objectType
OraPtrStreamer(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
IRelationalReader * newReader()
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
void setRecordId(const std::vector< int > &identity)
MappingElement & m_mapping
DataElement m_localElement
DataElement * m_dataElement
std::auto_ptr< IRelationalWriter > m_writer
edm::TypeWithDict m_objectType
std::auto_ptr< OraPtrReadBuffer > m_readBuffer
MappingElement & m_mappingElement
std::vector< int > m_tmpIds
OraPtrWriter(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
edm::TypeWithDict m_objectType
OraPtrReader(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
DataElement * m_dataElement
ContainerSchema & m_schema
void select(int oid)
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)