diff options
Diffstat (limited to 'indra/llxml/llxmlnode.h')
-rw-r--r-- | indra/llxml/llxmlnode.h | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h index e09c89c543..d5b8b36d86 100644 --- a/indra/llxml/llxmlnode.h +++ b/indra/llxml/llxmlnode.h @@ -121,39 +121,39 @@ public: LLXMLNode(const char* name, bool is_attribute); LLXMLNode(LLStringTableEntry* name, bool is_attribute); LLXMLNode(const LLXMLNode& rhs); - LLXMLNodePtr deepCopy() const; + LLXMLNodePtr deepCopy(); bool isNull(); bool deleteChild(LLXMLNode* child); - void addChild(LLXMLNodePtr& new_child); + void addChild(LLXMLNodePtr& new_child); void setParent(LLXMLNodePtr& new_parent); // reparent if necessary - // Deserialization + // Serialization static bool parseFile( const std::string& filename, - LLXMLNodePtr& node, - LLXMLNode* defaults_tree, - bool cacheable = false); - static bool parseBuffer( - const char* buffer, - U32 length, - LLXMLNodePtr& node, - LLXMLNode* defaults); + LLXMLNodePtr& node, + LLXMLNode* defaults_tree); + static bool parseBuffer( + U8* buffer, + U32 length, + LLXMLNodePtr& node, + LLXMLNode* defaults); static bool parseStream( std::istream& str, - LLXMLNodePtr& node, + LLXMLNodePtr& node, LLXMLNode* defaults); static bool updateNode( LLXMLNodePtr& node, LLXMLNodePtr& update_node); - - static bool getLayeredXMLNode(LLXMLNodePtr& root, const std::vector<std::string>& paths, bool cacheable = false); - + + static bool getLayeredXMLNode(LLXMLNodePtr& root, const std::vector<std::string>& paths); + + // Write standard XML file header: // <?xml version="1.0" encoding="utf-8" standalone="yes" ?> static void writeHeaderToFile(LLFILE *out_file); - + // Write XML to file with one attribute per line. // XML escapes values as they are written. void writeToFile(LLFILE *out_file, const std::string& indent = std::string(), bool use_type_decorations=true); @@ -237,7 +237,7 @@ public: // Setters bool setAttributeString(const char* attr, const std::string& value); - + void setBoolValue(const bool value) { setBoolValue(1, &value); } void setByteValue(const U8 value, Encoding encoding = ENCODING_DEFAULT) { setByteValue(1, &value, encoding); } void setIntValue(const S32 value, Encoding encoding = ENCODING_DEFAULT) { setIntValue(1, &value, encoding); } @@ -290,10 +290,6 @@ public: protected: bool removeChild(LLXMLNode* child); - static bool parseBuffer( - const char* buffer, - U32 length, - LLXMLNodePtr& node); public: std::string mID; // The ID attribute of this node |