summaryrefslogtreecommitdiff
path: root/indra/llui/llxuiparser.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-11-02 20:03:44 -0700
committerRichard Linden <none@none>2012-11-02 20:03:44 -0700
commitf8eaee753174d0cab4e4edcf795f422706d6f302 (patch)
tree7f16a502c6a8c4df57dfa74303a04d66eed74fa7 /indra/llui/llxuiparser.h
parentbb6bda9eef48f5b08b56af46321b79fe7f1d49d7 (diff)
SH-3499 Ensure asset stats output is correct
improvements to predicate API default rules encapsulated in LLInitParam removed empty flag from viewer asset stats
Diffstat (limited to 'indra/llui/llxuiparser.h')
-rw-r--r--indra/llui/llxuiparser.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llui/llxuiparser.h b/indra/llui/llxuiparser.h
index 9b6b2a321b..8d0276a8ad 100644
--- a/indra/llui/llxuiparser.h
+++ b/indra/llui/llxuiparser.h
@@ -109,9 +109,25 @@ public:
/*virtual*/ void parserError(const std::string& message);
void readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, const std::string& filename = LLStringUtil::null, bool silent=false);
- void writeXUI(LLXMLNodePtr node, const LLInitParam::BaseBlock& block, LLInitParam::predicate_rule_t rules = LLInitParam::predicate_rule_t(LLInitParam::PROVIDED) && LLInitParam::NON_DEFAULT, const LLInitParam::BaseBlock* diff_block = NULL);
+ template<typename BLOCK>
+ void writeXUI(LLXMLNodePtr node,
+ const BLOCK& block,
+ const LLInitParam::predicate_rule_t rules = LLInitParam::default_parse_rules(),
+ const LLInitParam::BaseBlock* diff_block = NULL)
+ {
+ if (!diff_block
+ && !rules.isAmbivalent(LLInitParam::HAS_DEFAULT_VALUE))
+ {
+ diff_block = &LLInitParam::defaultValue<BLOCK>();
+ }
+ writeXUIImpl(node, block, rules, diff_block);
+ }
private:
+ void writeXUIImpl(LLXMLNodePtr node,
+ const LLInitParam::BaseBlock& block,
+ const LLInitParam::predicate_rule_t rules,
+ const LLInitParam::BaseBlock* diff_block);
bool readXUIImpl(LLXMLNodePtr node, LLInitParam::BaseBlock& block);
bool readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block);