summaryrefslogtreecommitdiff
path: root/indra/llxuixml/llxuiparser.h
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-10-06 16:56:38 -0700
committerRichard Nelson <none@none>2010-10-06 16:56:38 -0700
commit5647e745989d6c3e4387ec990a35c4308dd6b929 (patch)
tree18b17faf6c2c7c03ba24445ee1e6018fff49413f /indra/llxuixml/llxuiparser.h
parentb285fd4d0abf9113fc416c30ac115db06c9f2ebf (diff)
added param block support for empty/undefined elements in XML/LLSD respectively.
This way <foo/> or LLSD["foo"]; both define a default constructed value for the parameter named foo, useful in the Multiple<T> case
Diffstat (limited to 'indra/llxuixml/llxuiparser.h')
-rw-r--r--indra/llxuixml/llxuiparser.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llxuixml/llxuiparser.h b/indra/llxuixml/llxuiparser.h
index 5c613b0c69..7a748d8aea 100644
--- a/indra/llxuixml/llxuiparser.h
+++ b/indra/llxuixml/llxuiparser.h
@@ -116,6 +116,7 @@ private:
bool readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block);
//reader helper functions
+ static bool readNoValue(Parser& parser, void* val_ptr);
static bool readBoolValue(Parser& parser, void* val_ptr);
static bool readStringValue(Parser& parser, void* val_ptr);
static bool readU8Value(Parser& parser, void* val_ptr);
@@ -132,6 +133,7 @@ private:
static bool readSDValue(Parser& parser, void* val_ptr);
//writer helper functions
+ static bool writeNoValue(Parser& parser, const void* val_ptr, const name_stack_t&);
static bool writeBoolValue(Parser& parser, const void* val_ptr, const name_stack_t&);
static bool writeStringValue(Parser& parser, const void* val_ptr, const name_stack_t&);
static bool writeU8Value(Parser& parser, const void* val_ptr, const name_stack_t&);
@@ -194,6 +196,7 @@ public:
private:
//reader helper functions
+ static bool readNoValue(Parser&, void* val_ptr);
static bool readBoolValue(Parser&, void* val_ptr);
static bool readStringValue(Parser&, void* val_ptr);
static bool readU8Value(Parser&, void* val_ptr);
@@ -218,7 +221,7 @@ private:
void endElement(const char *name);
void characterData(const char *s, int len);
bool readAttributes(const char **atts);
- void processText();
+ bool processText();
Parser::name_stack_t mNameStack;
struct XML_ParserStruct* mParser;
@@ -230,6 +233,7 @@ private:
const char* mCurAttributeValueBegin;
std::vector<S32> mTokenSizeStack;
std::vector<std::string> mScope;
+ std::vector<bool> mEmptyLeafNode;
element_start_callback_t mElementCB;
std::vector<std::pair<LLInitParam::BaseBlock*, S32> > mOutputStack;