Class FieldBuilder

Inheritance Relationships

Base Type

  • public std::tr1::enable_shared_from_this< FieldBuilder >

Class Documentation

class FieldBuilder : public std::tr1::enable_shared_from_this<FieldBuilder>

Interface for in-line creating of introspection interfaces.

One instance can be used to create multiple Field instances. An instance of this object must not be used concurrently (an object has a state).

Author

mse

Public Functions

FieldBuilderPtr setId(std::string const &id)

Set ID of an object to be created.

Parameters

id – id to be set.

Returns

this instance of a FieldBuilder.

FieldBuilderPtr add(std::string const &name, ScalarType scalarType)

Add a Scalar.

Parameters
  • name – name of the array.

  • scalarType – type of a scalar to add.

Returns

this instance of a FieldBuilder.

StructureConstPtr createStructure()

Create a Structure. This resets this instance state and allows new Field instance to be created.

Returns

a new instance of a Structure.

UnionConstPtr createUnion()

Create an Union. This resets this instance state and allows new Field instance to be created.

Returns

a new instance of an Union.

FieldBuilderPtr addNestedStructure(std::string const &name)

Add new nested Structure. endNested() method must be called to complete creation of the nested Structure.

See also

endNested()

Parameters

name – nested structure name.

Returns

a new instance of a FieldBuilder is returned.

FieldBuilderPtr addNestedUnion(std::string const &name)

Add new nested Union. endNested() method must be called to complete creation of the nested Union.

See also

endNested()

Parameters

name – nested union name.

Returns

a new instance of a FieldBuilder is returned.

FieldBuilderPtr addNestedStructureArray(std::string const &name)

Add new nested Structure[]. endNested() method must be called to complete creation of the nested Structure.

See also

endNested()

Parameters

name – nested structure name.

Returns

a new instance of a FieldBuilder is returned.

FieldBuilderPtr addNestedUnionArray(std::string const &name)

Add new nested Union[]. endNested() method must be called to complete creation of the nested Union.

See also

endNested()

Parameters

name – nested union name.

Returns

a new instance of a FieldBuilder is returned.

FieldBuilderPtr endNested()

Complete the creation of a nested object.

Returns

a previous (parent) FieldBuilder.

Public Members

FieldBuilderPtr addBoundedString(std::string const &name, std::size_t maxLength) PVD_DEPRECATED("See https FieldBuilderPtr addArray (std::string const &name, ScalarType scalarType)

Add a BoundedString.

Param name

name of the array.

Param maxLength

a string maximum length.

Param name

name of the array.

Param field

a field to add.

Param name

name of the array.

Param scalarType

type of a scalar element.

Return

this instance of a FieldBuilder. Add a Field (e.g. Structure, Union).

Return

this instance of a FieldBuilder. Add variable size array of Scalar elements.

Return

this instance of a FieldBuilder.

FieldBuilderPtr addFixedArray(std::string const &name, ScalarType scalarType, std::size_t size) PVD_DEPRECATED("See https FieldBuilderPtr addArray (std::string const &name, FieldConstPtr const &element)

Add fixed-size array of Scalar elements.

Param name

name of the array.

Param scalarType

type of a scalar element.

Param size

Array fixed size.

Param name

name of the array.

Param scalarType

type of a scalar element.

Param bound

Array maximum capacity (size).

Param name

name of the array.

Param element

a type of an array element.

Return

this instance of a FieldBuilder. Add bounded-size array of Scalar elements.

Return

this instance of a FieldBuilder. Add array of Field elements.

Return

this instance of a FieldBuilder.

Public Static Functions

static FieldBuilderPtr begin()

Create a new instance of in-line Field builder.

Version

Added after 7.0.0

static FieldBuilderPtr begin(StructureConstPtr S)

Create a new instance of in-line Field builder pre-initialized with and existing Structure.