CLAM-Development
1.1
|
00001 #include "FlagControl.hxx" 00002 #include "ProcessingFactory.hxx" 00003 00004 00005 00006 namespace CLAM 00007 { 00008 00009 namespace Hidden 00010 { 00011 static const char * metadata[] = { 00012 "key", "FlagControl", 00013 "category", "Controls", 00014 "description", "FlagControl", 00015 0 00016 }; 00017 static FactoryRegistrator<ProcessingFactory, FlagControl> reg = metadata; 00018 } 00019 00020 void FlagControlConfig::DefaultInit(void) 00021 { 00022 AddAll(); 00023 UpdateData(); 00024 SetName("FlagControl"); 00025 SetFlag(false); 00026 } 00027 00028 FlagControl::FlagControl() 00029 : mFlagOutControl("Flag", this) 00030 { 00031 FlagControlConfig cfg; 00032 00033 Configure(cfg); 00034 } 00035 00036 FlagControl::FlagControl( const FlagControlConfig & cfg) 00037 : mFlagOutControl("Flag", this) 00038 00039 { 00040 00041 Configure(cfg); 00042 } 00043 00044 00045 bool FlagControl::Do() 00046 { 00047 if( !AbleToExecute() ) return true; 00048 mFlagOutControl.SendControl(mConfig.GetFlag()); 00049 return true; 00050 } 00051 00052 bool FlagControl::ConcreteConfigure(const ProcessingConfig& c) 00053 { 00054 CopyAsConcreteConfig(mConfig, c); 00055 return true; 00056 } 00057 00058 } // namespace CLAM 00059