本文整理汇总了C++中LLXMLNodePtr::addChild方法的典型用法代码示例。如果您正苦于以下问题:C++ LLXMLNodePtr::addChild方法的具体用法?C++ LLXMLNodePtr::addChild怎么用?C++ LLXMLNodePtr::addChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLXMLNodePtr
的用法示例。
在下文中一共展示了LLXMLNodePtr::addChild方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getXML
// virtual
LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const
{
LLXMLNodePtr node = LLUICtrl::getXML();
node->setName(LL_RADIO_GROUP_TAG);
// Attributes
node->createChild("draw_border", TRUE)->setBoolValue(mHasBorder);
node->createChild("allow_deselect", TRUE)->setBoolValue(mAllowDeselect);
// Contents
for (button_list_t::const_iterator iter = mRadioButtons.begin();
iter != mRadioButtons.end(); ++iter)
{
LLRadioCtrl* radio = *iter;
LLXMLNodePtr child_node = radio->getXML();
node->addChild(child_node);
}
return node;
}
示例2: getXML
// virtual
LLXMLNodePtr LLPanel::getXML(bool save_children) const
{
LLXMLNodePtr node = LLUICtrl::getXML();
node->setName(LL_PANEL_TAG);
if (mBorder && mBorder->getVisible())
{
node->createChild("border", TRUE)->setBoolValue(TRUE);
}
if (!mRectControl.empty())
{
node->createChild("rect_control", TRUE)->setStringValue(mRectControl);
}
if (!mLabel.empty())
{
node->createChild("label", TRUE)->setStringValue(mLabel);
}
ui_string_map_t::const_iterator i = mUIStrings.begin();
ui_string_map_t::const_iterator end = mUIStrings.end();
for (; i != end; ++i)
{
LLXMLNodePtr child_node = node->createChild("string", FALSE);
child_node->setStringValue(i->second);
child_node->createChild("name", TRUE)->setStringValue(i->first);
}
if (save_children)
{
LLView::child_list_const_reverse_iter_t rit;
for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit)
{
LLView* childp = *rit;
if (childp->getSaveToXML())
{
LLXMLNodePtr xml_node = childp->getXML();
node->addChild(xml_node);
}
}
}
return node;
}
示例3: getXML
// virtual
LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const
{
LLXMLNodePtr node = LLUICtrl::getXML();
node->setName(LL_SCROLLABLE_CONTAINER_VIEW_TAG);
// Attributes
node->createChild("opaque", TRUE)->setBoolValue(mIsOpaque);
if (mIsOpaque)
{
node->createChild("color", TRUE)->setFloatValue(4, mBackgroundColor.mV);
}
// Contents
LLXMLNodePtr child_node = mScrolledView->getXML();
node->addChild(child_node);
return node;
}
示例4: getXML
// virtual
LLXMLNodePtr LLPanel::getXML(bool save_children) const
{
LLXMLNodePtr node = LLView::getXML();
if (mBorder && mBorder->getVisible())
{
node->createChild("border", TRUE)->setBoolValue(TRUE);
}
if (!mRectControl.empty())
{
node->createChild("rect_control", TRUE)->setStringValue(mRectControl);
}
if (!mLabel.empty())
{
node->createChild("label", TRUE)->setStringValue(mLabel);
}
if (save_children)
{
LLView::child_list_const_reverse_iter_t rit;
for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit)
{
LLView* childp = *rit;
if (childp->getSaveToXML())
{
LLXMLNodePtr xml_node = childp->getXML();
node->addChild(xml_node);
}
}
}
return node;
}
示例5: getXML
// virtual
LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const
{
LLXMLNodePtr node = LLUICtrl::getXML();
// Attributes
node->createChild("draw_border", TRUE)->setBoolValue(mHasBorder);
// Contents
for (button_list_t::const_iterator iter = mRadioButtons.begin();
iter != mRadioButtons.end(); ++iter)
{
LLRadioCtrl* radio = *iter;
LLXMLNodePtr child_node = radio->LLView::getXML();
child_node->setStringValue(radio->getLabel());
child_node->setName(std::string("radio_item"));
node->addChild(child_node);
}
return node;
}