CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/Fireworks/Core/src/FWItemTVirtualCollectionProxyAccessor.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWItemTVirtualCollectionProxyAccessor_h
00002 #define Fireworks_Core_FWItemTVirtualCollectionProxyAccessor_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     FWItemTVirtualCollectionProxyAccessor
00007 //
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Sat Oct 18 08:43:45 EDT 2008
00019 // $Id: FWItemTVirtualCollectionProxyAccessor.h,v 1.5 2010/07/23 16:02:54 eulisse Exp $
00020 //
00021 
00022 // system include files
00023 #include "boost/shared_ptr.hpp"
00024 
00025 // user include files
00026 #include "Fireworks/Core/interface/FWItemAccessorBase.h"
00027 
00028 // forward declarations
00029 class TVirtualCollectionProxy;
00030 
00031 class FWItemTVirtualCollectionProxyAccessor : public FWItemAccessorBase {
00032 
00033 public:
00034    FWItemTVirtualCollectionProxyAccessor(const TClass* iType,
00035                                          boost::shared_ptr<TVirtualCollectionProxy> iProxy,
00036                                          size_t iOffset=0);
00037    virtual ~FWItemTVirtualCollectionProxyAccessor();
00038 
00039    // ---------- const member functions ---------------------
00040    virtual const void* modelData(int iIndex) const ;
00041    virtual const void* data() const;
00042    virtual unsigned int size() const;
00043    const TClass* modelType() const;
00044    const TClass* type() const;
00045 
00046    bool isCollection() const;
00047 
00048    // ---------- static member functions --------------------
00049 
00050    // ---------- member functions ---------------------------
00051    void setData(const ROOT::Reflex::Object& );
00052    void reset();
00053 
00054 private:
00055    FWItemTVirtualCollectionProxyAccessor(const FWItemTVirtualCollectionProxyAccessor&); // stop default
00056 
00057    const FWItemTVirtualCollectionProxyAccessor& operator=(const FWItemTVirtualCollectionProxyAccessor&); // stop default
00058 
00059    // ---------- member data --------------------------------
00060    const TClass* m_type;
00061    boost::shared_ptr<TVirtualCollectionProxy> m_colProxy; //should be something other than shared_ptr
00062    mutable const void * m_data;
00063    size_t m_offset;
00064 };
00065 
00066 
00067 #endif