Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-03 04:09:59

0001 #ifndef Fireworks_Core_FWSimpleProxyBuilder_h
0002 #define Fireworks_Core_FWSimpleProxyBuilder_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWSimpleProxyBuilder
0007 //
0008 /**\class FWSimpleProxyBuilder FWSimpleProxyBuilder.h Fireworks/Core/interface/FWSimpleProxyBuilder.h
0009 
0010    Description: <one line class summary>
0011 
0012    Usage:s
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones, AljaMrak-Tadel
0018 //         Created:  Tue March 28  2 09:46:36 EST 2010
0019 //
0020 
0021 // system include files
0022 #include <typeinfo>
0023 
0024 // user include files
0025 #include "Fireworks/Core/interface/FWProxyBuilderBase.h"
0026 #include "Fireworks/Core/interface/FWSimpleProxyHelper.h"
0027 
0028 // forward declarations
0029 
0030 class FWSimpleProxyBuilder : public FWProxyBuilderBase {
0031 public:
0032   FWSimpleProxyBuilder(const std::type_info& iType);
0033   ~FWSimpleProxyBuilder() override;
0034 
0035   // ---------- const member functions ---------------------
0036 
0037   // ---------- static member functions --------------------
0038   ///Used by the plugin system to determine how the proxy uses the data from FWEventItem
0039   static std::string typeOfBuilder();
0040 
0041   // ---------- member functions ---------------------------
0042 
0043 protected:
0044   using FWProxyBuilderBase::build;
0045   void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
0046   using FWProxyBuilderBase::buildViewType;
0047   void buildViewType(const FWEventItem* iItem,
0048                      TEveElementList* product,
0049                      FWViewType::EType viewType,
0050                      const FWViewContext*) override;
0051 
0052   //called once for each item in collection, the void* points to the
0053   // object properly offset in memory
0054   virtual void build(const void*, unsigned int iIndex, TEveElement& iItemHolder, const FWViewContext*) = 0;
0055   virtual void buildViewType(
0056       const void*, unsigned int iIndex, TEveElement& iItemHolder, FWViewType::EType, const FWViewContext*) = 0;
0057 
0058   void clean() override;
0059   FWSimpleProxyHelper m_helper;
0060 
0061 public:
0062   FWSimpleProxyBuilder(const FWSimpleProxyBuilder&) = delete;  // stop default
0063 
0064   const FWSimpleProxyBuilder& operator=(const FWSimpleProxyBuilder&) = delete;  // stop default
0065 private:
0066   virtual void itemChangedImp(const FWEventItem*);
0067 
0068   bool visibilityModelChanges(const FWModelId&, TEveElement*, FWViewType::EType, const FWViewContext*) override;
0069 
0070   // ---------- member data --------------------------------
0071 };
0072 
0073 #endif