BESRequestHandlerList.h
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
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef I_BESRequestHandlerList_h
00034 #define I_BESRequestHandlerList_h 1
00035
00036 #include <map>
00037 #include <string>
00038
00039 using std::map ;
00040 using std::string ;
00041
00042 #include "BESObj.h"
00043 #include "BESDataHandlerInterface.h"
00044
00045 class BESRequestHandler ;
00046
00054 class BESRequestHandlerList : public BESObj
00055 {
00056 private:
00057 static BESRequestHandlerList * _instance ;
00058 map< string, BESRequestHandler * > _handler_list ;
00059 protected:
00060 BESRequestHandlerList(void) {}
00061 public:
00062 virtual ~BESRequestHandlerList(void) {}
00063
00064 typedef map< string, BESRequestHandler * >::const_iterator Handler_citer ;
00065 typedef map< string, BESRequestHandler * >::iterator Handler_iter ;
00066
00067 virtual bool add_handler( const string &handler_name,
00068 BESRequestHandler * handler ) ;
00069 virtual BESRequestHandler * remove_handler( const string &handler_name ) ;
00070 virtual BESRequestHandler * find_handler( const string &handler_name ) ;
00071
00072 virtual Handler_citer get_first_handler() ;
00073 virtual Handler_citer get_last_handler() ;
00074
00075 virtual string get_handler_names() ;
00076
00077 virtual void execute_each( BESDataHandlerInterface &dhi ) ;
00078 virtual void execute_all( BESDataHandlerInterface &dhi ) ;
00079 virtual void execute_once( BESDataHandlerInterface &dhi ) ;
00080 virtual void execute_current( BESDataHandlerInterface &dhi );
00081
00082 virtual void dump( ostream &strm ) const ;
00083
00084 static BESRequestHandlerList *TheList() ;
00085 };
00086
00087 #endif // I_BESRequestHandlerList_h
00088