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

📄 warpluginengine.h

📁 ftpserver very good sample
💻 H
字号:
/** */#ifndef WAR_PLUGIN_ENGINE_H#define WAR_PLUGIN_ENGINE_H/* SYSTEM INCLUDES */#ifndef WAR_MAP_INCLUDED#   define WAR_MAP_INCLUDED#   include <map>#endif#ifndef WAR_LIST_INCLUDED#   define WAR_LIST_INCLUDED#   include <list>#endif/* PROJECT INCLUDES */#ifndef WAR_PLUGIN_MODULE_H#   include "WarPluginModule.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */class WarPluginBaseSupport;#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarPluginEngine {public:    typedef std::list<WarPluginModule *> module_list_t;    typedef std::multimap<std::string, WarPluginModule *> module_want_class_map_t;    // LIFECYCLE        /**    * Default constructor.    */    WarPluginEngine();          /**    * Destructor.    */    ~WarPluginEngine();        // OPERATORS    // OPERATIONS    void NotifyOnClassInstance(WarPluginModule *modulePtr,        const war_ccstr_t className)        throw(WarException);    void RegisterPluginSupportClassInstance(        WarPluginBaseSupport *pClassInstance)        throw (WarException);    void UnregisterPluginSupportClassInstance(        WarPluginBaseSupport *pClassInstance)        throw (WarException);    void RegisterPluginModule(WarPluginModule *pModule)        throw (WarException);        void UnregisterPluginModule(WarPluginModule *pModule)        throw (WarException);    // CALLBACK    // ACCESS    static WarPluginEngine& GetEngine()    {        if (!spThis)            WarThrow(WarError(WAR_ERR_INTERNAL_DATA_NOT_INITIALIZED), NULL);        return *spThis;    }    // INQUIRY    protected:private:    module_list_t::iterator Lookup(        const WarPluginModule *pModule)        throw(WarException);    void NotifyModules(        WarPluginBaseSupport *pClassInstance,        const WarPluginModule::NotificationE notificationType)        throw (WarException);        WarCriticalSection mLock;    module_list_t mModules;    module_want_class_map_t mNotifyList;    static WarPluginEngine *spThis;};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_PLUGIN_ENGINE_H_ */

⌨️ 快捷键说明

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