⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 warthreadengine.h

📁 ftpserver very good sample
💻 H
字号:
/** */#ifndef WAR_THREAD_ENGINE_H#define WAR_THREAD_ENGINE_H/* SYSTEM INCLUDES */#ifndef WAR_SET_INCLUDED#   define WAR_SET_INCLUDED#   include <set>#endif/* PROJECT INCLUDES */#ifndef WAR_THREAD_H#   include "WarThread.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarThreadEngine {public:    typedef std::set<war_thread_ptr_t> thread_set_t;    // LIFECYCLE        /**    * Default constructor.    */    WarThreadEngine();        /**    * Destructor.    */    ~WarThreadEngine();        // OPERATORS        // OPERATIONS    void SetPriOnAllThreads(const WarPrioritiesDefE newPriority);    // CALLBACK    // ACCESS    static WarThreadEngine& GetEngine()    {        if (NULL == mspThis)            WarThrow(WarError(WAR_ERR_INTERNAL_DATA_NOT_INITIALIZED), NULL);        return *mspThis;    }    // INQUIRY    protected:    friend class WarThread;    void AddThread(WarThread *pThread);    void RemoveThread(WarThread *pThread);private:    thread_set_t mThreads;    WarCriticalSection mLock;    static WarThreadEngine *mspThis;};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_THREAD_ENGINE_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -