summaryrefslogtreecommitdiff
path: root/indra/llui/llxuiparser.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-05-07 13:19:05 -0700
committersimon <none@none>2014-05-07 13:19:05 -0700
commitdc4c184696b308b8f60fa1dd751b35e22bd47d62 (patch)
tree1606d992f1cce6fe19572042c456725eb95d7066 /indra/llui/llxuiparser.cpp
parent883467a3cc421fca68a25589114e0e3f0538ff0e (diff)
parent250db74bf9325acdc1169f6c13d297e7fe44b753 (diff)
Merge downstream version 3.7.8 code
Diffstat (limited to 'indra/llui/llxuiparser.cpp')
-rwxr-xr-xindra/llui/llxuiparser.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 6322da9123..4390ca83e9 100755
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -29,7 +29,7 @@
#include "llxuiparser.h"
#include "llxmlnode.h"
-
+#include "llfasttimer.h"
#ifdef LL_STANDALONE
#include <expat.h>
#else
@@ -38,6 +38,7 @@
#include <fstream>
#include <boost/tokenizer.hpp>
+#include <boost/bind.hpp>
//#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/classic_core.hpp>
@@ -334,6 +335,8 @@ LLXSDWriter::LLXSDWriter()
registerInspectFunc<LLSD>(boost::bind(&LLXSDWriter::writeAttribute, this, "xs:string", _1, _2, _3, _4));
}
+LLXSDWriter::~LLXSDWriter() {}
+
void LLXSDWriter::writeXSD(const std::string& type_name, LLXMLNodePtr node, const LLInitParam::BaseBlock& block, const std::string& xml_namespace)
{
Schema schema(xml_namespace);
@@ -674,12 +677,12 @@ LLXUIParser::LLXUIParser()
}
}
-static LLFastTimer::DeclareTimer FTM_PARSE_XUI("XUI Parsing");
+static LLTrace::BlockTimerStatHandle FTM_PARSE_XUI("XUI Parsing");
const LLXMLNodePtr DUMMY_NODE = new LLXMLNode();
void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, const std::string& filename, bool silent)
{
- LLFastTimer timer(FTM_PARSE_XUI);
+ LL_RECORD_BLOCK_TIME(FTM_PARSE_XUI);
mNameStack.clear();
mRootNodeName = node->getName()->mString;
mCurFileName = filename;
@@ -858,11 +861,11 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
return any_parsed;
}
-void LLXUIParser::writeXUI(LLXMLNodePtr node, const LLInitParam::BaseBlock &block, const LLInitParam::BaseBlock* diff_block)
+void LLXUIParser::writeXUIImpl(LLXMLNodePtr node, const LLInitParam::BaseBlock &block, const LLInitParam::predicate_rule_t rules, const LLInitParam::BaseBlock* diff_block)
{
mWriteRootNode = node;
name_stack_t name_stack = Parser::name_stack_t();
- block.serializeBlock(*this, name_stack, diff_block);
+ block.serializeBlock(*this, name_stack, rules, diff_block);
mOutNodes.clear();
}
@@ -1310,7 +1313,7 @@ void LLXUIParser::parserWarning(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()));
+ LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
#else
Parser::parserWarning(message);
#endif
@@ -1319,8 +1322,8 @@ void LLXUIParser::parserWarning(const std::string& message)
void LLXUIParser::parserError(const std::string& message)
{
#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()));
+ // use Visual Studio friendly formatting of output message for easy access to originating xml
+ LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
#else
Parser::parserError(message);
#endif
@@ -1391,7 +1394,7 @@ LLSimpleXUIParser::~LLSimpleXUIParser()
bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBlock& block, bool silent)
{
- LLFastTimer timer(FTM_PARSE_XUI);
+ LL_RECORD_BLOCK_TIME(FTM_PARSE_XUI);
mParser = XML_ParserCreate(NULL);
XML_SetUserData(mParser, this);
@@ -1638,7 +1641,7 @@ void LLSimpleXUIParser::parserWarning(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()));
+ LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
#else
Parser::parserWarning(message);
#endif
@@ -1648,7 +1651,7 @@ void LLSimpleXUIParser::parserError(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()));
+ LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
#else
Parser::parserError(message);
#endif