本文整理汇总了C++中DataNode::AsDoubleVector方法的典型用法代码示例。如果您正苦于以下问题:C++ DataNode::AsDoubleVector方法的具体用法?C++ DataNode::AsDoubleVector怎么用?C++ DataNode::AsDoubleVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataNode
的用法示例。
在下文中一共展示了DataNode::AsDoubleVector方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
ContourOpAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("ContourOpAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("contourNLevels")) != 0)
SetContourNLevels(node->AsInt());
if((node = searchNode->GetNode("contourValue")) != 0)
SetContourValue(node->AsDoubleVector());
if((node = searchNode->GetNode("contourPercent")) != 0)
SetContourPercent(node->AsDoubleVector());
if((node = searchNode->GetNode("contourMethod")) != 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)
SetContourMethod(ContourMethod(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
ContourMethod value;
if(ContourMethod_FromString(node->AsString(), value))
SetContourMethod(value);
}
}
if((node = searchNode->GetNode("minFlag")) != 0)
SetMinFlag(node->AsBool());
if((node = searchNode->GetNode("maxFlag")) != 0)
SetMaxFlag(node->AsBool());
if((node = searchNode->GetNode("min")) != 0)
SetMin(node->AsDouble());
if((node = searchNode->GetNode("max")) != 0)
SetMax(node->AsDouble());
if((node = searchNode->GetNode("scaling")) != 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)
SetScaling(ContourScaling(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
ContourScaling value;
if(ContourScaling_FromString(node->AsString(), value))
SetScaling(value);
}
}
if((node = searchNode->GetNode("variable")) != 0)
SetVariable(node->AsString());
}
示例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());
}
示例3: 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());
}
示例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);
}
}
}
示例5: if
void
MeshManagementAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("MeshManagementAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("discretizationTolerance")) != 0)
{
if (node->AsDoubleVector().size() == 3)
SetDiscretizationTolerance(node->AsDoubleVector());
else
{
MeshManagementAttributes tmp;
SetDiscretizationTolerance(tmp.GetDiscretizationTolerance());
}
}
if((node = searchNode->GetNode("discretizationToleranceX")) != 0)
SetDiscretizationToleranceX(node->AsDoubleVector());
if((node = searchNode->GetNode("discretizationToleranceY")) != 0)
SetDiscretizationToleranceY(node->AsDoubleVector());
if((node = searchNode->GetNode("discretizationToleranceZ")) != 0)
SetDiscretizationToleranceZ(node->AsDoubleVector());
if((node = searchNode->GetNode("discretizationMode")) != 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)
SetDiscretizationMode(DiscretizationModes(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
DiscretizationModes value;
if(DiscretizationModes_FromString(node->AsString(), value))
SetDiscretizationMode(value);
}
}
if((node = searchNode->GetNode("discretizeBoundaryOnly")) != 0)
SetDiscretizeBoundaryOnly(node->AsBool());
if((node = searchNode->GetNode("passNativeCSG")) != 0)
SetPassNativeCSG(node->AsBool());
}
示例6: 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());
}
示例7: 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());
}
示例8: 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());
}
示例9: 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());
}
示例10: if
void
ConstructDataBinningAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("ConstructDataBinningAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("name")) != 0)
SetName(node->AsString());
if((node = searchNode->GetNode("varnames")) != 0)
SetVarnames(node->AsStringVector());
if((node = searchNode->GetNode("binType")) != 0)
SetBinType(node->AsUnsignedCharVector());
if((node = searchNode->GetNode("binBoundaries")) != 0)
SetBinBoundaries(node->AsDoubleVector());
if((node = searchNode->GetNode("reductionOperator")) != 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 < 9)
SetReductionOperator(ReductionOperator(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
ReductionOperator value;
if(ReductionOperator_FromString(node->AsString(), value))
SetReductionOperator(value);
}
}
if((node = searchNode->GetNode("varForReductionOperator")) != 0)
SetVarForReductionOperator(node->AsString());
if((node = searchNode->GetNode("undefinedValue")) != 0)
SetUndefinedValue(node->AsDouble());
if((node = searchNode->GetNode("binningScheme")) != 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)
SetBinningScheme(BinningScheme(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
BinningScheme value;
if(BinningScheme_FromString(node->AsString(), value))
SetBinningScheme(value);
}
}
if((node = searchNode->GetNode("numBins")) != 0)
SetNumBins(node->AsIntVector());
if((node = searchNode->GetNode("overTime")) != 0)
SetOverTime(node->AsBool());
if((node = searchNode->GetNode("timeStart")) != 0)
SetTimeStart(node->AsInt());
if((node = searchNode->GetNode("timeEnd")) != 0)
SetTimeEnd(node->AsInt());
if((node = searchNode->GetNode("timeStride")) != 0)
SetTimeStride(node->AsInt());
if((node = searchNode->GetNode("outOfBoundsBehavior")) != 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)
SetOutOfBoundsBehavior(OutOfBoundsBehavior(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
OutOfBoundsBehavior value;
if(OutOfBoundsBehavior_FromString(node->AsString(), value))
SetOutOfBoundsBehavior(value);
}
}
}
示例11: 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)
//.........这里部分代码省略.........
示例12: if
void
ConstructDDFAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("ConstructDDFAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("ddfName")) != 0)
SetDdfName(node->AsString());
if((node = searchNode->GetNode("varnames")) != 0)
SetVarnames(node->AsStringVector());
if((node = searchNode->GetNode("ranges")) != 0)
SetRanges(node->AsDoubleVector());
if((node = searchNode->GetNode("codomainName")) != 0)
SetCodomainName(node->AsString());
if((node = searchNode->GetNode("statisticalOperator")) != 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 < 10)
SetStatisticalOperator(StatisticalOperator(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
StatisticalOperator value;
if(StatisticalOperator_FromString(node->AsString(), value))
SetStatisticalOperator(value);
}
}
if((node = searchNode->GetNode("percentile")) != 0)
SetPercentile(node->AsDouble());
if((node = searchNode->GetNode("undefinedValue")) != 0)
SetUndefinedValue(node->AsDouble());
if((node = searchNode->GetNode("binningScheme")) != 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)
SetBinningScheme(BinningScheme(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
BinningScheme value;
if(BinningScheme_FromString(node->AsString(), value))
SetBinningScheme(value);
}
}
if((node = searchNode->GetNode("numSamples")) != 0)
SetNumSamples(node->AsIntVector());
if((node = searchNode->GetNode("overTime")) != 0)
SetOverTime(node->AsBool());
if((node = searchNode->GetNode("timeStart")) != 0)
SetTimeStart(node->AsInt());
if((node = searchNode->GetNode("timeEnd")) != 0)
SetTimeEnd(node->AsInt());
if((node = searchNode->GetNode("timeStride")) != 0)
SetTimeStride(node->AsInt());
}
示例13: if
void
ContourAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("ContourAttributes");
if(searchNode == 0)
return;
DataNode *node;
// Set the default palette from the values in the DataNode.
if((node = searchNode->GetNode("defaultPalette")) != 0)
defaultPalette.SetFromNode(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("legendFlag")) != 0)
SetLegendFlag(node->AsBool());
if((node = searchNode->GetNode("invertColorTable")) != 0)
SetInvertColorTable(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("contourNLevels")) != 0)
SetContourNLevels(node->AsInt());
if((node = searchNode->GetNode("contourValue")) != 0)
SetContourValue(node->AsDoubleVector());
if((node = searchNode->GetNode("contourPercent")) != 0)
SetContourPercent(node->AsDoubleVector());
if((node = searchNode->GetNode("contourMethod")) != 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)
SetContourMethod(Select_by(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Select_by value;
if(Select_by_FromString(node->AsString(), value))
SetContourMethod(value);
}
}
if((node = searchNode->GetNode("minFlag")) != 0)
SetMinFlag(node->AsBool());
if((node = searchNode->GetNode("maxFlag")) != 0)
SetMaxFlag(node->AsBool());
if((node = searchNode->GetNode("min")) != 0)
SetMin(node->AsDouble());
if((node = searchNode->GetNode("max")) != 0)
SetMax(node->AsDouble());
if((node = searchNode->GetNode("scaling")) != 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)
SetScaling(Scaling(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Scaling value;
if(Scaling_FromString(node->AsString(), value))
SetScaling(value);
}
}
if((node = searchNode->GetNode("wireframe")) != 0)
SetWireframe(node->AsBool());
}