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


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

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


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

示例1: SetName

void
PluginManagerAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("name")) != 0)
        SetName(node->AsStringVector());
    if((node = searchNode->GetNode("type")) != 0)
        SetType(node->AsStringVector());
    if((node = searchNode->GetNode("version")) != 0)
        SetVersion(node->AsStringVector());
    if((node = searchNode->GetNode("id")) != 0)
        SetId(node->AsStringVector());
    if((node = searchNode->GetNode("category")) != 0)
        SetCategory(node->AsStringVector());
    if((node = searchNode->GetNode("enabled")) != 0)
        SetEnabled(node->AsIntVector());
    // Ensure that the category vector will be at least as long as the id vector.
    // This is import for supporting legacy config files.
    while(category.size() < id.size())
        category.push_back("?");

}
开发者ID:ahota,项目名称:visit_intel,代码行数:29,代码来源:PluginManagerAttributes.C

示例2: SetTypes

void
DBOptionsAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("types")) != 0)
        SetTypes(node->AsIntVector());
    if((node = searchNode->GetNode("names")) != 0)
        SetNames(node->AsStringVector());
    if((node = searchNode->GetNode("optBools")) != 0)
        SetOptBools(node->AsIntVector());
    if((node = searchNode->GetNode("optFloats")) != 0)
        SetOptFloats(node->AsDoubleVector());
    if((node = searchNode->GetNode("optDoubles")) != 0)
        SetOptDoubles(node->AsDoubleVector());
    if((node = searchNode->GetNode("optInts")) != 0)
        SetOptInts(node->AsIntVector());
    if((node = searchNode->GetNode("optStrings")) != 0)
        SetOptStrings(node->AsStringVector());
    if((node = searchNode->GetNode("optEnums")) != 0)
        SetOptEnums(node->AsIntVector());
    if((node = searchNode->GetNode("enumStrings")) != 0)
        SetEnumStrings(node->AsStringVector());
    if((node = searchNode->GetNode("enumStringsSizes")) != 0)
        SetEnumStringsSizes(node->AsIntVector());
    if((node = searchNode->GetNode("obsoleteNames")) != 0)
        SetObsoleteNames(node->AsStringVector());
}
开发者ID:robertmaynard,项目名称:VisIt-Bridge,代码行数:34,代码来源:DBOptionsAttributes.C

示例3: SetNamescheme

void
NameschemeAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("namescheme")) != 0)
        SetNamescheme(node->AsString());
    if((node = searchNode->GetNode("externalArrayNames")) != 0)
        SetExternalArrayNames(node->AsStringVector());
    if((node = searchNode->GetNode("externalArrayOffsets")) != 0)
        SetExternalArrayOffsets(node->AsIntVector());
    if((node = searchNode->GetNode("externalArrayData")) != 0)
        SetExternalArrayData(node->AsIntVector());
    if((node = searchNode->GetNode("allExplicitNames")) != 0)
        SetAllExplicitNames(node->AsStringVector());
    if((node = searchNode->GetNode("explicitIds")) != 0)
        SetExplicitIds(node->AsIntVector());
    if((node = searchNode->GetNode("explicitNames")) != 0)
        SetExplicitNames(node->AsStringVector());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:26,代码来源:NameschemeAttributes.C

示例4: if

void
ParallelCoordinatesAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("scalarAxisNames")) != 0)
        SetScalarAxisNames(node->AsStringVector());
    if((node = searchNode->GetNode("visualAxisNames")) != 0)
        SetVisualAxisNames(node->AsStringVector());
    if((node = searchNode->GetNode("extentMinima")) != 0)
        SetExtentMinima(node->AsDoubleVector());
    if((node = searchNode->GetNode("extentMaxima")) != 0)
        SetExtentMaxima(node->AsDoubleVector());
    if((node = searchNode->GetNode("drawLines")) != 0)
        SetDrawLines(node->AsBool());
    if((node = searchNode->GetNode("linesColor")) != 0)
        linesColor.SetFromNode(node);
    if((node = searchNode->GetNode("drawContext")) != 0)
        SetDrawContext(node->AsBool());
    if((node = searchNode->GetNode("contextGamma")) != 0)
        SetContextGamma(node->AsFloat());
    if((node = searchNode->GetNode("contextNumPartitions")) != 0)
        SetContextNumPartitions(node->AsInt());
    if((node = searchNode->GetNode("contextColor")) != 0)
        contextColor.SetFromNode(node);
    if((node = searchNode->GetNode("drawLinesOnlyIfExtentsOn")) != 0)
        SetDrawLinesOnlyIfExtentsOn(node->AsBool());
    if((node = searchNode->GetNode("unifyAxisExtents")) != 0)
        SetUnifyAxisExtents(node->AsBool());
    if((node = searchNode->GetNode("linesNumPartitions")) != 0)
        SetLinesNumPartitions(node->AsInt());
    if((node = searchNode->GetNode("focusGamma")) != 0)
        SetFocusGamma(node->AsFloat());
    if((node = searchNode->GetNode("drawFocusAs")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 3)
                SetDrawFocusAs(FocusRendering(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            FocusRendering value;
            if(FocusRendering_FromString(node->AsString(), value))
                SetDrawFocusAs(value);
        }
    }
}
开发者ID:,项目名称:,代码行数:56,代码来源:

示例5: SetAllTimes

void
ExportDBAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("allTimes")) != 0)
        SetAllTimes(node->AsBool());
    if((node = searchNode->GetNode("db_type")) != 0)
        SetDb_type(node->AsString());
    if((node = searchNode->GetNode("db_type_fullname")) != 0)
        SetDb_type_fullname(node->AsString());
    if((node = searchNode->GetNode("filename")) != 0)
        SetFilename(node->AsString());
    if((node = searchNode->GetNode("dirname")) != 0)
        SetDirname(node->AsString());
    if((node = searchNode->GetNode("variables")) != 0)
        SetVariables(node->AsStringVector());
    if((node = searchNode->GetNode("opts")) != 0)
        opts.SetFromNode(node);
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:26,代码来源:ExportDBAttributes.C

示例6: SetOutputMeshType

void
ThresholdAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("outputMeshType")) != 0)
        SetOutputMeshType(node->AsInt());
    if((node = searchNode->GetNode("listedVarNames")) != 0)
        SetListedVarNames(node->AsStringVector());
    if((node = searchNode->GetNode("zonePortions")) != 0)
        SetZonePortions(node->AsIntVector());
    if((node = searchNode->GetNode("lowerBounds")) != 0)
        SetLowerBounds(node->AsDoubleVector());
    if((node = searchNode->GetNode("upperBounds")) != 0)
        SetUpperBounds(node->AsDoubleVector());
    if((node = searchNode->GetNode("defaultVarName")) != 0)
        SetDefaultVarName(node->AsString());
    if((node = searchNode->GetNode("defaultVarIsScalar")) != 0)
        SetDefaultVarIsScalar(node->AsBool());
}
开发者ID:ahota,项目名称:visit_intel,代码行数:26,代码来源:ThresholdAttributes.C

示例7: SetTypeNames

void
FileOpenOptions::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    DataNode **children;
    if((node = searchNode->GetNode("typeNames")) != 0)
        SetTypeNames(node->AsStringVector());
    if((node = searchNode->GetNode("typeIDs")) != 0)
        SetTypeIDs(node->AsStringVector());

    // Clear all the DBOptionsAttributess if we got any.
    bool clearedOpenOptions = false;
    // Go through all of the children and construct a new
    // DBOptionsAttributes for each one of them.
    children = searchNode->GetChildren();
    if(children != 0)
    {
        for(int i = 0; i < searchNode->GetNumChildren(); ++i)
        {
            if(children[i]->GetKey() == std::string("DBOptionsAttributes"))
            {
                if (!clearedOpenOptions)
                {
                    ClearOpenOptions();
                    clearedOpenOptions = true;
                }
                DBOptionsAttributes temp;
                temp.SetFromNode(children[i]);
                AddOpenOptions(temp);
            }
        }
    }

    if((node = searchNode->GetNode("Enabled")) != 0)
        SetEnabled(node->AsIntVector());
    if((node = searchNode->GetNode("preferredIDs")) != 0)
        SetPreferredIDs(node->AsStringVector());
}
开发者ID:EricAlex,项目名称:ThirdParty-dev,代码行数:45,代码来源:FileOpenOptions.C

示例8: SetEngineName

void
EngineList::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    DataNode **children;
    if((node = searchNode->GetNode("engineName")) != 0)
        SetEngineName(node->AsStringVector());
    if((node = searchNode->GetNode("simulationName")) != 0)
        SetSimulationName(node->AsStringVector());

    // Clear all the EnginePropertiess if we got any.
    bool clearedProperties = false;
    // Go through all of the children and construct a new
    // EngineProperties for each one of them.
    children = searchNode->GetChildren();
    if(children != 0)
    {
        for(int i = 0; i < searchNode->GetNumChildren(); ++i)
        {
            if(children[i]->GetKey() == std::string("EngineProperties"))
            {
                if (!clearedProperties)
                {
                    ClearProperties();
                    clearedProperties = true;
                }
                EngineProperties temp;
                temp.SetFromNode(children[i]);
                AddProperties(temp);
            }
        }
    }

}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:41,代码来源:EngineList.C

示例9: if

void
DatabaseCorrelation::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("name")) != 0)
        SetName(node->AsString());
    if((node = searchNode->GetNode("numStates")) != 0)
        SetNumStates(node->AsInt());
    if((node = searchNode->GetNode("method")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 5)
                SetMethod(CorrelationMethod(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            CorrelationMethod value;
            if(CorrelationMethod_FromString(node->AsString(), value))
                SetMethod(value);
        }
    }
    if((node = searchNode->GetNode("databaseNames")) != 0)
        SetDatabaseNames(node->AsStringVector());
    if((node = searchNode->GetNode("databaseNStates")) != 0)
        SetDatabaseNStates(node->AsIntVector());
    if((node = searchNode->GetNode("databaseTimes")) != 0)
        SetDatabaseTimes(node->AsDoubleVector());
    if((node = searchNode->GetNode("databaseCycles")) != 0)
        SetDatabaseCycles(node->AsIntVector());
    if((node = searchNode->GetNode("indices")) != 0)
        SetIndices(node->AsIntVector());
    if((node = searchNode->GetNode("condensedTimes")) != 0)
        SetCondensedTimes(node->AsDoubleVector());
    if((node = searchNode->GetNode("condensedCycles")) != 0)
        SetCondensedCycles(node->AsIntVector());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:46,代码来源:DatabaseCorrelation.C

示例10: SetNames

void
AxisRestrictionAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("names")) != 0)
        SetNames(node->AsStringVector());
    if((node = searchNode->GetNode("minima")) != 0)
        SetMinima(node->AsDoubleVector());
    if((node = searchNode->GetNode("maxima")) != 0)
        SetMaxima(node->AsDoubleVector());
}
开发者ID:OSCCAR-PFM,项目名称:OSCCAR-dev,代码行数:18,代码来源:AxisRestrictionAttributes.C

示例11: ClearVars

void
ViewerClientInformation::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    DataNode **children;

    // Clear all the ViewerClientInformationElements if we got any.
    bool clearedVars = false;
    // Go through all of the children and construct a new
    // ViewerClientInformationElement for each one of them.
    children = searchNode->GetChildren();
    if(children != 0)
    {
        for(int i = 0; i < searchNode->GetNumChildren(); ++i)
        {
            if(children[i]->GetKey() == std::string("ViewerClientInformationElement"))
            {
                if (!clearedVars)
                {
                    ClearVars();
                    clearedVars = true;
                }
                ViewerClientInformationElement temp;
                temp.SetFromNode(children[i]);
                AddVars(temp);
            }
        }
    }

    if((node = searchNode->GetNode("supportedFormats")) != 0)
        SetSupportedFormats(node->AsStringVector());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:39,代码来源:ViewerClientInformation.C

示例12: SetResultsMessage

void
QueryAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("resultsMessage")) != 0)
        SetResultsMessage(node->AsString());
    if((node = searchNode->GetNode("resultsValue")) != 0)
        SetResultsValue(node->AsDoubleVector());
    if((node = searchNode->GetNode("timeStep")) != 0)
        SetTimeStep(node->AsInt());
    if((node = searchNode->GetNode("varTypes")) != 0)
        SetVarTypes(node->AsIntVector());
    if((node = searchNode->GetNode("pipeIndex")) != 0)
        SetPipeIndex(node->AsInt());
    if((node = searchNode->GetNode("xUnits")) != 0)
        SetXUnits(node->AsString());
    if((node = searchNode->GetNode("yUnits")) != 0)
        SetYUnits(node->AsString());
    if((node = searchNode->GetNode("floatFormat")) != 0)
        SetFloatFormat(node->AsString());
    if((node = searchNode->GetNode("xmlResult")) != 0)
        SetXmlResult(node->AsString());
    if((node = searchNode->GetNode("suppressOutput")) != 0)
        SetSuppressOutput(node->AsBool());
    if((node = searchNode->GetNode("queryInputParams")) != 0)
        SetQueryInputParams(node->AsMapNode());
    if((node = searchNode->GetNode("defaultName")) != 0)
        SetDefaultName(node->AsString());
    if((node = searchNode->GetNode("defaultVars")) != 0)
        SetDefaultVars(node->AsStringVector());
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:38,代码来源:QueryAttributes.C

示例13: if

void
AnnotationObject::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("objectName")) != 0)
        SetObjectName(node->AsString());
    if((node = searchNode->GetNode("objectType")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 8)
                SetObjectType(AnnotationType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            AnnotationType value;
            if(AnnotationType_FromString(node->AsString(), value))
                SetObjectType(value);
        }
    }
    if((node = searchNode->GetNode("visible")) != 0)
        SetVisible(node->AsBool());
    if((node = searchNode->GetNode("active")) != 0)
        SetActive(node->AsBool());
    if((node = searchNode->GetNode("position")) != 0)
    {
        if(node->GetNodeType() == FLOAT_ARRAY_NODE)
        {
            const float *fn = node->AsFloatArray();
            double dp[3] = {fn[0], fn[1], fn[2]};
            SetPosition(dp);
        }
        else
            SetPosition(node->AsDoubleArray());
    }
    if((node = searchNode->GetNode("position2")) != 0)
    {
        if(node->GetNodeType() == FLOAT_ARRAY_NODE)
        {
            const float *fn = node->AsFloatArray();
            double dp[3] = {fn[0], fn[1], fn[2]};
            SetPosition2(dp);
        }
        else
            SetPosition2(node->AsDoubleArray());
    }
    if((node = searchNode->GetNode("textColor")) != 0)
        textColor.SetFromNode(node);
    if((node = searchNode->GetNode("useForegroundForTextColor")) != 0)
        SetUseForegroundForTextColor(node->AsBool());
    if((node = searchNode->GetNode("color1")) != 0)
        color1.SetFromNode(node);
    if((node = searchNode->GetNode("color2")) != 0)
        color2.SetFromNode(node);
    if((node = searchNode->GetNode("text")) != 0)
        SetText(node->AsStringVector());
    if((node = searchNode->GetNode("fontFamily")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 3)
                SetFontFamily(FontFamily(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            FontFamily value;
            if(FontFamily_FromString(node->AsString(), value))
                SetFontFamily(value);
        }
    }
    if((node = searchNode->GetNode("fontBold")) != 0)
        SetFontBold(node->AsBool());
    if((node = searchNode->GetNode("fontItalic")) != 0)
        SetFontItalic(node->AsBool());
    if((node = searchNode->GetNode("fontShadow")) != 0)
        SetFontShadow(node->AsBool());
    if((node = searchNode->GetNode("floatAttribute1")) != 0)
        SetDoubleAttribute1(node->AsDouble());
    if((node = searchNode->GetNode("doubleAttribute1")) != 0)
        SetDoubleAttribute1(node->AsDouble());
    if((node = searchNode->GetNode("intAttribute1")) != 0)
        SetIntAttribute1(node->AsInt());
    if((node = searchNode->GetNode("intAttribute2")) != 0)
        SetIntAttribute2(node->AsInt());
    if((node = searchNode->GetNode("intAttribute3")) != 0)
        SetIntAttribute3(node->AsInt());
    if((node = searchNode->GetNode("doubleVector1")) != 0)
        SetDoubleVector1(node->AsDoubleVector());
    if((node = searchNode->GetNode("stringVector1")) != 0)
//.........这里部分代码省略.........
开发者ID:OSCCAR-PFM,项目名称:OSCCAR-dev,代码行数:101,代码来源:AnnotationObject.C

示例14: if

void
SubsetAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("colorType")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 3)
                SetColorType(ColoringMethod(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ColoringMethod value;
            if(ColoringMethod_FromString(node->AsString(), value))
                SetColorType(value);
        }
    }
    if((node = searchNode->GetNode("colorTableName")) != 0)
        SetColorTableName(node->AsString());
    if((node = searchNode->GetNode("invertColorTable")) != 0)
        SetInvertColorTable(node->AsBool());
    if((node = searchNode->GetNode("filledFlag")) != 0)
        SetFilledFlag(node->AsBool());
    if((node = searchNode->GetNode("legendFlag")) != 0)
        SetLegendFlag(node->AsBool());
    if((node = searchNode->GetNode("lineStyle")) != 0)
        SetLineStyle(node->AsInt());
    if((node = searchNode->GetNode("lineWidth")) != 0)
        SetLineWidth(node->AsInt());
    if((node = searchNode->GetNode("singleColor")) != 0)
        singleColor.SetFromNode(node);
    if((node = searchNode->GetNode("multiColor")) != 0)
        multiColor.SetFromNode(node);
    if((node = searchNode->GetNode("subsetNames")) != 0)
        SetSubsetNames(node->AsStringVector());
    if((node = searchNode->GetNode("subsetType")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 6)
                SetSubsetType(Subset_Type(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            Subset_Type value;
            if(Subset_Type_FromString(node->AsString(), value))
                SetSubsetType(value);
        }
    }
    if((node = searchNode->GetNode("opacity")) != 0)
        SetOpacity(node->AsDouble());
    if((node = searchNode->GetNode("wireframe")) != 0)
        SetWireframe(node->AsBool());
    if((node = searchNode->GetNode("drawInternal")) != 0)
        SetDrawInternal(node->AsBool());
    if((node = searchNode->GetNode("smoothingLevel")) != 0)
        SetSmoothingLevel(node->AsInt());
    if((node = searchNode->GetNode("pointSize")) != 0)
        SetPointSize(node->AsDouble());
    if((node = searchNode->GetNode("pointType")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 8)
                SetPointType(PointType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            PointType value;
            if(PointType_FromString(node->AsString(), value))
                SetPointType(value);
        }
    }
    if((node = searchNode->GetNode("pointSizeVarEnabled")) != 0)
        SetPointSizeVarEnabled(node->AsBool());
    if((node = searchNode->GetNode("pointSizeVar")) != 0)
        SetPointSizeVar(node->AsString());
    if((node = searchNode->GetNode("pointSizePixels")) != 0)
        SetPointSizePixels(node->AsInt());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:94,代码来源:SubsetAttributes.C

示例15: if

void
QueryAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("name")) != 0)
        SetName(node->AsString());
    if((node = searchNode->GetNode("variables")) != 0)
        SetVariables(node->AsStringVector());
    if((node = searchNode->GetNode("resultsMessage")) != 0)
        SetResultsMessage(node->AsString());
    if((node = searchNode->GetNode("worldPoint")) != 0)
        SetWorldPoint(node->AsDoubleArray());
    if((node = searchNode->GetNode("domain")) != 0)
        SetDomain(node->AsInt());
    if((node = searchNode->GetNode("element")) != 0)
        SetElement(node->AsInt());
    if((node = searchNode->GetNode("resultsValue")) != 0)
        SetResultsValue(node->AsDoubleVector());
    if((node = searchNode->GetNode("elementType")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 2)
                SetElementType(ElementType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ElementType value;
            if(ElementType_FromString(node->AsString(), value))
                SetElementType(value);
        }
    }
    if((node = searchNode->GetNode("timeStep")) != 0)
        SetTimeStep(node->AsInt());
    if((node = searchNode->GetNode("varTypes")) != 0)
        SetVarTypes(node->AsIntVector());
    if((node = searchNode->GetNode("dataType")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 2)
                SetDataType(DataType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            DataType value;
            if(DataType_FromString(node->AsString(), value))
                SetDataType(value);
        }
    }
    if((node = searchNode->GetNode("pipeIndex")) != 0)
        SetPipeIndex(node->AsInt());
    if((node = searchNode->GetNode("useGlobalId")) != 0)
        SetUseGlobalId(node->AsBool());
    if((node = searchNode->GetNode("xUnits")) != 0)
        SetXUnits(node->AsString());
    if((node = searchNode->GetNode("yUnits")) != 0)
        SetYUnits(node->AsString());
    if((node = searchNode->GetNode("darg1")) != 0)
        SetDarg1(node->AsDoubleVector());
    if((node = searchNode->GetNode("darg2")) != 0)
        SetDarg2(node->AsDoubleVector());
    if((node = searchNode->GetNode("floatFormat")) != 0)
        SetFloatFormat(node->AsString());
    if((node = searchNode->GetNode("xmlResult")) != 0)
        SetXmlResult(node->AsString());
}
开发者ID:OSCCAR-PFM,项目名称:OSCCAR-dev,代码行数:78,代码来源:QueryAttributes.C


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