CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/CondCore/ORA/src/DataElement.h

Go to the documentation of this file.
00001 #ifndef INCLUDE_ORA_DATAELEMENT_H
00002 #define INCLUDE_ORA_DATAELEMENT_H
00003 
00004 // externals
00005 #include "Reflex/Type.h"
00006 
00007 namespace ora {
00008 
00009     // class describing an elementary part of data to be stored 
00010   class DataElement {
00011     public:
00012     DataElement();
00013     DataElement( size_t declaringScopeOffset, Reflex::OffsetFunction offsetFunction );
00014     virtual ~DataElement();
00015 
00016     DataElement& addChild( size_t declaringScopeOffset, Reflex::OffsetFunction offsetFunction );
00017 
00018     size_t offset( const void* topLevelAddress ) const;
00019     void* address( const void* topLevelAddress ) const;
00020     size_t declaringScopeOffset() const;
00021 
00022     void clear();
00023 
00024     private:
00025 
00026     const DataElement* m_parent;
00027     std::vector<DataElement*> m_children;
00028     size_t m_declaringScopeOffset;
00029     Reflex::OffsetFunction m_offsetFunction;
00030   };
00031   
00032 }
00033 
00034 #endif
00035