00001 #ifndef SIO_SIOHANDLERMGR_H
00002 #define SIO_SIOHANDLERMGR_H 1
00003
00004 #include<map>
00005 #include<string>
00006 #include "SIO/SIOObjectHandler.h"
00007
00008
00009 namespace SIO {
00010
00011 typedef std::map< std::string, SIOObjectHandler* > SIOHandlerMap ;
00012
00019 class SIOHandlerMgr {
00020
00021 private:
00022
00023 SIOHandlerMgr() ;
00024
00025 public:
00026
00027 ~SIOHandlerMgr() ;
00028
00031 static SIOHandlerMgr* instance() ;
00032
00035 SIOObjectHandler* getHandler( const std::string& type ) ;
00036
00040 bool registerHandler( const std::string& type, SIOObjectHandler* handler ) ;
00041
00042
00043 private:
00044
00045 SIOHandlerMap _map{} ;
00046
00047 static SIOHandlerMgr* _me ;
00048
00049
00050 };
00051
00052 }
00053 #endif