PVData C++  8.0.3
Public Member Functions | Static Public Member Functions | Friends | List of all members
epics::pvData::FieldBuilder Class Reference

Interface for in-line creating of introspection interfaces. More...

#include <pv/pvIntrospect.h>

Inheritance diagram for epics::pvData::FieldBuilder:
Inheritance graph
[legend]
Collaboration diagram for epics::pvData::FieldBuilder:
Collaboration graph
[legend]

Public Member Functions

FieldBuilderPtr setId (std::string const &id)
 
FieldBuilderPtr add (std::string const &name, ScalarType scalarType)
 
FieldBuilderPtr addBoundedString (std::string const &name, std::size_t maxLength) EPICS_DEPRECATED
 
FieldBuilderPtr add (std::string const &name, FieldConstPtr const &field)
 
FieldBuilderPtr addArray (std::string const &name, ScalarType scalarType)
 
FieldBuilderPtr addFixedArray (std::string const &name, ScalarType scalarType, std::size_t size) EPICS_DEPRECATED
 
FieldBuilderPtr addBoundedArray (std::string const &name, ScalarType scalarType, std::size_t bound) EPICS_DEPRECATED
 
FieldBuilderPtr addArray (std::string const &name, FieldConstPtr const &element)
 
StructureConstPtr createStructure ()
 
UnionConstPtr createUnion ()
 
FieldBuilderPtr addNestedStructure (std::string const &name)
 
FieldBuilderPtr addNestedUnion (std::string const &name)
 
FieldBuilderPtr addNestedStructureArray (std::string const &name)
 
FieldBuilderPtr addNestedUnionArray (std::string const &name)
 
FieldBuilderPtr endNested ()
 

Static Public Member Functions

static FieldBuilderPtr begin ()
 
static FieldBuilderPtr begin (StructureConstPtr S)
 Create a new instance of in-line Field builder pre-initialized with and existing Structure.
 

Friends

class FieldCreate
 

Detailed Description

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

Definition at line 1072 of file pvIntrospect.h.

Member Function Documentation

◆ add() [1/2]

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

Add a Scalar.

Parameters
namename of the array.
scalarTypetype of a scalar to add.
Returns
this instance of a FieldBuilder.

◆ add() [2/2]

FieldBuilderPtr epics::pvData::FieldBuilder::add ( std::string const &  name,
FieldConstPtr const &  field 
)

Add a Field (e.g. Structure, Union).

Parameters
namename of the array.
fielda field to add.
Returns
this instance of a FieldBuilder.

◆ addArray() [1/2]

FieldBuilderPtr epics::pvData::FieldBuilder::addArray ( std::string const &  name,
ScalarType  scalarType 
)

Add variable size array of Scalar elements.

Parameters
namename of the array.
scalarTypetype of a scalar element.
Returns
this instance of a FieldBuilder.

◆ addArray() [2/2]

FieldBuilderPtr epics::pvData::FieldBuilder::addArray ( std::string const &  name,
FieldConstPtr const &  element 
)

Add array of Field elements.

Parameters
namename of the array.
elementa type of an array element.
Returns
this instance of a FieldBuilder.

◆ addBoundedArray()

FieldBuilderPtr epics::pvData::FieldBuilder::addBoundedArray ( std::string const &  name,
ScalarType  scalarType,
std::size_t  bound 
)

Add bounded-size array of Scalar elements.

Parameters
namename of the array.
scalarTypetype of a scalar element.
boundArray maximum capacity (size).
Returns
this instance of a FieldBuilder.

◆ addBoundedString()

FieldBuilderPtr epics::pvData::FieldBuilder::addBoundedString ( std::string const &  name,
std::size_t  maxLength 
)

Add a BoundedString.

Parameters
namename of the array.
maxLengtha string maximum length.
Returns
this instance of a FieldBuilder.

◆ addFixedArray()

FieldBuilderPtr epics::pvData::FieldBuilder::addFixedArray ( std::string const &  name,
ScalarType  scalarType,
std::size_t  size 
)

Add fixed-size array of Scalar elements.

Parameters
namename of the array.
scalarTypetype of a scalar element.
sizeArray fixed size.
Returns
this instance of a FieldBuilder.

◆ addNestedStructure()

FieldBuilderPtr epics::pvData::FieldBuilder::addNestedStructure ( std::string const &  name)

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

Parameters
namenested structure name.
Returns
a new instance of a FieldBuilder is returned.
See also
endNested()

◆ addNestedStructureArray()

FieldBuilderPtr epics::pvData::FieldBuilder::addNestedStructureArray ( std::string const &  name)

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

Parameters
namenested structure name.
Returns
a new instance of a FieldBuilder is returned.
See also
endNested()

◆ addNestedUnion()

FieldBuilderPtr epics::pvData::FieldBuilder::addNestedUnion ( std::string const &  name)

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

Parameters
namenested union name.
Returns
a new instance of a FieldBuilder is returned.
See also
endNested()

◆ addNestedUnionArray()

FieldBuilderPtr epics::pvData::FieldBuilder::addNestedUnionArray ( std::string const &  name)

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

Parameters
namenested union name.
Returns
a new instance of a FieldBuilder is returned.
See also
endNested()

◆ begin()

static FieldBuilderPtr epics::pvData::FieldBuilder::begin ( )
static

Create a new instance of in-line Field builder.

Version
Added after 7.0.0

◆ createStructure()

StructureConstPtr epics::pvData::FieldBuilder::createStructure ( )

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

Returns
a new instance of a Structure.

◆ createUnion()

UnionConstPtr epics::pvData::FieldBuilder::createUnion ( )

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

Returns
a new instance of an Union.

◆ endNested()

FieldBuilderPtr epics::pvData::FieldBuilder::endNested ( )

Complete the creation of a nested object.

See also
addNestedStructure(std::string const & name)
addNestedUnion(std::string const & name)
Returns
a previous (parent) FieldBuilder.

◆ setId()

FieldBuilderPtr epics::pvData::FieldBuilder::setId ( std::string const &  id)

Set ID of an object to be created.

Parameters
idid to be set.
Returns
this instance of a FieldBuilder.

The documentation for this class was generated from the following file: