CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UniqueRefStreamer.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_UNIQUEREFSTREAMER_H
2 #define INCLUDE_ORA_UNIQUEREFSTREAMER_H
3 
4 #include "IRelationalStreamer.h"
5 #include "DataElement.h"
6 #include "RelationalBuffer.h"
7 //
8 #include <memory>
9 #include <boost/shared_ptr.hpp>
10 // externals
11 #include "Reflex/Type.h"
12 
13 
14 namespace ora {
15 
16  class MappingElement;
17  class ContainerSchema;
18  class RelationalRefLoader;
19  class DependentClassReader;
20 
21  std::string uniqueRefNullLabel();
22 
24 
25  public:
26 
27  UniqueRefWriter( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
28 
29  virtual ~UniqueRefWriter();
30 
31  bool build(DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
32 
33  void setRecordId( const std::vector<int>& identity );
34 
36  void write( int oid, const void* data );
37 
38  private:
39 
46  };
47 
49 
50  public:
51 
52  UniqueRefUpdater( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
53 
54  virtual ~UniqueRefUpdater();
55 
56  bool build(DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
57 
58  void setRecordId( const std::vector<int>& identity );
59 
61  void update( int oid,
62  const void* data );
63 
64  private:
65 
67 
68  };
69 
71 
72  public:
73 
74  UniqueRefReader( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
75 
76  virtual ~UniqueRefReader();
77 
78  bool build( DataElement& offset, IRelationalData& relationalData);
79 
80  void select( int oid );
81 
82  void setRecordId( const std::vector<int>& identity );
83 
85  void read( void* destination );
86 
87  void clear();
88 
89  private:
90 
96  std::vector<boost::shared_ptr<RelationalRefLoader> > m_loaders;
97  };
98 
100  {
101  public:
102  UniqueRefStreamer( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
103 
105 
107 
109 
111 
112  private:
116  };
117 
118 }
119 #endif
120 
121 
122 
IRelationalReader * newReader()
UniqueRefUpdater(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
RelationalBuffer * m_operationBuffer
void write(int oid, const void *data)
Writes a data element.
std::vector< boost::shared_ptr< RelationalRefLoader > > m_loaders
bool build(DataElement &offset, IRelationalData &relationalData)
DataElement * m_dataElement
IRelationalUpdater * newUpdater()
void setRecordId(const std::vector< int > &identity)
MappingElement & m_mapping
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
void read(void *destination)
Reads a data element.
UniqueRefStreamer(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
ContainerSchema & m_schema
void setRecordId(const std::vector< int > &identity)
UniqueRefWriter(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
UniqueRefWriter m_writer
void update(int oid, const void *data)
Updates a data element.
ContainerSchema & m_schema
IRelationalData * m_relationalData
unsigned int offset(bool)
ContainerSchema & m_schema
IRelationalData * m_relationalData
UniqueRefReader(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
DataElement * m_dataElement
void setRecordId(const std::vector< int > &identity)
MappingElement & m_mappingElement
IRelationalWriter * newWriter()
MappingElement & m_mappingElement
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
std::string uniqueRefNullLabel()