waroptionlist.h

来自「ftpserver very good sample」· C头文件 代码 · 共 108 行

H
108
字号
/** */#ifndef WAR_OPTION_LIST_H#define WAR_OPTION_LIST_H/* SYSTEM INCLUDES */#ifndef WAR_MAP_INCLUDED#   define WAR_MAP_INCLUDED#   include <map>#endif/* PROJECT INCLUDES */#ifndef WAR_OPTION_H#   include "WarOption.h"#endif#ifndef WAR_EXCEPTION_H#   include "WarExeption.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 __cplusplustypedef std::map<const std::string, WarOption> war_option_map_t;typedef std::pair<const std::string, WarOption> war_option_pair_t;class WarOptionList : public war_option_map_t{public:    typedef struct options_def_t    {        war_ccstr_t mName;        WarOption::OptLevelE mLevel;        war_ccstr_t mDefaultValue;        WarOption::WarOptionTypeE mType;        war_ccstr_t mDescription;    } options_r;    // LIFECYCLE    // OPERATORS    /** Merges from with this. If from contains values      * that alredy exist in this, the existing values      * are kept      */    WarOptionList& operator += (const WarOptionList& from);    // OPERATIONS                           // ACCESS        std::string GetOption(const std::string& name) const        throw(WarException);        int GetIntOption(const std::string& name) const        throw(WarException);    static WarOptionList& GetGlobalOptions();    // INQUIRY    bool HaveOption(const std::string& name) const    {        war_option_map_t::const_iterator P = find(name);        return P != end();    }    static const options_def_t spStandardOptions[];    protected:private:    static WarOptionList *mspGlobalOptions;};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_OPTION_LIST_H_ */

⌨️ 快捷键说明

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