PVData C++  8.0.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Friends | List of all members
epics::pvData::ValueBuilder Class Reference

#include <pv/valueBuilder.h>

Public Member Functions

 ValueBuilder (const std::string &id=std::string())
 empty structure
 
 ValueBuilder (const PVStructure &)
 Clone existing definition and value.
 
template<ScalarType ENUM>
ValueBuilderadd (const std::string &name, typename meta::arg_type< typename ScalarTypeTraits< ENUM >::type >::type V)
 Add a scalar field with a given name and initial value.
 
template<class T >
ValueBuilderadd (const std::string &name, const shared_vector< const T > &V)
 Add a scalar array field.
 
ValueBuilderadd (const std::string &name, const PVStructure &V)
 
ValueBuilderaddNested (const std::string &name, Type type=structure, const std::string &id=std::string())
 Start a sub-structure.
 
ValueBuilderendNested ()
 End a sub-structure.
 
std::tr1::shared_ptr< PVStructurebuildPVStructure () const
 

Friends

struct child
 
struct child_struct
 
struct child_scalar_base
 
template<typename T >
struct child_scalar
 
struct child_scalar_array
 

Detailed Description

Incrementally define and initialize a PVStructure

Equivalent to FieldBuilder with the added ability to assign initial values.

.add<pvInt>("intfld", 42)
.addNested("sub")
.add<pvString>("strfld", "testing")

Definition at line 31 of file valueBuilder.h.

Member Function Documentation

PVStructure::shared_pointer epics::pvData::ValueBuilder::buildPVStructure ( ) const

Complete building structure

Note
ValueBuilder may be re-used after calling buildPVStructure()

Definition at line 274 of file valueBuilder.cpp.


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