pvAccessCPP  7.1.2
Classes | Public Types | Public Member Functions | List of all members
pvas::StaticProvider Class Reference

A Provider based on a list of SharedPV instance. More...

#include <server/pva/server.h>

Classes

struct  ChannelBuilder
 Interface for something which can provide Channels. aka A "PV". Typically a SharedPV. More...
 

Public Types

typedef builders_t::const_iterator const_iterator
 

Public Member Functions

 POINTER_DEFINITIONS (StaticProvider)
 
 StaticProvider (const std::string &name)
 Build a new, empty, provider. More...
 
void close (bool destroy=false)
 Call Channelbuilder::close(destroy) for all currently added ChannelBuilders. More...
 
void add (const std::string &name, const std::tr1::shared_ptr< ChannelBuilder > &builder)
 Add a PV (eg. SharedPV) to this provider.
 
std::tr1::shared_ptr< ChannelBuilderremove (const std::string &name)
 Remove a PV. More...
 
std::tr1::shared_ptr< epics::pvAccess::ChannelProviderprovider () const
 Fetch the underlying ChannelProvider. Usually to build a ServerContext around.
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

A Provider based on a list of SharedPV instance.

SharedPV instances may be added/removed at any time. So it is only "static" in the sense that the list of PV names is known to StaticProvider at all times.

See also
Server API shared_ptr Ownership

Definition at line 105 of file server.h.

Constructor & Destructor Documentation

◆ StaticProvider()

pvas::StaticProvider::StaticProvider ( const std::string name)
explicit

Build a new, empty, provider.

Parameters
nameProvider Name. Only relevant if registerAsServer() is called, then must be unique in this process.

Member Function Documentation

◆ close()

void pvas::StaticProvider::close ( bool  destroy = false)

Call Channelbuilder::close(destroy) for all currently added ChannelBuilders.

See also
SharedPV::close()
Note
Provider locking rules apply (
See also
provider_roles_requester_locking).

◆ remove()

std::tr1::shared_ptr<ChannelBuilder> pvas::StaticProvider::remove ( const std::string name)

Remove a PV.

Closes any open Channels to it.

Returns
the PV which has been removed.
Note
Provider locking rules apply (
See also
provider_roles_requester_locking).

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