#pragma once #include #ifdef Log4CPP_TLSLog_EXPORTS #define __Log4CPP_TLSLog_API _declspec(dllexport) #else #define __Log4CPP_TLSLog_API _declspec(dllimport) #endif //----------------------------------------------------------------------------- // Log4CPP::Context //----------------------------------------------------------------------------- namespace Log4CPP { namespace ThreadContext { //----------------------------------------------------------------------------- // TLSMessage //----------------------------------------------------------------------------- class __Log4CPP_TLSLog_API TLSMessage { protected: TLSMessage () = delete; public: static char * Get (); static int Size (); }; //----------------------------------------------------------------------------- // TLSLayout //----------------------------------------------------------------------------- class __Log4CPP_TLSLog_API TLSLayout { protected: TLSLayout () = delete; public: static char * Get (); static int Size (); }; #if 0 //----------------------------------------------------------------------------- // ThreadName // 在异步缓存时, 线程名称没法转移 //----------------------------------------------------------------------------- class __Log4CPP_TLSLog_API ThreadName { protected: ThreadName () = delete; public: static const char * Get (); static void Set (const char * Name); }; #endif //----------------------------------------------------------------------------- // ThreadName // 仅供 Log4CPP 内部使用, 避免跟调用者的 Buffer 混淆 //----------------------------------------------------------------------------- class __Log4CPP_TLSLog_API TLSInternal { protected: TLSInternal () = delete; public: static char * Get (); static int Size (); }; } };