CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/CondCore/ORA/src/CArrayHandler.h

Go to the documentation of this file.
00001 #ifndef INCLUDE_ORA_CARRAYHANDLER_H
00002 #define INCLUDE_ORA_CARRAYHANDLER_H
00003 
00004 #include "IArrayHandler.h"
00005 // externals
00006 #include "Reflex/Reflex.h"
00007 
00008 namespace ora {
00009 
00010   class CArrayIteratorHandler : virtual public IArrayIteratorHandler {
00011     public:
00013     CArrayIteratorHandler( const void* startAddress, const Reflex::Type& iteratorReturnType );
00014 
00016     ~CArrayIteratorHandler();
00017 
00019     void increment();
00020 
00022     void* object();
00023 
00025     Reflex::Type& returnType();
00026 
00027     private:
00028 
00030     Reflex::Type m_returnType;
00031       
00033     const void* m_currentElement;
00034   };
00035 
00036 
00037   class CArrayHandler : virtual public IArrayHandler {
00038 
00039     public:
00041     explicit CArrayHandler( const Reflex::Type& dictionary );
00042 
00044     ~CArrayHandler();
00045 
00047     size_t size( const void* address );
00048 
00050     IArrayIteratorHandler* iterate( const void* address );
00051 
00053     void appendNewElement( void* address, void* data );
00054 
00056     void clear( const void* address );
00057       
00059     Reflex::Type& iteratorReturnType();
00060 
00062     bool isAssociative() const { return false; }
00063       
00064     private:
00066     Reflex::Type m_type;
00067 
00069     Reflex::Type m_elementType;
00070 
00071   };
00072 
00073 }
00074 
00075 #endif