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_BESAggFactory_h
00034 #define I_BESAggFactory_h 1
00035
00036 #include <map>
00037 #include <string>
00038
00039 using std::map ;
00040 using std::string ;
00041
00042 #include "BESObj.h"
00043
00044 class BESAggregationServer ;
00045
00046 typedef BESAggregationServer * (*p_agg_handler)( string name ) ;
00047
00055 class BESAggFactory : public BESObj
00056 {
00057 private:
00058 static BESAggFactory * _instance ;
00059
00060 map< string, p_agg_handler > _handler_list ;
00061 protected:
00062 BESAggFactory(void) {}
00063 public:
00064 virtual ~BESAggFactory(void) {}
00065
00066 typedef map< string, p_agg_handler >::const_iterator Handler_citer ;
00067 typedef map< string, p_agg_handler >::iterator Handler_iter ;
00068
00069 virtual bool add_handler( string handler_name,
00070 p_agg_handler handler_method ) ;
00071 virtual bool remove_handler( string handler_name ) ;
00072 virtual BESAggregationServer *find_handler( string handler_name ) ;
00073
00074 virtual string get_handler_names() ;
00075
00076 virtual void dump( ostream &strm ) const ;
00077
00078 static BESAggFactory * TheFactory() ;
00079 };
00080
00081 #endif // I_BESAggFactory_h
00082