pva2pva 1.4.2
Loading...
Searching...
No Matches
PVIFBuilder Struct Referenceabstract

#include <pvif.h>

Inheritance diagram for PVIFBuilder:

Public Member Functions

virtual epics::pvData::FieldConstPtr dtype ()=0
virtual epics::pvData::FieldBuilderPtr dtype (epics::pvData::FieldBuilderPtr &builder, const std::string &fld)
virtual PVIF * attach (const epics::pvData::PVStructurePtr &root, const FieldName &fld)=0

Static Public Member Functions

static PVIFBuilder * create (const std::string &mapname, dbChannel *chan)

Public Attributes

dbChannel *const channel

Protected Member Functions

 PVIFBuilder (dbChannel *chan)

Detailed Description

Factory for PVIF instances.

Caller first passes a mapping type (eg. "scalar") to PVIFBuilder::create() to obtain a PVIFBuilder which may then by used to create PVIF instances for specific dbChannel.

Caller than uses PVIFBuilder::dtype() to obtain (sub)Field descriptions. eg. more than one of these may be composed into an overall Structure description.

Caller than creates a PVStructure and uses PVIFBuilder::attach() to build mappings for each dbChannel in the composed locations.

Definition at line 403 of file pvif.h.

Constructor & Destructor Documentation

◆ ~PVIFBuilder()

virtual PVIFBuilder::~PVIFBuilder ( )
inlinevirtual

Definition at line 407 of file pvif.h.

407{}

◆ PVIFBuilder()

PVIFBuilder::PVIFBuilder ( dbChannel * chan)
inlineexplicitprotected

Definition at line 423 of file pvif.h.

423: channel(chan) {}

Member Function Documentation

◆ create()

PVIFBuilder * PVIFBuilder::create ( const std::string & mapname,
dbChannel * chan )
static

Definition at line 1313 of file pvif.cpp.

1314{
1315 if(type.empty() || type=="scalar")
1316 return new ScalarBuilder(chan);
1317 else if(type=="plain")
1318 return new PlainBuilder(chan);
1319 else if(type=="any")
1320 return new AnyScalarBuilder(chan);
1321 else if(type=="meta")
1322 return new MetaBuilder(chan);
1323 else if(type=="proc")
1324 return new ProcBuilder(chan);
1325 else if(type=="structure")
1326 return new IDBuilder(chan);
1327 else
1328 throw std::runtime_error(std::string("Unknown +type=")+type);
1329}

◆ dtype()

epics::pvData::FieldBuilderPtr PVIFBuilder::dtype ( epics::pvData::FieldBuilderPtr & builder,
const std::string & fld )
virtual

Definition at line 1300 of file pvif.cpp.

1302{
1303 if(fld.empty())
1304 throw std::runtime_error(SB()<<"Can't attach +type "<<typeid(*this).name()<<" to root");
1305
1306 epics::pvData::FieldConstPtr ftype(this->dtype());
1307 if(ftype)
1308 builder = builder->add(fld, ftype);
1309
1310 return builder;
1311}

Member Data Documentation

◆ channel

dbChannel* const PVIFBuilder::channel

Definition at line 405 of file pvif.h.


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