📄 warifuser.cpp
字号:
#include "StdAfx.h"#include "WarIfUser.h" // class implemented#include "WarIfAuthModule.h"#include "WarIfOptions.h"/////////////////////////////// PUBLIC /////////////////////////////////////////============================= LIFECYCLE ====================================WarIfUser::WarIfUser(war_if_aut_module_ptr_t rAuthPtr, WarUserAuthData& rAutData) :mAuthPtr(rAuthPtr){ mRegKey.Create(rAutData.mRegRoot.GetRef()); mName = WarCollector<war_sysch_t>(rAutData.GetUserName()).GetValue(); bOriginDisabled = rAutData.IsEnabled() == true; mEnabled = rAutData.mRegRoot.GetIntValue(WAR_WINNT_REG_ENABLE, false);}// WarIfUserWarIfUser::~WarIfUser(){}// ~WarIfUser//============================= OPERATORS ====================================//============================= OPERATIONS ===================================void WarIfUser::SetEnable(const bool doEnable) throw(WarException){ NeedRegistry(); mRegKey.SetValue(WAR_WINNT_REG_ENABLE, doEnable);}war_if_options_ptr_t WarIfUser::GetOptions(){ return new WarIfOptions(*this);}//============================= ACCESS ===================================WarIfAuthModule& WarIfUser::GetIfAuth() throw(WarException){ return *mAuthPtr;}const WarWin32Registry& WarIfUser::GetRegKey() throw(WarException){ NeedRegistry(); return mRegKey;}//============================= INQUIRY ===================================const WarIfUser::string_t& WarIfUser::GetUserName() const throw(WarException){ return mName;}war_ccsysstr_t WarIfUser::GetAuthModuleName() const throw(WarException){ return mAuthPtr->GetModuleTypeName();}bool WarIfUser::IsEnabled() const throw(WarException){ return mRegKey.IsOpen() ? mRegKey.GetIntValue(WAR_WINNT_REG_ENABLE, false) : mEnabled;}bool WarIfUser::IsOriginEnabled() const throw(WarException){ return bOriginDisabled;}/////////////////////////////// PROTECTED ////////////////////////////////////////////////////////////////// PRIVATE ///////////////////////////////////void WarIfUser::NeedRegistry() throw(WarException){}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -