当前位置: 首页>>代码示例>>C++>>正文


C++ DataNode::RemoveNode方法代码示例

本文整理汇总了C++中DataNode::RemoveNode方法的典型用法代码示例。如果您正苦于以下问题:C++ DataNode::RemoveNode方法的具体用法?C++ DataNode::RemoveNode怎么用?C++ DataNode::RemoveNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataNode的用法示例。


在下文中一共展示了DataNode::RemoveNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: root

void
QvisAppearanceWidget::singleColorOpacityChanged(int opacity)
{
    int MultiCurve = viewer->GetPlotIndex("MultiCurve");
    AttributeSubject *atts = viewer->DelayedState()->GetPlotAttributes(MultiCurve);
    if(atts != 0)
    {
        DataNode root("root");
        atts->CreateNode(&root, true, false);
        DataNode *multiCurveNode = root.GetNode("MultiCurveAttributes");
        DataNode *singleColorNode = multiCurveNode->GetNode("singleColor");
        DataNode *colorAttributeNode = singleColorNode->GetNode("ColorAttribute");
        DataNode *colorNode = colorAttributeNode->GetNode("color");
        const unsigned char *oldColor = colorNode->AsUnsignedCharArray();
        unsigned char newColor[4];
        newColor[0] = oldColor[0];
        newColor[1] = oldColor[1];
        newColor[2] = oldColor[2];
        newColor[3] = (unsigned char)opacity;
        DataNode *newColorNode = new DataNode("color", newColor, 4);
        colorAttributeNode->RemoveNode(colorNode);
        colorAttributeNode->AddNode(newColorNode);
        atts->SetFromNode(&root);
        atts->Notify();
        emit multiCurveChanged(atts);
    }
}
开发者ID:ahota,项目名称:visit_intel,代码行数:27,代码来源:QvisAppearanceWidget.C

示例2:

void
QvisLegacyStreamlinePlotWindow::ProcessOldVersions(DataNode *parentNode,
    const char *configVersion)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("Streamline plot attributes");
    if(searchNode == 0)
        return;

    // Remove height/width information if the config file is older than
    // 1.4.1 since this window changed size quite a bit in version 1.4.1.
    if (LegacyStreamlineAttributes::VersionLessThan(configVersion, "1.4.1"))
    {
        searchNode->RemoveNode("width");
        searchNode->RemoveNode("height");
    }
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:19,代码来源:QvisLegacyStreamlinePlotWindow.C

示例3:

// ****************************************************************************
// Method: AnimationAttributes::ProcessOldVersions
//
// Purpose:
//   This method creates modifies a DataNode representation of the object
//   so it conforms to the newest representation of the object, which can
//   can be read back in.
//
// Programmer: Kathleen Bonnell
// Creation:   January 12, 2005
//
// Modifications:
//
// ****************************************************************************
void
AnimationAttributes::ProcessOldVersions(DataNode *parentNode,
                                        const char *configVersion)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("AnimationAttributes");
    if(searchNode == 0)
        return;

    DataNode *pcNode = searchNode->GetNode("pipelineCachingMode");
    if (pcNode == 0)
        return;

    if (VersionLessThan(configVersion, "1.1.5"))
        searchNode->RemoveNode("pipelineCachingMode");
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:32,代码来源:AnimationAttributes.C


注:本文中的DataNode::RemoveNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。