本文整理汇总了C++中LLXMLNodePtr::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ LLXMLNodePtr::getValue方法的具体用法?C++ LLXMLNodePtr::getValue怎么用?C++ LLXMLNodePtr::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLXMLNodePtr
的用法示例。
在下文中一共展示了LLXMLNodePtr::getValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupPaths
void LLUICtrlFactory::setupPaths()
{
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml");
LLXMLNodePtr root;
BOOL success = LLXMLNode::parseFile(filename, root, NULL);
sXUIPaths.clear();
if (success)
{
LLXMLNodePtr path;
for (path = root->getFirstChild(); path.notNull(); path = path->getNextSibling())
{
LLUIString path_val_ui(path->getValue());
std::string language = LLUI::getLanguage();
path_val_ui.setArg("[LANGUAGE]", language);
if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui.getString()) == sXUIPaths.end())
{
sXUIPaths.push_back(path_val_ui.getString());
}
}
}
else // parsing failed
{
std::string slash = gDirUtilp->getDirDelimiter();
std::string dir = "xui" + slash + "en-us";
llwarns << "XUI::config file unable to open: " << filename << llendl;
sXUIPaths.push_back(dir);
}
}
示例2: createChildren
//static
void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t& registry, LLXMLNodePtr output_node)
{
LLFastTimer ft(FTM_CREATE_CHILDREN);
if (node.isNull()) return;
for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling())
{
LLXMLNodePtr outputChild;
if (output_node)
{
outputChild = output_node->createChild("", FALSE);
}
if (!instance().createFromXML(child_node, viewp, LLStringUtil::null, registry, outputChild))
{
// child_node is not a valid child for the current parent
std::string child_name = std::string(child_node->getName()->mString);
if (LLDefaultChildRegistry::instance().getValue(child_name))
{
// This means that the registry assocaited with the parent widget does not have an entry
// for the child widget
// You might need to add something like:
// static ParentWidgetRegistry::Register<ChildWidgetType> register("child_widget_name");
llwarns << child_name << " is not a valid child of " << node->getName()->mString << llendl;
}
else
{
llwarns << "Could not create widget named " << child_node->getName()->mString << llendl;
}
}
if (outputChild && !outputChild->mChildren && outputChild->mAttributes.empty() && outputChild->getValue().empty())
{
output_node->deleteChild(outputChild);
}
}
}