SMSTransformationChainConfig.hxx
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SMSTransformationChainConfig_
00023 #define _SMSTransformationChainConfig_
00024
00025 #include "ProcessingComposite.hxx"
00026 #include "ProcessingData.hxx"
00027 #include "InPort.hxx"
00028 #include "OutPort.hxx"
00029 #include "InControlArray.hxx"
00030 #include "Array.hxx"
00031
00032 #include "Frame.hxx"
00033 #include "SegmentTransformation.hxx"
00034
00035 namespace CLAM{
00036
00037
00043 class SMSTransformationChaineeConfig:public ProcessingConfig
00044 {
00045 public:
00046 DYNAMIC_TYPE_USING_INTERFACE (SMSTransformationChaineeConfig, 1,ProcessingConfig);
00048 DYN_ATTRIBUTE (0, public, std::string, ConcreteClassName);
00049 public:
00053 void DefaultInit();
00057 void CopyInit(const SMSTransformationChaineeConfig& originalConfig);
00061 void StoreOn(Storage & s) const;
00065 void LoadFrom(Storage& s);
00067 ProcessingConfig& GetConcreteConfig() const {return *mpConcreteConfig;}
00072 void SetConcreteConfig(const ProcessingConfig& cfg)
00073 {
00074 AddConcreteConfig();
00075 *mpConcreteConfig=cfg;
00076 }
00077
00079 virtual ~SMSTransformationChaineeConfig();
00080
00085 void AddConcreteConfig()
00086 {
00087 if(mpConcreteConfig)
00088 delete mpConcreteConfig;
00089 mpConcreteConfig=InstantiateConcreteConfig();
00090 }
00091
00092
00093 protected:
00095 ProcessingConfig* InstantiateConcreteConfig(const std::string& type);
00096
00100 ProcessingConfig* InstantiateConcreteConfig()
00101 {
00102 return InstantiateConcreteConfig(GetConcreteClassName());
00103 }
00104
00108 ProcessingConfig* mpConcreteConfig;
00109
00110 };
00111
00112
00118 class SMSTransformationChainConfig:public ProcessingConfig
00119 {
00120 public:
00121 typedef std::list<SMSTransformationChaineeConfig>::iterator iterator;
00122 typedef std::list<SMSTransformationChaineeConfig>::const_iterator const_iterator;
00123
00124 DYNAMIC_TYPE_USING_INTERFACE (SMSTransformationChainConfig, 2, ProcessingConfig);
00126 DYN_CONTAINER_ATTRIBUTE (0, public, std::list<SMSTransformationChaineeConfig>, Configurations, Config);
00128 DYN_ATTRIBUTE (1, public, Array<bool>, OnArray);
00129
00130
00132 void DefaultInit();
00134 iterator ConfigList_begin() {return GetConfigurations().begin();}
00136 iterator ConfigList_end() {return GetConfigurations().end();}
00137
00139 const_iterator ConfigList_begin_const() const {return GetConfigurations().begin();}
00141 const_iterator ConfigList_end_const() const {return GetConfigurations().end();}
00142
00143 bool AddSMSConfiguration(const SegmentTransformationConfig& cfg,std::string type)
00144 {
00145 AddConfiguration(cfg,type);
00146 return true;
00147 }
00148
00150 std::size_t ConfigList_size() const {return GetConfigurations().size();}
00151
00152
00153
00155 bool IsEmpty(){return GetnConfigurations()<=0;}
00157 TSize GetnConfigurations(){return ConfigList_size();}
00158
00160 virtual ~SMSTransformationChainConfig(){}
00161 protected:
00163 virtual void AddConfiguration(const ProcessingConfig& newConcreteConfig,const std::string& className);
00164
00165 };
00166
00167 }
00168
00169 #endif
00170