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);
85 private:
void ToString(
const std::string &_prefix,
86 std::ostringstream &_out)
const;
87 public: std::string ToString(
const std::string &_prefix)
const;
90 const std::string &_type,
91 const std::string &_defaultvalue,
93 const std::string &_description=
"");
95 public:
void AddValue(
const std::string &_type,
96 const std::string &_defaultValue,
bool _required,
97 const std::string &_description=
"");
129 public:
bool GetValueBool(
const std::string &_key =
"");
130 public:
int GetValueInt(
const std::string &_key =
"");
133 public:
unsigned int GetValueUInt(
const std::string &_key =
"");
134 public:
char GetValueChar(
const std::string &_key =
"");
138 const std::string &_key =
"");
140 const std::string &_key =
"");
145 public:
bool Set(
const bool &_value);
146 public:
bool Set(
const int &_value);
147 public:
bool Set(
const unsigned int &_value);
148 public:
bool Set(
const float &_value);
149 public:
bool Set(
const double &_value);
150 public:
bool Set(
const char &_value);
151 public:
bool Set(
const std::string &_value);
152 public:
bool Set(
const char *_value);
161 public:
bool HasElement(
const std::string &_name)
const;
174 public:
void Reset();
176 public:
void SetInclude(
const std::string &_filename);
188 private: boost::shared_ptr<Param> CreateParam(
const std::string &_key,
189 const std::string &_type,
const std::string &_defaultValue,
190 bool _required,
const std::string &_description=
"");
194 private: std::string name;
195 private: std::string required;
196 private: std::string description;
197 private:
bool copyChildren;
214 private: std::string includeFilename;
226 public:
void Write(
const std::string &_filename);
227 public: std::string
ToString()
const;