pvAccessCPP  7.1.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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 std::tr1::shared_ptr
< StaticProvider
shared_pointer
 
typedef std::tr1::shared_ptr
< const StaticProvider
const_shared_pointer
 
typedef std::tr1::weak_ptr
< StaticProvider
weak_pointer
 
typedef std::tr1::weak_ptr
< const StaticProvider
const_weak_pointer
 
typedef builders_t::const_iterator const_iterator
 

Public Member Functions

 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
< ChannelBuilder
remove (const std::string &name)
 Remove a PV. More...
 
std::tr1::shared_ptr
< epics::pvAccess::ChannelProvider
provider () 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

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

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).
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: