22 #include <boost/shared_ptr.hpp>
23 #include <boost/enable_shared_from_this.hpp>
27 #define SDF_VERSION "1.3"
35 typedef boost::shared_ptr<SDF>
SDFPtr;
43 class Element :
public boost::enable_shared_from_this<Element>
48 public: boost::shared_ptr<Element>
Clone()
const;
56 public:
void SetName(
const std::string &_name);
57 public:
const std::string &
GetName()
const;
67 public:
void PrintWiki(std::string _prefix);
76 int _spacing,
int &_index);
84 int _spacing,
int &_index);
86 private:
void ToString(
const std::string &_prefix,
87 std::ostringstream &_out)
const;
88 public: std::string ToString(
const std::string &_prefix)
const;
91 const std::string &_type,
92 const std::string &_defaultvalue,
94 const std::string &_description=
"");
96 public:
void AddValue(
const std::string &_type,
97 const std::string &_defaultValue,
bool _required,
98 const std::string &_description=
"");
130 public:
bool GetValueBool(
const std::string &_key =
"");
131 public:
int GetValueInt(
const std::string &_key =
"");
134 public:
unsigned int GetValueUInt(
const std::string &_key =
"");
135 public:
char GetValueChar(
const std::string &_key =
"");
139 const std::string &_key =
"");
141 const std::string &_key =
"");
146 public:
bool Set(
const bool &_value);
147 public:
bool Set(
const int &_value);
148 public:
bool Set(
const unsigned int &_value);
149 public:
bool Set(
const float &_value);
150 public:
bool Set(
const double &_value);
151 public:
bool Set(
const char &_value);
152 public:
bool Set(
const std::string &_value);
153 public:
bool Set(
const char *_value);
162 public:
bool HasElement(
const std::string &_name)
const;
184 public:
void Reset();
186 public:
void SetInclude(
const std::string &_filename);
198 private: boost::shared_ptr<Param> CreateParam(
const std::string &_key,
199 const std::string &_type,
const std::string &_defaultValue,
200 bool _required,
const std::string &_description=
"");
204 private: std::string name;
205 private: std::string required;
206 private: std::string description;
207 private:
bool copyChildren;
224 private: std::string includeFilename;
236 public:
void Write(
const std::string &_filename);
237 public: std::string
ToString()
const;