00001 #ifndef CMPROCESSOR_H
00002 #define CMPROCESSOR_H
00003
00004 #include "marlin/Processor.h"
00005 #include "marlin/ProcessorMgr.h"
00006
00007 namespace marlin{
00008 typedef std::set< std::string > sSet;
00009 typedef std::map< std::string, bool > sbMap;
00010 typedef std::map< std::string, std::string > ssMap;
00011 typedef std::map< std::string, StringParameters* > sSPMap;
00012
00021 class CMProcessor{
00022
00023 public:
00024
00025 ~CMProcessor();
00026
00028 static CMProcessor* instance() ;
00029
00031 Processor* getProc( const std::string& type );
00032
00034 ssMap getProcDesc(){ return _mpDescriptions; }
00035
00037 StringParameters* getSParams( const std::string& type );
00038
00041 StringParameters* mergeParams( const std::string& type, StringParameters* sp );
00042
00045 ProcessorParameter* getParam( const std::string& type, const std::string& key );
00046
00049 const std::string getParamD( const std::string& type, const std::string& key );
00050
00053 const std::string getParamT( const std::string& type, const std::string& key );
00054
00057 int getParamSetSize( const std::string& type, const std::string& key );
00058
00061 bool isParamVec( const std::string& type, const std::string& key );
00062
00065 bool isParamOpt( const std::string& type, const std::string& key );
00066
00068 bool isInstalled( const std::string& type );
00069
00070
00071 void tokenize( const std::string str, StringVec& tokens, const std::string& delimiters = " " );
00072
00073 private:
00074
00075 CMProcessor();
00076
00077 static CMProcessor* _me;
00078 ProcessorMap _mProcs;
00079 ssMap _mpDescriptions;
00080 sbMap _mpStatus;
00081 sSPMap _mpSParameters;
00082
00083 sSet _mpTypes;
00084
00085 };
00086
00087 }
00088 #endif