48 wml_key(
const std::string& name,
const std::string&
type,
const std::string& def =
"\"\"")
53 ,
fuzzy_(name.find_first_of(
"*?") != std::string::npos)
120 void print(std::ostream& os,
int level)
const;
A config object defines a single node in a WML file, with access to child nodes.
wml_key is used to save the information about one key.
const std::string & get_name() const
bool operator<(const wml_key &k) const
Compares keys by name.
bool mandatory_
Shows, if key is a mandatory key.
std::string type_
Type of key.
const std::string & get_type() const
void set_mandatory(bool mandatory)
void set_default(const std::string &def)
const std::string & get_default() const
std::string default_
Default value.
bool is_mandatory() const
std::string name_
Name of key.
void set_type(const std::string &type)
void print(std::ostream &os, int level) const
is used to print key info the format is next [key] name="name" type="type" default="default" mandator...
void set_name(const std::string &name)
bool fuzzy_
Whether the key is a fuzzy match.
wml_key(const std::string &name, const std::string &type, const std::string &def="\"\"")