8 #ifndef META_OCEAN_IO_XML_CONFIG_H
9 #define META_OCEAN_IO_XML_CONFIG_H
66 unsigned int values() const override;
72 unsigned int values(const std::
string& name) const override;
78 bool exist(const std::
string& name) const override;
84 XMLValue& value(const std::
string& name, const
unsigned int index) override;
90 bool value(const std::
string& name, const
unsigned int index,
Value** value) override;
96 XMLValue& value(const
unsigned int index, std::
string& name) override;
102 bool value(const
unsigned int index, std::
string& name,
Value** value) override;
109 XMLValue& add(const std::
string& name) override;
116 std::
string attribute(const std::
string& name) const;
122 bool operator()(const
bool value) const override;
128 int operator()(const
int value) const override;
134 double operator()(const
double value) const override;
140 std::
string operator()(const std::
string& value) const override;
146 std::vector<
bool> operator()(const std::vector<
bool>& value) const override;
152 std::vector<
int> operator()(const std::vector<
int>& value) const override;
158 std::vector<
double> operator()(const std::vector<
double>& value) const override;
164 std::vector<std::
string> operator()(const std::vector<std::
string>& value) const override;
170 bool operator=(const
bool value) override;
176 bool operator=(const
int value) override;
182 bool operator=(const
double value) override;
188 bool operator=(const std::
string& value) override;
194 bool operator=(const std::vector<
bool>& values) override;
200 bool operator=(const std::vector<
int>& values) override;
206 bool operator=(const std::vector<
double>& values) override;
212 bool operator=(const std::vector<std::
string>& values) override;
218 XMLValue& operator[](const std::
string& name) override;
224 explicit operator
bool() const;
244 tinyxml2::XMLNode* xmlNode_ =
nullptr;
272 explicit
XMLConfig(const std::
string& filename, const
bool read = true);
279 explicit
XMLConfig(std::istream& inputStream, const
bool read = true);
285 inline const std::
string& filename() const;
294 bool setFilename(const std::
string& filename, const
bool read = true);
300 bool read() override;
306 bool write() override;
312 unsigned int values() const override;
318 unsigned int values(const std::
string& name) const override;
324 bool exist(const std::
string& name) const override;
330 XMLValue& value(const
unsigned int index, std::
string& name) override;
336 bool value(const
unsigned int index, std::
string& name,
Value** value) override;
342 XMLValue& value(const std::
string& name, const
unsigned int index) override;
348 bool value(const std::
string& name, const
unsigned int index,
Value** value) override;
355 XMLValue& add(const std::
string& name) override;
361 XMLValue& operator[](const std::
string& name) override;
367 bool isEmpty() const;
376 static const tinyxml2::XMLText* firstText(const tinyxml2::XMLNode* xmlNode);
383 static tinyxml2::XMLText* firstText(tinyxml2::XMLNode* xmlNode);
394 tinyxml2::XMLDocument* xmlDocument_ =
nullptr;
400 std::
string filename_;
403 std::istream& inputStream_;
406 std::ifstream inputFileStream_;
409 inline const std::
string&
XMLConfig::filename()
const
This class implements a configuration value.
Definition: Config.h:77
This class implements an application or module configuration toolkit.
Definition: Config.h:38
Definition of a file value object.
Definition: XMLConfig.h:46
This class implements a configuration toolkit using XML encoding to store the parameters.
Definition: XMLConfig.h:39
std::vector< XMLValue * > XMLValues
Definition of a vector holding values.
Definition: XMLConfig.h:252
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15