20 #ifndef COIL_PROPERTIES_H
21 #define COIL_PROPERTIES_H
127 Properties(
const char* key =
"",
const char* value =
"");
150 Properties(std::map<std::string, std::string>& defaults);
210 Properties(
const char* defaults[],
long num = LONG_MAX);
283 inline const char*
getName(
void)
const {
return name.c_str();}
302 inline const char*
getValue(
void)
const {
return value.c_str();}
340 inline const std::vector<Properties*>&
getLeaf(
void)
const {
return leaf;}
390 const std::string&
getProperty(
const std::string& key)
const;
420 const std::string&
getProperty(
const std::string& key,
421 const std::string& def)
const;
451 const std::string&
operator[](
const std::string& key)
const;
485 std::string&
operator[](
const std::string& key);
511 const std::string&
getDefault(
const std::string& key)
const;
541 std::string
setProperty(
const std::string& key,
const std::string& value);
566 std::string
setDefault(
const std::string& key,
const std::string& value);
595 void setDefaults(
const char* defaults[],
long num = LONG_MAX);
621 void list(std::ostream& out);
749 void load(std::istream& inStream);
776 void save(std::ostream& out,
const std::string& header);
860 void store(std::ostream& out,
const std::string& header);
909 int size(
void)
const;
1105 static void splitKeyValue(
const std::string& str, std::string& key,
1106 std::string& value);
1139 static bool split(
const std::string& str,
const char delim,
1140 std::vector<std::string>& value);
1175 std::vector<Properties*>::size_type index,
1200 std::string curr_name,
1224 static void _store(std::ostream& out, std::string curr_name,
1280 static std::string
indent(
int index);
1285 std::string default_value;
1287 std::vector<Properties*> leaf;
1288 const std::string m_empty;
1317 #endif // COIL_PROPERTIES_H