Page MenuHomedesp's stash

Configuration.cpp
No OneTemporary

Configuration.cpp

#include "Configuration.h"
Configuration::Configuration(const WCHAR* name, Type type)
{
wcscpy_s(this->name, name);
this->type = type;
valueNumeric = 0;
valueString[0] = L'\0';
}
const WCHAR* Configuration::getName() const
{
return name;
}
Configuration::Type Configuration::getType() const
{
return type;
}
DWORD_PTR Configuration::getNumeric() const
{
return valueNumeric;
}
void Configuration::setNumeric(DWORD_PTR value)
{
valueNumeric = value;
}
const WCHAR* Configuration::getString() const
{
return valueString;
}
void Configuration::setString(const WCHAR* str)
{
wcsncpy_s(valueString, str, _countof(valueString));
}
bool Configuration::getBool() const
{
return getNumeric() == 1;
}
void Configuration::setBool(bool flag)
{
setNumeric(flag ? 1 : 0);
}
bool Configuration::isTrue() const
{
return getBool();
}
void Configuration::setTrue()
{
setBool(true);
}
void Configuration::setFalse()
{
setBool(false);
}

File Metadata

Mime Type
text/x-c
Expires
Fri, Jan 9, 4:57 AM (16 h, 18 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
12/60/bb67fa1b8465cbd3017c02ab93d8

Event Timeline