pvAccessCPP 7.1.9
Loading...
Searching...
No Matches
epics::pvAccess::ChannelProviderRegistry Class Reference

Interface for locating channel providers. More...

#include <client/pv/pvAccess.h>

Public Types

typedef std::tr1::shared_ptr< ChannelProviderRegistry > shared_pointer
typedef std::tr1::shared_ptr< const ChannelProviderRegistry > const_shared_pointer
typedef std::tr1::weak_ptr< ChannelProviderRegistry > weak_pointer
typedef std::tr1::weak_ptr< const ChannelProviderRegistry > const_weak_pointer
typedef std::vector< std::string > stringVector_t
typedef std::set< std::string > provider_name_set
typedef ChannelProvider::shared_pointer(* factoryfn_t) (const std::tr1::shared_ptr< Configuration > &)

Public Member Functions

ChannelProvider::shared_pointer getProvider (std::string const &providerName)
 Get a shared instance of the provider with the specified name.
ChannelProvider::shared_pointer createProvider (std::string const &providerName, const std::tr1::shared_ptr< Configuration > &conf=std::tr1::shared_ptr< Configuration >())
 Creates a new instanceof the provider with the specified name.
virtual ChannelProviderFactory::shared_pointer getFactory (std::string const &providerName)
 Fetch provider factor with the specified name.
virtual void getProviderNames (provider_name_set &names)
 Find currently registered provider names.
virtual bool add (const ChannelProviderFactory::shared_pointer &fact, bool replace=true)
template<class Provider>
ChannelProviderFactory::shared_pointer add (const std::string &name, bool replace=true)
 Add a new Provider which will be built using SimpleChannelProviderFactory<Provider>.
ChannelProviderFactory::shared_pointer add (const std::string &name, factoryfn_t, bool replace=true)
template<class Provider>
ChannelProviderFactory::shared_pointer addSingleton (const std::string &name, const std::tr1::shared_ptr< const Configuration > &conf=std::tr1::shared_ptr< const Configuration >(), bool replace=true)
 Add a new Provider which will be built using SingletonChannelProviderFactory<Provider>.
ChannelProviderFactory::shared_pointer addSingleton (const ChannelProvider::shared_pointer &provider, bool replace=true)
ChannelProviderFactory::shared_pointer remove (const std::string &name)
 Attempt to remove a factory with the given name. Return Factory which was removed, or NULL if not found.
virtual bool remove (const ChannelProviderFactory::shared_pointer &factory)
 Attempt to remove a factory. Return true if Factory was previously registered, and now removed.
virtual void clear ()
 Drop all factories.

Static Public Member Functions

static ChannelProviderRegistry::shared_pointer build ()
 Create a custom registry.
static ChannelProviderRegistry::shared_pointer clients ()
static ChannelProviderRegistry::shared_pointer servers ()

Friends

struct CompatRegistry

Detailed Description

Interface for locating channel providers.

Definition at line 1433 of file pvAccess.h.

Member Typedef Documentation

◆ const_shared_pointer

typedef std::tr1::shared_ptr<const ChannelProviderRegistry> epics::pvAccess::ChannelProviderRegistry::const_shared_pointer

Definition at line 1435 of file pvAccess.h.

◆ const_weak_pointer

typedef std::tr1::weak_ptr<const ChannelProviderRegistry> epics::pvAccess::ChannelProviderRegistry::const_weak_pointer

Definition at line 1435 of file pvAccess.h.

◆ factoryfn_t

typedef ChannelProvider::shared_pointer(* epics::pvAccess::ChannelProviderRegistry::factoryfn_t) (const std::tr1::shared_ptr< Configuration > &)

Definition at line 1496 of file pvAccess.h.

◆ provider_name_set

typedef std::set<std::string> epics::pvAccess::ChannelProviderRegistry::provider_name_set

Definition at line 1477 of file pvAccess.h.

◆ shared_pointer

typedef std::tr1::shared_ptr<ChannelProviderRegistry> epics::pvAccess::ChannelProviderRegistry::shared_pointer

Definition at line 1435 of file pvAccess.h.

◆ stringVector_t

typedef std::vector<std::string> epics::pvAccess::ChannelProviderRegistry::stringVector_t

Definition at line 1437 of file pvAccess.h.

◆ weak_pointer

typedef std::tr1::weak_ptr<ChannelProviderRegistry> epics::pvAccess::ChannelProviderRegistry::weak_pointer

Definition at line 1435 of file pvAccess.h.

Constructor & Destructor Documentation

◆ ~ChannelProviderRegistry()

virtual epics::pvAccess::ChannelProviderRegistry::~ChannelProviderRegistry ( )
inlinevirtual

Definition at line 1439 of file pvAccess.h.

Member Function Documentation

◆ add() [1/2]

virtual bool epics::pvAccess::ChannelProviderRegistry::add ( const ChannelProviderFactory::shared_pointer & fact,
bool replace = true )
virtual

Add new factory. if replace=false and name already in use, return false with no change in other cases insert provided factory and return true.

◆ add() [2/2]

template<class Provider>
ChannelProviderFactory::shared_pointer epics::pvAccess::ChannelProviderRegistry::add ( const std::string & name,
bool replace = true )
inline

Add a new Provider which will be built using SimpleChannelProviderFactory<Provider>.

Definition at line 1489 of file pvAccess.h.

◆ addSingleton() [1/2]

ChannelProviderFactory::shared_pointer epics::pvAccess::ChannelProviderRegistry::addSingleton ( const ChannelProvider::shared_pointer & provider,
bool replace = true )

Add a pre-created Provider instance. Only a weak ref to this instance is kept, so the instance must be kept active through some external means

Since
6.1.0

◆ addSingleton() [2/2]

template<class Provider>
ChannelProviderFactory::shared_pointer epics::pvAccess::ChannelProviderRegistry::addSingleton ( const std::string & name,
const std::tr1::shared_ptr< const Configuration > & conf = std::tr1::shared_ptr<const Configuration>(),
bool replace = true )
inline

Add a new Provider which will be built using SingletonChannelProviderFactory<Provider>.

Definition at line 1502 of file pvAccess.h.

◆ clients()

ChannelProviderRegistry::shared_pointer epics::pvAccess::ChannelProviderRegistry::clients ( )
static

The global registry for "clients". Register providers which will be used within this process. Typically providers which access data outside of the process. Associated with EPICS_PVA_PROVIDER_NAMES

◆ createProvider()

ChannelProvider::shared_pointer epics::pvAccess::ChannelProviderRegistry::createProvider ( std::string const & providerName,
const std::tr1::shared_ptr< Configuration > & conf = std::tr1::shared_ptr< Configuration >() )

Creates a new instanceof the provider with the specified name.

Parameters
providerNameThe name of the provider.
Returns
The interface for the provider or null if the provider is not known.

◆ getFactory()

virtual ChannelProviderFactory::shared_pointer epics::pvAccess::ChannelProviderRegistry::getFactory ( std::string const & providerName)
virtual

Fetch provider factor with the specified name.

Parameters
providerNameThe name of the provider.
Returns
The factor or null if the provider is not known.

◆ getProvider()

ChannelProvider::shared_pointer epics::pvAccess::ChannelProviderRegistry::getProvider ( std::string const & providerName)

Get a shared instance of the provider with the specified name.

Parameters
providerNameThe name of the provider.
Returns
The interface for the provider or null if the provider is not known.

◆ servers()

ChannelProviderRegistry::shared_pointer epics::pvAccess::ChannelProviderRegistry::servers ( )
static

The global registry for "servers". Register providers which will be used outside of this process (via ServerContext). Typically providers which access data within the process. Associated with EPICS_PVAS_PROVIDER_NAMES

◆ CompatRegistry

friend struct CompatRegistry
friend

Definition at line 1531 of file pvAccess.h.


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