CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QueryableVectorStreamer.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_QUERYABLEVECTORSTREAMER_H
2 #define INCLUDE_ORA_QUERYABLEVECTORSTREAMER_H
3 
4 #include "IRelationalStreamer.h"
5 #include "DataElement.h"
6 //
7 #include <memory>
8 #include <boost/shared_ptr.hpp>
9 // externals
10 #include "Reflex/Type.h"
11 
12 namespace ora {
13 
14  class MappingElement;
15  class ContainerSchema;
16  class IRelationalData;
17  class IArrayHandler;
18  class MultiRecordInsertOperation;
19  class IVectorLoader;
20 
22 
23  public:
26  virtual ~QueryableVectorWriter();
27 
28  bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer );
29  void setRecordId( const std::vector<int>& identity );
30  void write( int oid,const void* data );
31  public:
36 
37  private:
41  std::vector<int> m_recordId;
43 
44  private:
47  std::auto_ptr<IArrayHandler> m_arrayHandler;
48  std::auto_ptr<IRelationalWriter> m_dataWriter;
49  };
50 
52 
53  public:
54 
56  QueryableVectorUpdater(const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
57  virtual ~QueryableVectorUpdater();
58 
59  bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
60  void setRecordId( const std::vector<int>& identity );
61  void update( int oid,const void* data );
62 
63  private:
66  };
67 
69 
70  public:
71 
73  QueryableVectorReader(const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
74 
75  virtual ~QueryableVectorReader();
76 
77  bool build( DataElement& offset, IRelationalData& relationalData );
78  void select( int oid );
79  void setRecordId( const std::vector<int>& identity );
80  void read( void* address );
81  void clear();
82 
83  private:
88  std::vector<boost::shared_ptr<IVectorLoader> > m_loaders;
89  std::vector<int> m_tmpIds;
90  };
91 
93  {
94  public:
95  QueryableVectorStreamer( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
96 
98 
100 
102 
104 
105  private:
109  };
110 
111 
112 }
113 
114 inline
117  return m_objectType;
118 }
119 
120 inline
123  return m_mappingElement;
124 }
125 
126 inline
129  return m_offset;
130 }
131 
132 inline
135  return m_arrayHandler.get();
136 }
137 
138 #endif
139 
140 
QueryableVectorStreamer(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
char * address
Definition: mlp_lapack.h:14
MultiRecordInsertOperation * m_insertOperation
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
QueryableVectorWriter(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
void write(int oid, const void *data)
Writes a data element.
void setRecordId(const std::vector< int > &identity)
std::vector< boost::shared_ptr< IVectorLoader > > m_loaders
std::auto_ptr< IArrayHandler > m_arrayHandler
void update(int oid, const void *data)
Updates a data element.
unsigned int offset(bool)
QueryableVectorReader(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
void setRecordId(const std::vector< int > &identity)
void read(void *address)
Reads a data element.
void setRecordId(const std::vector< int > &identity)
std::auto_ptr< IRelationalWriter > m_dataWriter
QueryableVectorUpdater(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Constructor.
bool build(DataElement &offset, IRelationalData &relationalData)
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)