CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/Fireworks/Core/interface/FWProxyBuilderConfiguration.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWProxyBuilderConfiguration_h
00002 #define Fireworks_Core_FWProxyBuilderConfiguration_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     FWProxyBuilderConfiguration
00007 // 
00016 //
00017 // Original Author:  
00018 //         Created:  Wed Jul 27 00:58:35 CEST 2011
00019 // $Id: FWProxyBuilderConfiguration.h,v 1.4 2011/08/16 01:16:05 amraktad Exp $
00020 //
00021 
00022 #include <string>
00023 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h"
00024 #include "Fireworks/Core/interface/FWViewType.h"
00025 #include "Fireworks/Core/interface/FWParameterSetterBase.h"
00026 #include "Fireworks/Core/interface/FWParameterSetterEditorBase.h"
00027 
00028 #include "Fireworks/Core/interface/FWParameters.h"
00029 #include "Fireworks/Core/interface/FWGenericParameterWithRange.h"
00030 
00031 #ifndef __CINT__
00032 #include <boost/shared_ptr.hpp>
00033 #include <sigc++/sigc++.h>
00034 #endif
00035 
00036 class TGCompositeFrame;
00037  
00038 class FWParameterBase;
00039 class FWConfiguration;
00040 class FWEventItem;
00041 
00042 //==============================================================================
00043 class FWProxyBuilderConfiguration : public FWConfigurableParameterizable,
00044                                     public FWParameterSetterEditorBase
00045 {
00046 public:
00047    FWProxyBuilderConfiguration(const FWConfiguration* c, const FWEventItem* item);
00048    virtual ~FWProxyBuilderConfiguration();
00049 
00050 
00051    template <class T> FWGenericParameter<T>* assertParam(const std::string& name, T def);
00052    template <class T> FWGenericParameterWithRange<T>* assertParam(const std::string& name, T def, T min, T max);
00053    template <class T> T value(const std::string& name);
00054 
00055 
00056    virtual void setFrom(const FWConfiguration& iFrom);
00057    virtual void addTo(FWConfiguration& iTo) const;
00058 
00059    void populateFrame(TGCompositeFrame* frame);
00060 
00061 private:
00062    void makeSetter(TGCompositeFrame*, FWParameterBase*);
00063 
00064    const FWConfiguration*  m_txtConfig;
00065    const FWEventItem*      m_item;
00066 
00067 #ifndef __CINT__
00068    std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
00069 #endif
00070 
00071 };
00072 #endif