Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:03

0001 #ifndef Fireworks_Core_FWProxyBuilderConfiguration_h
0002 #define Fireworks_Core_FWProxyBuilderConfiguration_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWProxyBuilderConfiguration
0007 //
0008 /**\class FWProxyBuilderConfiguration FWProxyBuilderConfiguration.h Fireworks/Core/interface/FWProxyBuilderConfiguration.h
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:
0018 //         Created:  Wed Jul 27 00:58:35 CEST 2011
0019 //
0020 
0021 #include <string>
0022 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h"
0023 #include "Fireworks/Core/interface/FWViewType.h"
0024 #include "Fireworks/Core/interface/FWParameterSetterBase.h"
0025 #include "Fireworks/Core/interface/FWParameterSetterEditorBase.h"
0026 
0027 #include "Fireworks/Core/interface/FWParameters.h"
0028 #include "Fireworks/Core/interface/FWGenericParameterWithRange.h"
0029 
0030 #ifndef __CINT__
0031 #include <memory>
0032 #include <sigc++/sigc++.h>
0033 #endif
0034 
0035 class TGCompositeFrame;
0036 
0037 class FWParameterBase;
0038 class FWConfiguration;
0039 class FWEventItem;
0040 
0041 //==============================================================================
0042 class FWProxyBuilderConfiguration : public FWConfigurableParameterizable, public FWParameterSetterEditorBase {
0043 public:
0044   FWProxyBuilderConfiguration(const FWConfiguration* c, const FWEventItem* item);
0045   ~FWProxyBuilderConfiguration() override;
0046 
0047   template <class T>
0048   FWGenericParameter<T>* assertParam(const std::string& name, T def);
0049   template <class T>
0050   FWGenericParameterWithRange<T>* assertParam(const std::string& name, T def, T min, T max);
0051   template <class T>
0052   T value(const std::string& name);
0053 
0054   void setFrom(const FWConfiguration& iFrom) override;
0055   void addTo(FWConfiguration& iTo) const override;
0056 
0057   void populateFrame(TGCompositeFrame* frame);
0058 
0059   void keepEntries(bool b);
0060 
0061 private:
0062   void makeSetter(TGCompositeFrame*, FWParameterBase*);
0063 
0064   const FWConfiguration* m_txtConfig;
0065   const FWEventItem* m_item;
0066 
0067   bool m_keepEntries;
0068 #ifndef __CINT__
0069   std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
0070 #endif
0071 };
0072 #endif