CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CondCore/ORA/src/IRelationalStreamer.h

Go to the documentation of this file.
00001 #ifndef INCLUDE_ORA_IRELATIONALSTREAMER_H
00002 #define INCLUDE_ORA_IRELATIONALSTREAMER_H
00003 
00004 #define MAXARRAYSIZE 65000
00005 
00006 //
00007 #include <vector>
00008 
00009 namespace ora {
00010 
00011   class DataElement;
00012   class IRelationalData;
00013   class RelationalBuffer;
00014   
00015   class IRelationalWriter {
00016     
00017       public:
00018 
00020       virtual ~IRelationalWriter(){
00021       }
00022 
00023       virtual bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer ) = 0;
00024 
00025       virtual void setRecordId( const std::vector<int>& identity ) = 0;
00026       
00028       virtual void write( int oid, const void* data ) = 0;
00029       
00030   };
00031   
00032   
00033   class IRelationalUpdater {
00034 
00035     public:
00036 
00037     virtual ~IRelationalUpdater(){
00038     }
00039 
00040     virtual bool build( DataElement& offset, IRelationalData& relationalData, RelationalBuffer& operationBuffer) = 0;
00041 
00042     virtual void setRecordId( const std::vector<int>& identity ) = 0;
00043 
00045     virtual void update( int oid, const void* data ) = 0;
00046   };
00047   
00048 
00049   class IRelationalReader {
00050 
00051     public:
00052     
00053     virtual ~IRelationalReader(){
00054     }
00055     
00056     virtual bool build( DataElement& offset, IRelationalData& relationalData ) = 0;
00057 
00058     virtual void select( int oid ) = 0;
00059 
00060     virtual void setRecordId( const std::vector<int>& identity ) = 0;
00061 
00063     virtual void read( void* address ) = 0;
00064 
00065     virtual void clear() = 0;
00066 
00067   };
00068 
00069   class IRelationalStreamer {
00070     public:
00072       virtual ~IRelationalStreamer(){
00073       }
00074 
00075       virtual IRelationalWriter* newWriter() = 0;
00076       
00077       virtual IRelationalUpdater* newUpdater() = 0;
00078 
00079       virtual IRelationalReader* newReader() = 0;
00080   };
00081 }
00082 
00083 #endif
00084 
00085