+ const std::string tag;
+ const std::string src_name;
+ const int src_line;
+
+ /** Get the value of an option, using def if it does not exist */
+ std::string getString(const std::string& key, const std::string& def = "");
+ /** Get the value of an option, using def if it does not exist */
+ long getInt(const std::string& key, long def = 0);
+ /** Get the value of an option, using def if it does not exist */
+ double getFloat(const std::string& key, double def = 0);
+ /** Get the value of an option, using def if it does not exist */
+ bool getBool(const std::string& key, bool def = false);
+
+ /** Get the value of an option
+ * @param key The option to get
+ * @param value The location to store the value (unmodified if does not exist)
+ * @param allow_newline Allow newlines in the option (normally replaced with spaces)
+ * @return true if the option exists
+ */
+ bool readString(const std::string& key, std::string& value, bool allow_newline = false);
+
+ std::string getTagLocation();
+
+ inline const std::vector<KeyVal>& getItems() const { return items; }
+
+ /** Create a new ConfigTag, giving access to the private KeyVal item list */
+ static ConfigTag* create(const std::string& Tag, const std::string& file, int line, std::vector<KeyVal>*& Items);
+ private:
+ ConfigTag(const std::string& Tag, const std::string& file, int line);