Antares Simulator
Power System Simulator
|
Local policy settings. More...
Typedefs | |
using | PolicyKey = Yuni::ShortString64 |
A key entry. | |
Functions | |
bool | Open (bool expandEntries=true) |
Open the local policies. | |
void | Close () |
Close all resources related to the local policies. | |
void | CheckRootPrefix (const char *argv0) |
Check the root prefix, and throws a FatalError if fails. | |
bool | Read (YString &out, const PolicyKey &key) |
Read the content of a single entry. | |
bool | ReadAsBool (const PolicyKey &key, bool defval=false) |
Read the content of a single entry as a bool. | |
void | DumpToLogs () |
Dump the entries to the logs. | |
void | DumpToString (Yuni::Clob &out) |
Dump to string. | |
bool | Read (String &out, const PolicyKey &key) |
void | DumpToString (Clob &out) |
Local policy settings.
bool LocalPolicy::Open | ( | bool | expandEntries = true | ) |
Open the local policies.
Nothing will be done (and will return true) if the local policies are already loaded.
expandEntries | True to expand the raw values |
bool LocalPolicy::Read | ( | YString & | out, |
const PolicyKey & | key ) |
Read the content of a single entry.
If the local policies are not opened, the value is guaranted to be empty.
bool LocalPolicy::ReadAsBool | ( | const PolicyKey & | key, |
bool | defval = false ) |
Read the content of a single entry as a bool.
If the local policies are not opened, the value is guaranted to be defval
.