(new in Rev2.40)
MQSetting class provides an access to a metaseq.setting.xml" file. It is available from MQBasePlugin::OpenSetting().
(in Rev4.00)
A file to access had been changed from "metaseq.ini" into "metaseq.setting.xml".
Class | |
MQSetting | Constructor |
~MQSetting | Destructor |
Plug-in | |
Load | Load values from a file |
Save | Save values to a file |
MQSetting::MQSetting(const char *section_name);
Usually, it is not necessary to call a construct directly. Please call MQBasePlugin::OpenSetting() to get a MQSetting class.
virtual MQSetting::~MQSetting();
A destructor is defined as a virtual function.
Usually, it is not necessary to delete. A class obtained by MQBasePlugin::OpenSetting() must be release by MQBasePlugin::CloseSetting().
void MQSetting::Load(const char *name, bool& value, bool default_value=false);
void MQSetting::Load(const char *name, int& value, int default_value=0);
void MQSetting::Load(const char *name, unsigned int& value, unsigned int default_value=0);
void MQSetting::Load(const char *name, float& value, float default_value=0.0f);
void MQSetting::Load(const char *name, std::string& value, std::string default_value="");
void MQSetting::Load(const char *name, std::wstring& value, std::wstring default_value="");
It reads a value in the specified item. A read value is set to the value variable. The value of the default_value variable will be set to the value variable in case no value is recorded in the specified item.
void MQSetting::Save(const char *name, const bool& value);
void MQSetting::Save(const char *name, const int& value);
void MQSetting::Save(const char *name, const unsigned int& value);
void MQSetting::Save(const char *name, const float& value);
void MQSetting::Save(const char *name, const std::string& value);
void MQSetting::Save(const char *name, const std::wstring& value);
It records a value of the value variable to the specified item.