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
0
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);
        }
    }
}
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());
}
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
0
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());
}
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
0
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
0
void
MultiCurveAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("defaultPalette")) != 0)
        defaultPalette.SetFromNode(node);
    if((node = searchNode->GetNode("changedColors")) != 0)
        SetChangedColors(node->AsUnsignedCharVector());
    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 < 2)
                SetColorType(ColoringMethod(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ColoringMethod value;
            if(ColoringMethod_FromString(node->AsString(), value))
                SetColorType(value);
        }
    }
    if((node = searchNode->GetNode("singleColor")) != 0)
        singleColor.SetFromNode(node);
    if((node = searchNode->GetNode("multiColor")) != 0)
        multiColor.SetFromNode(node);
    if((node = searchNode->GetNode("lineStyle")) != 0)
        SetLineStyle(node->AsInt());
    if((node = searchNode->GetNode("lineWidth")) != 0)
        SetLineWidth(node->AsInt());
    if((node = searchNode->GetNode("yAxisTitleFormat")) != 0)
        SetYAxisTitleFormat(node->AsString());
    if((node = searchNode->GetNode("useYAxisTickSpacing")) != 0)
        SetUseYAxisTickSpacing(node->AsBool());
    if((node = searchNode->GetNode("yAxisTickSpacing")) != 0)
        SetYAxisTickSpacing(node->AsDouble());
    if((node = searchNode->GetNode("displayMarkers")) != 0)
        SetDisplayMarkers(node->AsBool());
    if((node = searchNode->GetNode("markerVariable")) != 0)
        SetMarkerVariable(node->AsString());
    if((node = searchNode->GetNode("displayIds")) != 0)
        SetDisplayIds(node->AsBool());
    if((node = searchNode->GetNode("idVariable")) != 0)
        SetIdVariable(node->AsString());
    if((node = searchNode->GetNode("legendFlag")) != 0)
        SetLegendFlag(node->AsBool());
}
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);
        }
    }
}
Пример #10
0
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);
        }
    }
}
Пример #11
0
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());
}
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());
}
Пример #13
0
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());
}
Пример #14
0
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());
}
Пример #15
0
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);
        }
    }
}
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());
}
void
TimeFormat::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("displayMode")) != 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)
                SetDisplayMode(DisplayMode(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            DisplayMode value;
            if(DisplayMode_FromString(node->AsString(), value))
                SetDisplayMode(value);
        }
    }
    if((node = searchNode->GetNode("precision")) != 0)
        SetPrecision(node->AsInt());
}
Пример #18
0
void
DualMeshAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("mode")) != 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)
                SetMode(ConversionMode(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ConversionMode value;
            if(ConversionMode_FromString(node->AsString(), value))
                SetMode(value);
        }
    }
}
Пример #19
0
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());
}
Пример #20
0
void
CartographicProjectionAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("projectionID")) != 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 < 11)
                SetProjectionID(ProjectionID(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ProjectionID value;
            if(ProjectionID_FromString(node->AsString(), value))
                SetProjectionID(value);
        }
    }
    if((node = searchNode->GetNode("centralMeridian")) != 0)
        SetCentralMeridian(node->AsDouble());
}
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());
}
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());
}
void
DatabaseCorrelationList::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    DataNode **children;

    // Clear all the DatabaseCorrelations if we got any.
    bool clearedCorrelations = false;
    // Go through all of the children and construct a new
    // DatabaseCorrelation 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("DatabaseCorrelation"))
            {
                if (!clearedCorrelations)
                {
                    ClearCorrelations();
                    clearedCorrelations = true;
                }
                DatabaseCorrelation temp;
                temp.SetFromNode(children[i]);
                AddCorrelations(temp);
            }
        }
    }

    if((node = searchNode->GetNode("needPermission")) != 0)
        SetNeedPermission(node->AsBool());
    if((node = searchNode->GetNode("defaultCorrelationMethod")) != 0)
        SetDefaultCorrelationMethod(node->AsInt());
    if((node = searchNode->GetNode("whenToCorrelate")) != 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)
                SetWhenToCorrelate(WhenToCorrelate(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            WhenToCorrelate value;
            if(WhenToCorrelate_FromString(node->AsString(), value))
                SetWhenToCorrelate(value);
        }
    }
}
void
ViewerClientAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("renderingType")) != 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)
                SetRenderingType(RenderType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            RenderType value;
            if(RenderType_FromString(node->AsString(), value))
                SetRenderingType(value);
        }
    }
    if((node = searchNode->GetNode("id")) != 0)
        SetId(node->AsInt());
    if((node = searchNode->GetNode("title")) != 0)
        SetTitle(node->AsString());
    if((node = searchNode->GetNode("windowIds")) != 0)
        SetWindowIds(node->AsIntVector());
    if((node = searchNode->GetNode("imageWidth")) != 0)
        SetImageWidth(node->AsInt());
    if((node = searchNode->GetNode("imageHeight")) != 0)
        SetImageHeight(node->AsInt());
    if((node = searchNode->GetNode("imageResolutionPcnt")) != 0)
        SetImageResolutionPcnt(node->AsDouble());
    if((node = searchNode->GetNode("externalClient")) != 0)
        SetExternalClient(node->AsBool());
    if((node = searchNode->GetNode("renderingTypes")) != 0)
        SetRenderingTypes(node->AsIntVector());
}
Пример #25
0
void
ProjectAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("projectionType")) != 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)
                SetProjectionType(ProjectionType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ProjectionType value;
            if(ProjectionType_FromString(node->AsString(), value))
                SetProjectionType(value);
        }
    }
    if((node = searchNode->GetNode("vectorTransformMethod")) != 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 < 4)
                SetVectorTransformMethod(VectorTransformMethod(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            VectorTransformMethod value;
            if(VectorTransformMethod_FromString(node->AsString(), value))
                SetVectorTransformMethod(value);
        }
    }
}
Пример #26
0
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);
        }
    }
}
Пример #27
0
void
TubeAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("scaleByVarFlag")) != 0)
        SetScaleByVarFlag(node->AsBool());
    if((node = searchNode->GetNode("tubeRadiusType")) != 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)
                SetTubeRadiusType(TubeRadiusType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            TubeRadiusType value;
            if(TubeRadiusType_FromString(node->AsString(), value))
                SetTubeRadiusType(value);
        }
    }
    if((node = searchNode->GetNode("radiusFractionBBox")) != 0)
        SetRadiusFractionBBox(node->AsDouble());
    if((node = searchNode->GetNode("radiusAbsolute")) != 0)
        SetRadiusAbsolute(node->AsDouble());
    if((node = searchNode->GetNode("scaleVariable")) != 0)
        SetScaleVariable(node->AsString());
    if((node = searchNode->GetNode("fineness")) != 0)
        SetFineness(node->AsInt());
    if((node = searchNode->GetNode("capping")) != 0)
        SetCapping(node->AsBool());
}
void
ProgrammableOpAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("scriptMap")) != 0)
        SetScriptMap(node->AsString());
}
Пример #29
0
void
MaterialAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("smoothing")) != 0)
        SetSmoothing(node->AsBool());
    if((node = searchNode->GetNode("forceMIR")) != 0)
        SetForceMIR(node->AsBool());
    if((node = searchNode->GetNode("cleanZonesOnly")) != 0)
        SetCleanZonesOnly(node->AsBool());
    if((node = searchNode->GetNode("needValidConnectivity")) != 0)
        SetNeedValidConnectivity(node->AsBool());
    if((node = searchNode->GetNode("algorithm")) != 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)
                SetAlgorithm(Algorithm(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            Algorithm value;
            if(Algorithm_FromString(node->AsString(), value))
                SetAlgorithm(value);
        }
    }
    if((node = searchNode->GetNode("iterationEnabled")) != 0)
        SetIterationEnabled(node->AsBool());
    if((node = searchNode->GetNode("numIterations")) != 0)
        SetNumIterations(node->AsInt());
    if((node = searchNode->GetNode("iterationDamping")) != 0)
        SetIterationDamping(node->AsFloat());
    if((node = searchNode->GetNode("simplifyHeavilyMixedZones")) != 0)
        SetSimplifyHeavilyMixedZones(node->AsBool());
    if((node = searchNode->GetNode("maxMaterialsPerZone")) != 0)
        SetMaxMaterialsPerZone(node->AsInt());
    if((node = searchNode->GetNode("isoVolumeFraction")) != 0)
        SetIsoVolumeFraction(node->AsFloat());
    if((node = searchNode->GetNode("annealingTime")) != 0)
        SetAnnealingTime(node->AsInt());
}
void
SILMatrixAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("set1")) != 0)
        SetSet1(node->AsIntVector());
    if((node = searchNode->GetNode("category1")) != 0)
        SetCategory1(node->AsString());
    if((node = searchNode->GetNode("role1")) != 0)
        SetRole1(node->AsInt());
    if((node = searchNode->GetNode("set2")) != 0)
        SetSet2(node->AsIntVector());
    if((node = searchNode->GetNode("category2")) != 0)
        SetCategory2(node->AsString());
    if((node = searchNode->GetNode("role2")) != 0)
        SetRole2(node->AsInt());
}