pvAccessCPP  7.1.2
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
epics::pvAccess::ChannelProviderRegistry Class Reference

Interface for locating channel providers. More...

#include <client/pv/pvAccess.h>

Public Types

typedef std::vector< std::stringstringVector_t
 
typedef std::set< std::stringprovider_name_set
 
typedef ChannelProvider::shared_pointer(* factoryfn_t) (const std::tr1::shared_ptr< Configuration > &)
 

Public Member Functions

 POINTER_DEFINITIONS (ChannelProviderRegistry)
 
ChannelProvider::shared_pointer getProvider (std::string const &providerName)
 Get a shared instance of the provider with the specified name. More...
 
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. More...
 
virtual ChannelProviderFactory::shared_pointer getFactory (std::string const &providerName)
 Fetch provider factor with the specified name. More...
 
virtual void getProviderNames (provider_name_set &names)
 Find currently registered provider names.
 
virtual bool add (const ChannelProviderFactory::shared_pointer &fact, bool replace=true)
 Add new factory. More...
 
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)
 Add a pre-created Provider instance. More...
 
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 ()
 The global registry for "clients". More...
 
static ChannelProviderRegistry::shared_pointer servers ()
 The global registry for "servers". More...
 

Friends

struct CompatRegistry
 

Detailed Description

Interface for locating channel providers.

Definition at line 1433 of file pvAccess.h.

Member Function Documentation

◆ add()

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.

◆ addSingleton()

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

◆ clients()

static 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()

static 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


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