00001 // 00002 // C++ Interface: ot_codecRepository 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: Alessandro Bonfanti <xjbon@tin.it>, (C) 2005 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 #ifndef OTCODECREPOSITORY_H 00013 #define OTCODECREPOSITORY_H 00014 00015 #include "ot_lib.h" 00016 00017 00018 00019 // ------------------------------------------------------ 00021 00022 // ------------------------------------------------------ 00023 00024 class ot_codecRepository 00025 { 00026 00027 private: 00028 static ot_codecRepository *m_inst; 00029 00030 map<string,const ot_messageCodec *> m_codecList; 00031 00032 ot_codecRepository(void); 00033 00034 void exitInstance(void); 00035 00036 00037 public: 00038 00039 ~ot_codecRepository(void); 00040 00041 static ot_codecRepository * getInstance(void); 00042 00043 00044 const ot_messageCodec * getStdCodec(void) const; 00045 const ot_messageCodec * getCodec(const string &codecName) const; 00046 void registerCodec(const ot_messageCodec *codec); 00047 const list<string> getRegisteredCodec(void) const; 00048 00049 friend class exitHandler; 00050 }; 00051 00052 #endif