wariflogmodule.cpp

来自「ftpserver very good sample」· C++ 代码 · 共 127 行

CPP
127
字号
#include "StdAfx.h"#include "WarIfLogModule.h"   // class implemented/////////////////////////////// PUBLIC /////////////////////////////////////////============================= LIFECYCLE ====================================WarIfLogModule::WarIfLogModule(){}// WarIfLogModuleWarIfLogModule::~WarIfLogModule(){}// ~WarIfLogModule//============================= OPERATORS ====================================//============================= OPERATIONS ===================================void WarIfLogModule::Open(const WarWin32Registry& parentKey,         war_ccsysstr_t logName)        throw(WarException){    war_registrypath_t module_path;    mName = logName;        module_path << parentKey.GetRef().GetPath().GetPath()         << WAR_SYSSLASH << WAR_WINNT_REG_LOG_MODULES        << WAR_SYSSLASH << logName;        mRegKey.Open(WarWin32Registry::open_t(        parentKey, module_path));}//============================= ACCESS     ===================================void WarIfLogModule::SetEnable(const bool doEnable){    mRegKey.SetValue(WAR_WINNT_REG_ENABLE, doEnable);}void WarIfLogModule::SetFileName(const war_regstr_t& fileName) const{    mRegKey.SetValue(WAR_WINNT_REG_FILENAME, fileName);}void WarIfLogModule::SetTagName(const war_regstr_t& tagName) const{    mRegKey.SetValue(WAR_WINNT_REG_TAGNAME, tagName);}void WarIfLogModule::SetEvents(const war_regstr_t& newEvents) const{    mRegKey.SetValue(WAR_WINNT_REG_EVENTS, newEvents);}//============================= INQUIRY    ===================================bool WarIfLogModule::IsEnabled() const{    return mRegKey.GetIntValue(WAR_WINNT_REG_ENABLE, false);}war_regstr_t WarIfLogModule::GetClsid() const{    return mRegKey.GetStrValue(WAR_WINNT_REG_CLASSID, NULL, true);}bool WarIfLogModule::HaveFileName() const{    try    {        GetFileName();    }    catch(WarException)    {        return false;    }    return true;}war_regstr_t WarIfLogModule::GetFileName() const{    return mRegKey.GetStrValue(WAR_WINNT_REG_FILENAME, NULL, true);}bool WarIfLogModule::HaveTagName() const{    try    {        GetTagName();    }    catch(WarException)    {        return false;    }    return true;}war_regstr_t WarIfLogModule::GetTagName() const{    return mRegKey.GetStrValue(WAR_WINNT_REG_TAGNAME, NULL, true);}war_regstr_t WarIfLogModule::GetEvents() const{    return mRegKey.GetStrValue(WAR_WINNT_REG_EVENTS, 0);}war_ccsysstr_t WarIfLogModule::GetName() const{    return mName.c_str();}/////////////////////////////// PROTECTED  ////////////////////////////////////////////////////////////////// PRIVATE    ///////////////////////////////////

⌨️ 快捷键说明

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