Skip to main content
#include <dpf_api.h> Inheritance diagram for ansys::dpf::DataTree:

Public Member Functions

Public Member Functions inherited from ansys::dpf::DpfTypes

Static Public Member Functions

Detailed Description

Define a DOM (Document-Object-Model) tree.

Constructor & Destructor Documentation

DataTree()

Parameters

Member Function Documentation

emptyDataTree()

static Create an empty DataTree. Returns Empty DataTree.

fillFromJson()

Fill this data tree with the content of a json file generated by another tree (See DataTree::writeToJson).

fillFromTxt()

Fill this data tree with the content of a txt file generated by another tree (See DataTree::writeToTxt).

getAvailableAttributeNames()

Returns the list of attributes names available (without recursivity in the subtrees).

getAvailableSubTreeNames()

Returns the list of first rank substree names available (without recursivity in the subtrees).

getBoolAttribute()

Returns an attribute by its name. Exceptions

getDoubleAttribute()

Returns an attribute by its name. Exceptions

getIntAttribute()

Returns an attribute by its name. Exceptions

getStringAttribute()

Returns an attribute by its name. Exceptions

getSubByName()

Returns a subtree by its name (return an empty substree if it doesn’t exist).

getUnsignedIntAttribute()

Returns an attribute by its name. Exceptions

getVectDoubleAttribute()

Returns an attribute by its name. Exceptions

getVectIntAttribute()

Returns an attribute by its name Exceptions

getVectStringAttribute()

Returns an attribute by its name. Exceptions

hasAttribute()

Returns true if an attribute exists (accepts sub attributes by adding ”/”, example attribute_name=“sub_name/attrib_name”).

hasSub()

Returns true if a subtree exists.

makeBoolAttribute()

create or replace an attribute.

makeDoubleAttribute()

create or replace an attribute.

makeIntAttribute()

create or replace an attribute.

makeStringAttribute()

create or replace an attribute.

makeSub()

create a subtree with a name. If the substree already exists, it is returned. Returns the created subtree to fill it.

makeUnsignedIntAttribute()

create or replace an attribute.

makeVectDoubleAttribute()

create or replace an attribute.

makeVectIntAttribute()

create or replace an attribute.

makeVectStringAttribute()

create or replace an attribute.

writeToJson()

Write the attributes and the subtrees of this data tree in a json like format in a c++ standard output stream (example: std::ofstream, std::ostringstream).

writeToTxt()

Write the attributes and the subtrees of this data tree as text in a c++ standard output stream (example: std::ofstream, std::ostringstream).