Exemple #1
0
bool
CartographicProjectionAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    CartographicProjectionAttributes defaultObject;
    bool addToParent = false;
    // Create a node for CartographicProjectionAttributes.
    DataNode *node = new DataNode("CartographicProjectionAttributes");

    if(completeSave || !FieldsEqual(ID_projectionID, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("projectionID", ProjectionID_ToString(projectionID)));
    }

    if(completeSave || !FieldsEqual(ID_centralMeridian, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("centralMeridian", centralMeridian));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
ColorControlPoint::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    ColorControlPoint defaultObject;
    bool addToParent = false;
    // Create a node for ColorControlPoint.
    DataNode *node = new DataNode("ColorControlPoint");

    if(completeSave || !FieldsEqual(0, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("colors", colors, 4));
    }

    if(completeSave || !FieldsEqual(1, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("position", position));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
ViewerClientInformation::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    ViewerClientInformation defaultObject;
    bool addToParent = false;
    // Create a node for ViewerClientInformation.
    DataNode *node = new DataNode("ViewerClientInformation");

    if(completeSave || !FieldsEqual(ID_vars, &defaultObject))
    {
        addToParent = true;
        for(size_t i = 0; i < vars.size(); ++i)
            vars[i]->CreateNode(node, completeSave, true);
    }

    if(completeSave || !FieldsEqual(ID_supportedFormats, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("supportedFormats", supportedFormats));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
SphereAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    SphereAttributes defaultObject;
    bool addToParent = false;
    // Create a node for SphereAttributes.
    DataNode *node = new DataNode("SphereAttributes");

    if(completeSave || !FieldsEqual(ID_origin, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("origin", origin, 3));
    }

    if(completeSave || !FieldsEqual(ID_radius, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("radius", radius));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
RectilinearProject2DAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    RectilinearProject2DAttributes defaultObject;
    bool addToParent = false;
    // Create a node for RectilinearProject2DAttributes.
    DataNode *node = new DataNode("RectilinearProject2DAttributes");

    if(completeSave || !FieldsEqual(ID_reductionOperator, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("reductionOperator", ReductionOperator_ToString(reductionOperator)));
    }

    if(completeSave || !FieldsEqual(ID_mapGrid, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("mapGrid", mapGrid));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
SiloDumpAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    SiloDumpAttributes defaultObject;
    bool addToParent = false;
    // Create a node for SiloDumpAttributes.
    DataNode *node = new DataNode("SiloDumpAttributes");

    if(completeSave || !FieldsEqual(ID_filename, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("filename", filename));
    }

    if(completeSave || !FieldsEqual(ID_display, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("display", display));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
Exemple #7
0
bool
ProjectAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    ProjectAttributes defaultObject;
    bool addToParent = false;
    // Create a node for ProjectAttributes.
    DataNode *node = new DataNode("ProjectAttributes");

    if(completeSave || !FieldsEqual(ID_projectionType, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("projectionType", ProjectionType_ToString(projectionType)));
    }

    if(completeSave || !FieldsEqual(ID_vectorTransformMethod, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("vectorTransformMethod", VectorTransformMethod_ToString(vectorTransformMethod)));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
Exemple #8
0
bool
TruecolorAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    TruecolorAttributes defaultObject;
    bool addToParent = false;
    // Create a node for TruecolorAttributes.
    DataNode *node = new DataNode("TruecolorAttributes");

    if(completeSave || !FieldsEqual(ID_opacity, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("opacity", opacity));
    }

    if(completeSave || !FieldsEqual(ID_lightingFlag, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("lightingFlag", lightingFlag));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
TimeFormat::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    TimeFormat defaultObject;
    bool addToParent = false;
    // Create a node for TimeFormat.
    DataNode *node = new DataNode("TimeFormat");

    if(completeSave || !FieldsEqual(ID_displayMode, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("displayMode", DisplayMode_ToString(displayMode)));
    }

    if(completeSave || !FieldsEqual(ID_precision, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("precision", precision));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
FontAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    FontAttributes defaultObject;
    bool addToParent = false;
    // Create a node for FontAttributes.
    DataNode *node = new DataNode("FontAttributes");

    if(completeSave || !FieldsEqual(ID_font, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("font", FontName_ToString(font)));
    }

    if(completeSave || !FieldsEqual(ID_scale, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("scale", scale));
    }

    if(completeSave || !FieldsEqual(ID_useForegroundColor, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("useForegroundColor", useForegroundColor));
    }

        DataNode *colorNode = new DataNode("color");
        if(color.CreateNode(colorNode, completeSave, true))
        {
            addToParent = true;
            node->AddNode(colorNode);
        }
        else
            delete colorNode;
    if(completeSave || !FieldsEqual(ID_bold, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("bold", bold));
    }

    if(completeSave || !FieldsEqual(ID_italic, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("italic", italic));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
FileOpenOptions::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    FileOpenOptions defaultObject;
    bool addToParent = false;
    // Create a node for FileOpenOptions.
    DataNode *node = new DataNode("FileOpenOptions");

    if(completeSave || !FieldsEqual(ID_typeNames, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("typeNames", typeNames));
    }

    if(completeSave || !FieldsEqual(ID_typeIDs, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("typeIDs", typeIDs));
    }

    if(completeSave || !FieldsEqual(ID_openOptions, &defaultObject))
    {
        addToParent = true;
        for(size_t i = 0; i < openOptions.size(); ++i)
            openOptions[i]->CreateNode(node, completeSave, true);
    }

    if(completeSave || !FieldsEqual(ID_Enabled, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("Enabled", Enabled));
    }

    if(completeSave || !FieldsEqual(ID_preferredIDs, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("preferredIDs", preferredIDs));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
LagrangianAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    LagrangianAttributes defaultObject;
    bool addToParent = false;
    // Create a node for LagrangianAttributes.
    DataNode *node = new DataNode("LagrangianAttributes");

    if(completeSave || !FieldsEqual(ID_seedPoint, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("seedPoint", seedPoint, 3));
    }

    if(completeSave || !FieldsEqual(ID_numSteps, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("numSteps", numSteps));
    }

    if(completeSave || !FieldsEqual(ID_XAxisSample, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("XAxisSample", sampleType_ToString(XAxisSample)));
    }

    if(completeSave || !FieldsEqual(ID_YAxisSample, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("YAxisSample", sampleType_ToString(YAxisSample)));
    }

    if(completeSave || !FieldsEqual(ID_variable, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("variable", variable));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
SaveSubWindowAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    SaveSubWindowAttributes defaultObject;
    bool addToParent = false;
    // Create a node for SaveSubWindowAttributes.
    DataNode *node = new DataNode("SaveSubWindowAttributes");

    if(completeSave || !FieldsEqual(ID_position, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("position", position, 2));
    }

    if(completeSave || !FieldsEqual(ID_size, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("size", size, 2));
    }

    if(completeSave || !FieldsEqual(ID_layer, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("layer", layer));
    }

    if(completeSave || !FieldsEqual(ID_transparency, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("transparency", transparency));
    }

    if(completeSave || !FieldsEqual(ID_omitWindow, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("omitWindow", omitWindow));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
AnimationAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    AnimationAttributes defaultObject;
    bool addToParent = false;
    // Create a node for AnimationAttributes.
    DataNode *node = new DataNode("AnimationAttributes");

    if(completeSave || !FieldsEqual(ID_animationMode, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("animationMode", AnimationMode_ToString(animationMode)));
    }

    if(completeSave || !FieldsEqual(ID_pipelineCachingMode, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("pipelineCachingMode", pipelineCachingMode));
    }

    if(completeSave || !FieldsEqual(ID_frameIncrement, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("frameIncrement", frameIncrement));
    }

    if(completeSave || !FieldsEqual(ID_timeout, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("timeout", timeout));
    }

    if(completeSave || !FieldsEqual(ID_playbackMode, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("playbackMode", PlaybackMode_ToString(playbackMode)));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
GaussianControlPoint::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    GaussianControlPoint defaultObject;
    bool addToParent = false;
    // Create a node for GaussianControlPoint.
    DataNode *node = new DataNode("GaussianControlPoint");

    if(completeSave || !FieldsEqual(ID_x, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("x", x));
    }

    if(completeSave || !FieldsEqual(ID_height, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("height", height));
    }

    if(completeSave || !FieldsEqual(ID_width, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("width", width));
    }

    if(completeSave || !FieldsEqual(ID_xBias, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("xBias", xBias));
    }

    if(completeSave || !FieldsEqual(ID_yBias, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("yBias", yBias));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
AxisTickMarks::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    AxisTickMarks defaultObject;
    bool addToParent = false;
    // Create a node for AxisTickMarks.
    DataNode *node = new DataNode("AxisTickMarks");

    if(completeSave || !FieldsEqual(ID_visible, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("visible", visible));
    }

    if(completeSave || !FieldsEqual(ID_majorMinimum, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("majorMinimum", majorMinimum));
    }

    if(completeSave || !FieldsEqual(ID_majorMaximum, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("majorMaximum", majorMaximum));
    }

    if(completeSave || !FieldsEqual(ID_minorSpacing, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("minorSpacing", minorSpacing));
    }

    if(completeSave || !FieldsEqual(ID_majorSpacing, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("majorSpacing", majorSpacing));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
Exemple #17
0
bool
ToroidalPoloidalProjection::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    ToroidalPoloidalProjection defaultObject;
    bool addToParent = false;
    // Create a node for ToroidalPoloidalProjection.
    DataNode *node = new DataNode("ToroidalPoloidalProjection");

    if(completeSave || !FieldsEqual(ID_R0, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("R0", R0));
    }

    if(completeSave || !FieldsEqual(ID_r, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("r", r));
    }

    if(completeSave || !FieldsEqual(ID_centroidSource, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("centroidSource", CentroidSource_ToString(centroidSource)));
    }

    if(completeSave || !FieldsEqual(ID_centroid, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("centroid", centroid, 3));
    }

    if(completeSave || !FieldsEqual(ID_project2D, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("project2D", project2D));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
Exemple #18
0
bool ColorControlPointList::CreateNode(DataNode* parentNode, bool completeSave, bool forceAdd)
{
  if (parentNode == 0)
    return false;

  ColorControlPointList defaultObject;
  bool addToParent = false;
  // Create a node for ColorControlPointList.
  DataNode* node = new DataNode("ColorControlPointList");

  if (completeSave || !FieldsEqual(0, &defaultObject))
  {
    addToParent = true;
    for (unsigned int i = 0; i < controlPoints.size(); ++i)
      controlPoints[i]->CreateNode(node, completeSave, true);
  }

  if (completeSave || !FieldsEqual(1, &defaultObject))
  {
    addToParent = true;
    node->AddNode(new DataNode("smoothingFlag", smoothingFlag));
  }

  if (completeSave || !FieldsEqual(2, &defaultObject))
  {
    addToParent = true;
    node->AddNode(new DataNode("equalSpacingFlag", equalSpacingFlag));
  }

  if (completeSave || !FieldsEqual(3, &defaultObject))
  {
    addToParent = true;
    node->AddNode(new DataNode("discreteFlag", discreteFlag));
  }

  if (completeSave || !FieldsEqual(4, &defaultObject))
  {
    addToParent = true;
    node->AddNode(new DataNode("externalFlag", externalFlag));
  }

  // Add the node to the parent node.
  if (addToParent || forceAdd)
    parentNode->AddNode(node);
  else
    delete node;

  return (addToParent || forceAdd);
}
bool
HostProfileList::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    HostProfileList defaultObject;
    bool addToParent = false;
    // Create a node for HostProfileList.
    DataNode *node = new DataNode("HostProfileList");

    if(completeSave || !FieldsEqual(ID_machines, &defaultObject))
    {
        addToParent = true;
        for(size_t i = 0; i < machines.size(); ++i)
            machines[i]->CreateNode(node, completeSave, true);
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
SyncAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    SyncAttributes defaultObject;
    bool addToParent = false;
    // Create a node for SyncAttributes.
    DataNode *node = new DataNode("SyncAttributes");

    if(completeSave || !FieldsEqual(ID_syncTag, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("syncTag", syncTag));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
ProgrammableOpAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    ProgrammableOpAttributes defaultObject;
    bool addToParent = false;
    // Create a node for ProgrammableOpAttributes.
    DataNode *node = new DataNode("ProgrammableOpAttributes");

    if(completeSave || !FieldsEqual(ID_scriptMap, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("scriptMap", scriptMap));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
GaussianControlPointList::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    GaussianControlPointList defaultObject;
    bool addToParent = false;
    // Create a node for GaussianControlPointList.
    DataNode *node = new DataNode("GaussianControlPointList");

    if(completeSave || !FieldsEqual(0, &defaultObject))
    {
        addToParent = true;
        for(unsigned int i = 0; i < controlPoints.size(); ++i)
            controlPoints[i]->CreateNode(node, completeSave, true);
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
BoundaryOpAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    BoundaryOpAttributes defaultObject;
    bool addToParent = false;
    // Create a node for BoundaryOpAttributes.
    DataNode *node = new DataNode("BoundaryOpAttributes");

    if(completeSave || !FieldsEqual(ID_smoothingLevel, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("smoothingLevel", smoothingLevel));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
ColorAttributeList::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    ColorAttributeList defaultObject;
    bool addToParent = false;
    // Create a node for ColorAttributeList.
    DataNode *node = new DataNode("ColorAttributeList");

    if(completeSave || !FieldsEqual(ID_colors, &defaultObject))
    {
        addToParent = true;
        for(size_t i = 0; i < colors.size(); ++i)
            colors[i]->CreateNode(node, completeSave, true);
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
DualMeshAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    DualMeshAttributes defaultObject;
    bool addToParent = false;
    // Create a node for DualMeshAttributes.
    DataNode *node = new DataNode("DualMeshAttributes");

    if(completeSave || !FieldsEqual(ID_mode, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("mode", ConversionMode_ToString(mode)));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
SelectionList::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    SelectionList defaultObject;
    bool addToParent = false;
    // Create a node for SelectionList.
    DataNode *node = new DataNode("SelectionList");

    if(completeSave || !FieldsEqual(ID_autoApplyUpdates, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("autoApplyUpdates", autoApplyUpdates));
    }

    if(completeSave)
    {
        addToParent = true;
        for(size_t i = 0; i < selections.size(); ++i)
            selections[i]->CreateNode(node, completeSave, true);
    }

    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
AnnotationObjectList::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    AnnotationObjectList defaultObject;
    bool addToParent = false;
    // Create a node for AnnotationObjectList.
    DataNode *node = new DataNode("AnnotationObjectList");

    if(completeSave || !FieldsEqual(ID_annotation, &defaultObject))
    {
        addToParent = true;
        for(size_t i = 0; i < annotation.size(); ++i)
            annotation[i]->CreateNode(node, completeSave, true);
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
Exemple #28
0
bool
BoxExtents::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    BoxExtents defaultObject;
    bool addToParent = false;
    // Create a node for BoxExtents.
    DataNode *node = new DataNode("BoxExtents");

    if(completeSave || !FieldsEqual(ID_extents, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("extents", extents, 6));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
Exemple #29
0
bool
Scale::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    Scale defaultObject;
    bool addToParent = false;
    // Create a node for Scale.
    DataNode *node = new DataNode("Scale");

    if(completeSave || !FieldsEqual(ID_ScaleFactor, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("ScaleFactor", ScaleFactor));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}
bool
DecimateAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
    if(parentNode == 0)
        return false;

    DecimateAttributes defaultObject;
    bool addToParent = false;
    // Create a node for DecimateAttributes.
    DataNode *node = new DataNode("DecimateAttributes");

    if(completeSave || !FieldsEqual(ID_target, &defaultObject))
    {
        addToParent = true;
        node->AddNode(new DataNode("target", target));
    }


    // Add the node to the parent node.
    if(addToParent || forceAdd)
        parentNode->AddNode(node);
    else
        delete node;

    return (addToParent || forceAdd);
}