头文件结构
#ifndef COMMUNICATERHANDLLER_H #define COMMUNICATERHANDLLER_H #include "ace/Guard_T.h" #include "ace/Singleton.h" #ifndef COMMUNICATER_H #include "Communicater.h" #endif class CommunicaterHandller { typedef Communicater collect_service_type; public: CommunicaterHandller(void); ~CommunicaterHandller(void); private: ACE_RW_Thread_Mutex lock_; }; typedef ACE_Singleton<CommunicaterHandller,ACE_RW_Thread_Mutex> COMMUNICATERHANDLLER; #endif
原文地址:http://blog.csdn.net/calmreason/article/details/39665131