diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llxml/llxmltree.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/linden/indra/llxml/llxmltree.h b/linden/indra/llxml/llxmltree.h index 1a020f2..31f89de 100644 --- a/linden/indra/llxml/llxmltree.h +++ b/linden/indra/llxml/llxmltree.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | 6 | * $LicenseInfo:firstyear=2001&license=viewergpl$ |
7 | * | 7 | * |
8 | * Copyright (c) 2001-2009, Linden Research, Inc. | 8 | * Copyright (c) 2001-2010, Linden Research, Inc. |
9 | * | 9 | * |
10 | * Second Life Viewer Source Code | 10 | * Second Life Viewer Source Code |
11 | * The source code in this file ("Source Code") is provided by Linden Lab | 11 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -63,11 +63,18 @@ public: | |||
63 | 63 | ||
64 | virtual BOOL parseFile(const std::string &path, BOOL keep_contents = TRUE); | 64 | virtual BOOL parseFile(const std::string &path, BOOL keep_contents = TRUE); |
65 | 65 | ||
66 | bool parseBufferStart(bool keep_contents = true); | ||
67 | bool parseBuffer(const char *buf, int len); | ||
68 | bool parseBufferFinalize(); | ||
69 | |||
66 | LLXmlTreeNode* getRoot() { return mRoot; } | 70 | LLXmlTreeNode* getRoot() { return mRoot; } |
67 | 71 | ||
68 | void dump(); | 72 | void dump(); |
69 | void dumpNode( LLXmlTreeNode* node, const std::string& prefix ); | 73 | void dumpNode( LLXmlTreeNode* node, const std::string& prefix ); |
70 | 74 | ||
75 | void write(std::string &buffer) const; | ||
76 | void writeNode(LLXmlTreeNode *node, std::string &buffer, const std::string &indent) const; | ||
77 | |||
71 | static LLStdStringHandle addAttributeString( const std::string& name) | 78 | static LLStdStringHandle addAttributeString( const std::string& name) |
72 | { | 79 | { |
73 | return sAttributeKeys.addString( name ); | 80 | return sAttributeKeys.addString( name ); |
@@ -79,6 +86,7 @@ public: | |||
79 | 86 | ||
80 | protected: | 87 | protected: |
81 | LLXmlTreeNode* mRoot; | 88 | LLXmlTreeNode* mRoot; |
89 | LLXmlTreeParser *mParser; | ||
82 | 90 | ||
83 | // local | 91 | // local |
84 | LLStdStringTable mNodeNames; | 92 | LLStdStringTable mNodeNames; |
@@ -175,6 +183,11 @@ private: | |||
175 | 183 | ||
176 | void dump( const std::string& prefix ); | 184 | void dump( const std::string& prefix ); |
177 | 185 | ||
186 | void writeNoChild(std::string &buffer, const std::string &indent) const; | ||
187 | void writeStart(std::string &buffer, const std::string &indent) const; | ||
188 | void writeEnd(std::string &buffer, const std::string &indent) const; | ||
189 | void writeAttributes(std::string &buffer) const; | ||
190 | |||
178 | protected: | 191 | protected: |
179 | typedef std::map<LLStdStringHandle, const std::string*> attribute_map_t; | 192 | typedef std::map<LLStdStringHandle, const std::string*> attribute_map_t; |
180 | attribute_map_t mAttributes; | 193 | attribute_map_t mAttributes; |
@@ -207,6 +220,10 @@ public: | |||
207 | 220 | ||
208 | BOOL parseFile(const std::string &path, LLXmlTreeNode** root, BOOL keep_contents ); | 221 | BOOL parseFile(const std::string &path, LLXmlTreeNode** root, BOOL keep_contents ); |
209 | 222 | ||
223 | void parseBufferStart(BOOL keep_contents); | ||
224 | bool parseBuffer(const char *buf, int len); | ||
225 | bool parseBufferFinalize(LLXmlTreeNode** root); | ||
226 | |||
210 | protected: | 227 | protected: |
211 | const std::string& tabs(); | 228 | const std::string& tabs(); |
212 | 229 | ||