Go to the documentation of this file.
47 bool hasChildAt(
const std::string& childTag) {
return !!
get(childTag); }
72 template<
typename T = std::
string>
74 template<
typename T = std::
string>
75 T
valueAt(
const std::string& childTag);
76 template<
typename T = std::
string>
78 template<
typename T = std::
string>
79 T
valueAt(
const std::string& childTag,
const T& def);
80 template<
typename T = std::
string>
84 void write(
const T& v);
86 void writeAt(
const std::string& childTag,
const T& v);
90 virtual std::string
emit();
108 inline std::string OTMLNode::value<std::string>() {
109 std::string value = m_value;
111 value = value.substr(1, value.length()-2);
132 return node->
value<T>();
138 return node->
value<T>();
145 return node->value<T>();
152 return node->value<T>();
158 m_value = stdext::safe_cast<std::string>(v);
void setTag(const std::string &tag)
void setSource(const std::string &source)
void writeAt(const std::string &childTag, const T &v)
All OTML errors throw this exception.
bool removeChild(const OTMLNodePtr &oldChild)
bool cast(const T &in, R &out)
T valueAtIndex(int childIndex)
bool starts_with(const std::string &str, const std::string &test)
void addChild(const OTMLNodePtr &newChild)
bool replaceChild(const OTMLNodePtr &oldChild, const OTMLNodePtr &newChild)
T valueAt(const std::string &childTag)
void setUnique(bool unique)
virtual std::string emit()
OTMLNodePtr getIndex(int childIndex)
void setValue(const std::string &value)
std::vector< OTMLNodePtr > OTMLNodeList
OTMLNodePtr get(const std::string &childTag)
bool ends_with(const std::string &str, const std::string &test)
void merge(const OTMLNodePtr &node)
void copy(const OTMLNodePtr &node)
void replace_all(std::string &str, const std::string &search, const std::string &replacement)
bool hasChildAt(const std::string &childTag)
bool hasChildAtIndex(int childIndex)
OTMLNodePtr atIndex(int childIndex)
OTMLNodePtr at(const std::string &childTag)
static OTMLNodePtr create(std::string tag="", bool unique=false)