Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:31

0001 #ifndef Fireworks_Core_FWItemAccessorBase_h
0002 #define Fireworks_Core_FWItemAccessorBase_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWItemAccessorBase
0007 //
0008 /**\class FWItemAccessorBase FWItemAccessorBase.h Fireworks/Core/interface/FWItemAccessorBase.h
0009 
0010    Description: Base class used to access data stored in an edm::EDProduct
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Sat Oct 18 08:14:21 EDT 2008
0019 //
0020 
0021 // system include files
0022 #include <typeinfo>
0023 
0024 // user include files
0025 
0026 // forward declarations
0027 class TClass;
0028 namespace edm {
0029   class EDProduct;
0030   class ObjectWithDict;
0031 }  // namespace edm
0032 
0033 class FWItemAccessorBase {
0034 public:
0035   FWItemAccessorBase();
0036   virtual ~FWItemAccessorBase();
0037 
0038   // ---------- const member functions ---------------------
0039   virtual const void* modelData(int iIndex) const = 0;
0040   virtual const void* data() const = 0;
0041   virtual unsigned int size() const = 0;
0042   virtual const TClass* modelType() const = 0;
0043   virtual const TClass* type() const = 0;
0044 
0045   virtual bool isCollection() const = 0;
0046 
0047   ///override if id of an object should be different than the index
0048   //virtual std::string idForIndex(int iIndex) const;
0049   // ---------- member functions ---------------------------
0050   virtual void setData(const edm::ObjectWithDict&) = 0;
0051   virtual void reset() = 0;
0052 
0053 private:
0054   //FWItemAccessorBase(const FWItemAccessorBase&); // stop default
0055 
0056   //const FWItemAccessorBase& operator=(const FWItemAccessorBase&); // stop default
0057 
0058   // ---------- member data --------------------------------
0059 };
0060 
0061 #endif