Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

CMProcessor.h

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         // Destructor
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         //utility function to tokenize strings
00071         void tokenize( const std::string str, StringVec& tokens, const std::string& delimiters = " " );
00072 
00073     private:
00074         // Constructor
00075         CMProcessor();
00076 
00077         static CMProcessor*  _me;       //singleton instance
00078         ProcessorMap _mProcs;           //processor instances
00079         ssMap _mpDescriptions;          //processor descriptions
00080         sbMap _mpStatus;                //processor status ( INSTALLED=true ; NOT_INSTALLED=false )
00081         sSPMap _mpSParameters;          //processor string parameters
00082 
00083         sSet _mpTypes;                  //all processor types
00084         
00085     }; // end class CMProcessor
00086     
00087 } // end namespace marlin
00088 #endif

Generated on Mon Jan 12 09:48:50 2009 for Marlin by doxygen 1.3.5