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());
}
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());
}
Ejemplo n.º 3
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());
}
void
ReplicateAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("useUnitCellVectors")) != 0)
        SetUseUnitCellVectors(node->AsBool());
    if((node = searchNode->GetNode("xVector")) != 0)
        SetXVector(node->AsDoubleArray());
    if((node = searchNode->GetNode("yVector")) != 0)
        SetYVector(node->AsDoubleArray());
    if((node = searchNode->GetNode("zVector")) != 0)
        SetZVector(node->AsDoubleArray());
    if((node = searchNode->GetNode("xReplications")) != 0)
        SetXReplications(node->AsInt());
    if((node = searchNode->GetNode("yReplications")) != 0)
        SetYReplications(node->AsInt());
    if((node = searchNode->GetNode("zReplications")) != 0)
        SetZReplications(node->AsInt());
    if((node = searchNode->GetNode("mergeResults")) != 0)
        SetMergeResults(node->AsBool());
    if((node = searchNode->GetNode("replicateUnitCellAtoms")) != 0)
        SetReplicateUnitCellAtoms(node->AsBool());
    if((node = searchNode->GetNode("shiftPeriodicAtomOrigin")) != 0)
        SetShiftPeriodicAtomOrigin(node->AsBool());
    if((node = searchNode->GetNode("newPeriodicOrigin")) != 0)
        SetNewPeriodicOrigin(node->AsDoubleArray());
}
Ejemplo n.º 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());
}
Ejemplo n.º 6
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);
        }
    }
}
Ejemplo n.º 7
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());
}
Ejemplo n.º 8
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);
        }
    }
}
Ejemplo n.º 9
0
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);
        }
    }
}
void
LinearTransformAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("m00")) != 0)
        SetM00(node->AsDouble());
    if((node = searchNode->GetNode("m01")) != 0)
        SetM01(node->AsDouble());
    if((node = searchNode->GetNode("m02")) != 0)
        SetM02(node->AsDouble());
    if((node = searchNode->GetNode("m03")) != 0)
        SetM03(node->AsDouble());
    if((node = searchNode->GetNode("m10")) != 0)
        SetM10(node->AsDouble());
    if((node = searchNode->GetNode("m11")) != 0)
        SetM11(node->AsDouble());
    if((node = searchNode->GetNode("m12")) != 0)
        SetM12(node->AsDouble());
    if((node = searchNode->GetNode("m13")) != 0)
        SetM13(node->AsDouble());
    if((node = searchNode->GetNode("m20")) != 0)
        SetM20(node->AsDouble());
    if((node = searchNode->GetNode("m21")) != 0)
        SetM21(node->AsDouble());
    if((node = searchNode->GetNode("m22")) != 0)
        SetM22(node->AsDouble());
    if((node = searchNode->GetNode("m23")) != 0)
        SetM23(node->AsDouble());
    if((node = searchNode->GetNode("m30")) != 0)
        SetM30(node->AsDouble());
    if((node = searchNode->GetNode("m31")) != 0)
        SetM31(node->AsDouble());
    if((node = searchNode->GetNode("m32")) != 0)
        SetM32(node->AsDouble());
    if((node = searchNode->GetNode("m33")) != 0)
        SetM33(node->AsDouble());
    if((node = searchNode->GetNode("invertLinearTransform")) != 0)
        SetInvertLinearTransform(node->AsBool());
    if((node = searchNode->GetNode("transformVectors")) != 0)
        SetTransformVectors(node->AsBool());
}
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());
}
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());
}
Ejemplo n.º 13
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());
}
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());
}
Ejemplo n.º 15
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
MovieSequenceCompositeTransition::ReadUIValues(QWidget *ui, DataNode *node)
{
    const char *mName = "MovieSequenceCompositeTransition::ReadUIValues: ";

    if(node != 0)
    {
        QvisCompositeTransition *UI = (QvisCompositeTransition *)ui;

        // Read the number of frames.
        DataNode *nFramesNode = node->GetNode("nFrames");
        if(nFramesNode !=0 && nFramesNode->GetNodeType() == INT_NODE)
        {
            UI->setNFrames(nFramesNode->AsInt());
        }
        else
        {
            debug4 << mName << "nFrames not found in node." << endl;
        }

        // Read the reverse flag.
        DataNode *reverseNode = node->GetNode("reverse");
        if(reverseNode !=0 && reverseNode->GetNodeType() == BOOL_NODE)
        {
            UI->setReverse(reverseNode->AsBool());
        }
        else
        {
            debug4 << mName << "reverse not found in node." << endl;
        }
    }
}
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);
}
void
View3DAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("viewNormal")) != 0)
        SetViewNormal(node->AsDoubleArray());
    if((node = searchNode->GetNode("focus")) != 0)
        SetFocus(node->AsDoubleArray());
    if((node = searchNode->GetNode("viewUp")) != 0)
        SetViewUp(node->AsDoubleArray());
    if((node = searchNode->GetNode("viewAngle")) != 0)
        SetViewAngle(node->AsDouble());
    if((node = searchNode->GetNode("parallelScale")) != 0)
        SetParallelScale(node->AsDouble());
    if((node = searchNode->GetNode("nearPlane")) != 0)
        SetNearPlane(node->AsDouble());
    if((node = searchNode->GetNode("farPlane")) != 0)
        SetFarPlane(node->AsDouble());
    if((node = searchNode->GetNode("imagePan")) != 0)
        SetImagePan(node->AsDoubleArray());
    if((node = searchNode->GetNode("imageZoom")) != 0)
        SetImageZoom(node->AsDouble());
    if((node = searchNode->GetNode("perspective")) != 0)
        SetPerspective(node->AsBool());
    if((node = searchNode->GetNode("eyeAngle")) != 0)
        SetEyeAngle(node->AsDouble());
    if((node = searchNode->GetNode("centerOfRotationSet")) != 0)
        SetCenterOfRotationSet(node->AsBool());
    if((node = searchNode->GetNode("centerOfRotation")) != 0)
        SetCenterOfRotation(node->AsDoubleArray());
    if((node = searchNode->GetNode("axis3DScaleFlag")) != 0)
        SetAxis3DScaleFlag(node->AsBool());
    if((node = searchNode->GetNode("axis3DScales")) != 0)
        SetAxis3DScales(node->AsDoubleArray());
    if((node = searchNode->GetNode("shear")) != 0)
        SetShear(node->AsDoubleArray());
    if((node = searchNode->GetNode("windowValid")) != 0)
        SetWindowValid(node->AsBool());
}
void
InverseGhostZoneAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("requestGhostZones")) != 0)
        SetRequestGhostZones(node->AsBool());
    if((node = searchNode->GetNode("showDuplicated")) != 0)
        SetShowDuplicated(node->AsBool());
    if((node = searchNode->GetNode("showEnhancedConnectivity")) != 0)
        SetShowEnhancedConnectivity(node->AsBool());
    if((node = searchNode->GetNode("showReducedConnectivity")) != 0)
        SetShowReducedConnectivity(node->AsBool());
    if((node = searchNode->GetNode("showAMRRefined")) != 0)
        SetShowAMRRefined(node->AsBool());
    if((node = searchNode->GetNode("showExterior")) != 0)
        SetShowExterior(node->AsBool());
    if((node = searchNode->GetNode("showNotApplicable")) != 0)
        SetShowNotApplicable(node->AsBool());
}
Ejemplo n.º 20
0
void
KeyframeAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("enabled")) != 0)
        SetEnabled(node->AsBool());
    if((node = searchNode->GetNode("nFrames")) != 0)
        SetNFrames(node->AsInt());
    if((node = searchNode->GetNode("nFramesWasUserSet")) != 0)
        SetNFramesWasUserSet(node->AsBool());
}
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);
        }
    }
}
Ejemplo n.º 22
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
ViewAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("viewNormal")) != 0)
        SetViewNormal(node->AsDoubleArray());
    if((node = searchNode->GetNode("focus")) != 0)
        SetFocus(node->AsDoubleArray());
    if((node = searchNode->GetNode("viewUp")) != 0)
        SetViewUp(node->AsDoubleArray());
    if((node = searchNode->GetNode("viewAngle")) != 0)
        SetViewAngle(node->AsDouble());
    if((node = searchNode->GetNode("setScale")) != 0)
        SetSetScale(node->AsBool());
    if((node = searchNode->GetNode("parallelScale")) != 0)
        SetParallelScale(node->AsDouble());
    if((node = searchNode->GetNode("nearPlane")) != 0)
        SetNearPlane(node->AsDouble());
    if((node = searchNode->GetNode("farPlane")) != 0)
        SetFarPlane(node->AsDouble());
    if((node = searchNode->GetNode("imagePan")) != 0)
        SetImagePan(node->AsDoubleArray());
    if((node = searchNode->GetNode("imageZoom")) != 0)
        SetImageZoom(node->AsDouble());
    if((node = searchNode->GetNode("perspective")) != 0)
        SetPerspective(node->AsBool());
    if((node = searchNode->GetNode("windowCoords")) != 0)
        SetWindowCoords(node->AsDoubleArray());
    if((node = searchNode->GetNode("viewportCoords")) != 0)
        SetViewportCoords(node->AsDoubleArray());
    if((node = searchNode->GetNode("eyeAngle")) != 0)
        SetEyeAngle(node->AsDouble());
}
Ejemplo n.º 24
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());
}
Ejemplo n.º 25
0
void
AMRStitchCellAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("CreateCellsOfType")) != 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)
                SetCreateCellsOfType(CreateType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            CreateType value;
            if(CreateType_FromString(node->AsString(), value))
                SetCreateCellsOfType(value);
        }
    }
    if((node = searchNode->GetNode("AddCaseNo")) != 0)
        SetAddCaseNo(node->AsBool());
    if((node = searchNode->GetNode("OnlyProcessListedDomains")) != 0)
        SetOnlyProcessListedDomains(node->AsBool());
    if((node = searchNode->GetNode("Domains")) != 0)
        SetDomains(node->AsIntVector());
    if((node = searchNode->GetNode("OnlyProcessLevel")) != 0)
        SetOnlyProcessLevel(node->AsBool());
    if((node = searchNode->GetNode("Level")) != 0)
        SetLevel(node->AsInt());
}
void
FontAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("font")) != 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)
                SetFont(FontName(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            FontName value;
            if(FontName_FromString(node->AsString(), value))
                SetFont(value);
        }
    }
    if((node = searchNode->GetNode("scale")) != 0)
        SetScale(node->AsDouble());
    if((node = searchNode->GetNode("useForegroundColor")) != 0)
        SetUseForegroundColor(node->AsBool());
    if((node = searchNode->GetNode("color")) != 0)
        color.SetFromNode(node);
    if((node = searchNode->GetNode("bold")) != 0)
        SetBold(node->AsBool());
    if((node = searchNode->GetNode("italic")) != 0)
        SetItalic(node->AsBool());
}
Ejemplo n.º 27
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);
        }
    }
}
Ejemplo n.º 28
0
void
EdgeAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("dummy")) != 0)
        SetDummy(node->AsBool());
}
Ejemplo n.º 29
0
void
AxesArray::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("visible")) != 0)
        SetVisible(node->AsBool());
    if((node = searchNode->GetNode("ticksVisible")) != 0)
        SetTicksVisible(node->AsBool());
    if((node = searchNode->GetNode("autoSetTicks")) != 0)
        SetAutoSetTicks(node->AsBool());
    if((node = searchNode->GetNode("autoSetScaling")) != 0)
        SetAutoSetScaling(node->AsBool());
    if((node = searchNode->GetNode("lineWidth")) != 0)
        SetLineWidth(node->AsInt());
    if((node = searchNode->GetNode("axes")) != 0)
        axes.SetFromNode(node);
}
Ejemplo n.º 30
0
void
PlaneAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

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

    DataNode *node;
    if((node = searchNode->GetNode("origin")) != 0)
        SetOrigin(node->AsDoubleArray());
    if((node = searchNode->GetNode("normal")) != 0)
        SetNormal(node->AsDoubleArray());
    if((node = searchNode->GetNode("upAxis")) != 0)
        SetUpAxis(node->AsDoubleArray());
    if((node = searchNode->GetNode("haveRadius")) != 0)
        SetHaveRadius(node->AsBool());
    if((node = searchNode->GetNode("radius")) != 0)
        SetRadius(node->AsDouble());
    if((node = searchNode->GetNode("threeSpace")) != 0)
        SetThreeSpace(node->AsBool());
}