本文整理汇总了C++中DataNode::AsString方法的典型用法代码示例。如果您正苦于以下问题:C++ DataNode::AsString方法的具体用法?C++ DataNode::AsString怎么用?C++ DataNode::AsString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataNode
的用法示例。
在下文中一共展示了DataNode::AsString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: if
void
MessageAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("MessageAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("text")) != 0)
SetText(node->AsString());
if((node = searchNode->GetNode("unicode")) != 0)
SetUnicode(node->AsUnsignedCharVector());
if((node = searchNode->GetNode("hasUnicode")) != 0)
SetHasUnicode(node->AsBool());
if((node = searchNode->GetNode("severity")) != 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)
SetSeverity(Severity(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Severity value;
if(Severity_FromString(node->AsString(), value))
SetSeverity(value);
}
}
}
示例3: SetStrainVar
void
CracksClipperAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("CracksClipperAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("crack1Var")) != 0)
SetCrack1Var(node->AsString());
if((node = searchNode->GetNode("crack2Var")) != 0)
SetCrack2Var(node->AsString());
if((node = searchNode->GetNode("crack3Var")) != 0)
SetCrack3Var(node->AsString());
if((node = searchNode->GetNode("strainVar")) != 0)
SetStrainVar(node->AsString());
if((node = searchNode->GetNode("showCrack1")) != 0)
SetShowCrack1(node->AsBool());
if((node = searchNode->GetNode("showCrack2")) != 0)
SetShowCrack2(node->AsBool());
if((node = searchNode->GetNode("showCrack3")) != 0)
SetShowCrack3(node->AsBool());
if((node = searchNode->GetNode("inMassVar")) != 0)
SetInMassVar(node->AsString());
}
示例4: 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);
}
示例5: SetPrinterName
void
PrinterAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("PrinterAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("printerName")) != 0)
SetPrinterName(node->AsString());
if((node = searchNode->GetNode("printProgram")) != 0)
SetPrintProgram(node->AsString());
if((node = searchNode->GetNode("documentName")) != 0)
SetDocumentName(node->AsString());
if((node = searchNode->GetNode("creator")) != 0)
SetCreator(node->AsString());
if((node = searchNode->GetNode("numCopies")) != 0)
SetNumCopies(node->AsInt());
if((node = searchNode->GetNode("portrait")) != 0)
SetPortrait(node->AsBool());
if((node = searchNode->GetNode("printColor")) != 0)
SetPrintColor(node->AsBool());
if((node = searchNode->GetNode("outputToFile")) != 0)
SetOutputToFile(node->AsBool());
if((node = searchNode->GetNode("outputToFileName")) != 0)
SetOutputToFileName(node->AsString());
if((node = searchNode->GetNode("pageSize")) != 0)
SetPageSize(node->AsInt());
}
示例6: if
void
CoordSwapAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("CoordSwapAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("newCoord1")) != 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)
SetNewCoord1(Coord(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Coord value;
if(Coord_FromString(node->AsString(), value))
SetNewCoord1(value);
}
}
if((node = searchNode->GetNode("newCoord2")) != 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)
SetNewCoord2(Coord(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Coord value;
if(Coord_FromString(node->AsString(), value))
SetNewCoord2(value);
}
}
if((node = searchNode->GetNode("newCoord3")) != 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)
SetNewCoord3(Coord(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Coord value;
if(Coord_FromString(node->AsString(), value))
SetNewCoord3(value);
}
}
}
示例7: if
void
OnionPeelAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("OnionPeelAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("adjacencyType")) != 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)
SetAdjacencyType(NodeFace(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
NodeFace value;
if(NodeFace_FromString(node->AsString(), value))
SetAdjacencyType(value);
}
}
if((node = searchNode->GetNode("useGlobalId")) != 0)
SetUseGlobalId(node->AsBool());
if((node = searchNode->GetNode("categoryName")) != 0)
SetCategoryName(node->AsString());
if((node = searchNode->GetNode("subsetName")) != 0)
SetSubsetName(node->AsString());
if((node = searchNode->GetNode("index")) != 0)
SetIndex(node->AsIntVector());
if((node = searchNode->GetNode("logical")) != 0)
SetLogical(node->AsBool());
if((node = searchNode->GetNode("requestedLayer")) != 0)
SetRequestedLayer(node->AsInt());
if((node = searchNode->GetNode("seedType")) != 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)
SetSeedType(SeedIdType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
SeedIdType value;
if(SeedIdType_FromString(node->AsString(), value))
SetSeedType(value);
}
}
}
示例8: if
void
InteractorAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("InteractorAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("showGuidelines")) != 0)
SetShowGuidelines(node->AsBool());
if((node = searchNode->GetNode("clampSquare")) != 0)
SetClampSquare(node->AsBool());
if((node = searchNode->GetNode("fillViewportOnZoom")) != 0)
SetFillViewportOnZoom(node->AsBool());
if((node = searchNode->GetNode("navigationMode")) != 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)
SetNavigationMode(NavigationMode(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
NavigationMode value;
if(NavigationMode_FromString(node->AsString(), value))
SetNavigationMode(value);
}
}
if((node = searchNode->GetNode("axisArraySnap")) != 0)
SetAxisArraySnap(node->AsBool());
if((node = searchNode->GetNode("boundingBoxMode")) != 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)
SetBoundingBoxMode(BoundingBoxMode(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
BoundingBoxMode value;
if(BoundingBoxMode_FromString(node->AsString(), value))
SetBoundingBoxMode(value);
}
}
}
示例9: if
void
AnimationAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("AnimationAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("animationMode")) != 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)
SetAnimationMode(AnimationMode(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
AnimationMode value;
if(AnimationMode_FromString(node->AsString(), value))
SetAnimationMode(value);
}
}
if((node = searchNode->GetNode("pipelineCachingMode")) != 0)
SetPipelineCachingMode(node->AsBool());
if((node = searchNode->GetNode("frameIncrement")) != 0)
SetFrameIncrement(node->AsInt());
if((node = searchNode->GetNode("timeout")) != 0)
SetTimeout(node->AsInt());
if((node = searchNode->GetNode("playbackMode")) != 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)
SetPlaybackMode(PlaybackMode(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
PlaybackMode value;
if(PlaybackMode_FromString(node->AsString(), value))
SetPlaybackMode(value);
}
}
}
示例10: if
void
LagrangianAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("LagrangianAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("seedPoint")) != 0)
SetSeedPoint(node->AsDoubleArray());
if((node = searchNode->GetNode("numSteps")) != 0)
SetNumSteps(node->AsInt());
if((node = searchNode->GetNode("XAxisSample")) != 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)
SetXAxisSample(sampleType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
sampleType value;
if(sampleType_FromString(node->AsString(), value))
SetXAxisSample(value);
}
}
if((node = searchNode->GetNode("YAxisSample")) != 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)
SetYAxisSample(sampleType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
sampleType value;
if(sampleType_FromString(node->AsString(), value))
SetYAxisSample(value);
}
}
if((node = searchNode->GetNode("variable")) != 0)
SetVariable(node->AsString());
}
示例11: SetUseSystemDefault
void
AppearanceAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("AppearanceAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("useSystemDefault")) != 0)
SetUseSystemDefault(node->AsBool());
if((node = searchNode->GetNode("background")) != 0)
SetBackground(node->AsString());
if((node = searchNode->GetNode("foreground")) != 0)
SetForeground(node->AsString());
if((node = searchNode->GetNode("fontName")) != 0)
SetFontName(node->AsString());
if((node = searchNode->GetNode("style")) != 0)
SetStyle(node->AsString());
if((node = searchNode->GetNode("orientation")) != 0)
SetOrientation(node->AsInt());
if((node = searchNode->GetNode("defaultForeground")) != 0)
SetDefaultForeground(node->AsString());
if((node = searchNode->GetNode("defaultBackground")) != 0)
SetDefaultBackground(node->AsString());
if((node = searchNode->GetNode("defaultFontName")) != 0)
SetDefaultFontName(node->AsString());
if((node = searchNode->GetNode("defaultStyle")) != 0)
SetDefaultStyle(node->AsString());
if((node = searchNode->GetNode("defaultOrientation")) != 0)
SetDefaultOrientation(node->AsInt());
}
示例12: SetUseStride
void
TensorAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("TensorAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("useStride")) != 0)
SetUseStride(node->AsBool());
if((node = searchNode->GetNode("stride")) != 0)
SetStride(node->AsInt());
if((node = searchNode->GetNode("nTensors")) != 0)
SetNTensors(node->AsInt());
if((node = searchNode->GetNode("scale")) != 0)
SetScale(node->AsDouble());
if((node = searchNode->GetNode("scaleByMagnitude")) != 0)
SetScaleByMagnitude(node->AsBool());
if((node = searchNode->GetNode("autoScale")) != 0)
SetAutoScale(node->AsBool());
if((node = searchNode->GetNode("colorByEigenvalues")) != 0)
SetColorByEigenvalues(node->AsBool());
if((node = searchNode->GetNode("useLegend")) != 0)
SetUseLegend(node->AsBool());
if((node = searchNode->GetNode("tensorColor")) != 0)
tensorColor.SetFromNode(node);
if((node = searchNode->GetNode("colorTableName")) != 0)
SetColorTableName(node->AsString());
if((node = searchNode->GetNode("invertColorTable")) != 0)
SetInvertColorTable(node->AsBool());
}
示例13: SetInteractive
void
LineoutAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("LineoutAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("point1")) != 0)
SetPoint1(node->AsDoubleArray());
if((node = searchNode->GetNode("point2")) != 0)
SetPoint2(node->AsDoubleArray());
if((node = searchNode->GetNode("interactive")) != 0)
SetInteractive(node->AsBool());
if((node = searchNode->GetNode("ignoreGlobal")) != 0)
SetIgnoreGlobal(node->AsBool());
if((node = searchNode->GetNode("samplingOn")) != 0)
SetSamplingOn(node->AsBool());
if((node = searchNode->GetNode("numberOfSamplePoints")) != 0)
SetNumberOfSamplePoints(node->AsInt());
if((node = searchNode->GetNode("reflineLabels")) != 0)
SetReflineLabels(node->AsBool());
if((node = searchNode->GetNode("designator")) != 0)
SetDesignator(node->AsString());
}
示例14: if
void
DelaunayAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("DelaunayAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("dimension")) != 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)
SetDimension(Dimension(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Dimension value;
if(Dimension_FromString(node->AsString(), value))
SetDimension(value);
}
}
}
示例15: if
void
RectilinearProject2DAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("RectilinearProject2DAttributes");
if(searchNode == 0)
return;
DataNode *node;
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 < 2)
SetReductionOperator(ReductionOperator(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
ReductionOperator value;
if(ReductionOperator_FromString(node->AsString(), value))
SetReductionOperator(value);
}
}
if((node = searchNode->GetNode("mapGrid")) != 0)
SetMapGrid(node->AsBool());
}