This is Unofficial EPICS BASE Doxygen Site
epics::pvAccess::SimpleChannelProviderFactory< Provider > Struct Template Reference

#include "pvAccess.h"

+ Inheritance diagram for epics::pvAccess::SimpleChannelProviderFactory< Provider >:
+ Collaboration diagram for epics::pvAccess::SimpleChannelProviderFactory< Provider >:

Public Member Functions

 SimpleChannelProviderFactory (const std::string &name)
 
virtual ~SimpleChannelProviderFactory ()
 
virtual std::string getFactoryName () OVERRIDE FINAL
 
virtual ChannelProvider::shared_pointer sharedInstance () OVERRIDE FINAL
 
virtual ChannelProvider::shared_pointer newInstance (const std::tr1::shared_ptr< Configuration > &conf) OVERRIDE FINAL
 
- Public Member Functions inherited from epics::pvAccess::ChannelProviderFactory
 POINTER_DEFINITIONS (ChannelProviderFactory)
 
 ChannelProviderFactory ()
 
virtual ~ChannelProviderFactory ()
 
virtual ChannelProvider::shared_pointer newInstance ()
 

Detailed Description

template<class Provider>
struct epics::pvAccess::SimpleChannelProviderFactory< Provider >

Simple ChannelProviderFactory which requires the existance of a ctor Provider(const std::tr1::shared_ptr<Configuration>& conf) which is called with a Configuration instance or NULL (use some defaults)

Definition at line 1362 of file pvAccess.h.

Constructor & Destructor Documentation

template<class Provider >
epics::pvAccess::SimpleChannelProviderFactory< Provider >::SimpleChannelProviderFactory ( const std::string &  name)
inline

Definition at line 1364 of file pvAccess.h.

1364 :pname(name) {}
const std::string pname
template<class Provider >
virtual epics::pvAccess::SimpleChannelProviderFactory< Provider >::~SimpleChannelProviderFactory ( )
inlinevirtual

Definition at line 1365 of file pvAccess.h.

1365 {}

Member Function Documentation

template<class Provider >
virtual std::string epics::pvAccess::SimpleChannelProviderFactory< Provider >::getFactoryName ( )
inlinevirtual

Get factory name (i.e. name of the provider).

Returns
the factory name.

Implements epics::pvAccess::ChannelProviderFactory.

Definition at line 1367 of file pvAccess.h.

1367 { return pname; }
const std::string pname
template<class Provider >
virtual ChannelProvider::shared_pointer epics::pvAccess::SimpleChannelProviderFactory< Provider >::newInstance ( const std::tr1::shared_ptr< Configuration > &  )
inlinevirtual

Create a new instance using a specific Configuration.

Returns
a new instance.

Reimplemented from epics::pvAccess::ChannelProviderFactory.

Definition at line 1380 of file pvAccess.h.

1381  {
1382  std::tr1::shared_ptr<Provider> ret(new Provider(conf));
1383  return ret;
1384  }
template<class Provider >
virtual ChannelProvider::shared_pointer epics::pvAccess::SimpleChannelProviderFactory< Provider >::sharedInstance ( )
inlinevirtual

Get a shared instance using the default Configuration.

Returns
a shared instance.

Implements epics::pvAccess::ChannelProviderFactory.

Definition at line 1369 of file pvAccess.h.

1370  {
1372  ChannelProvider::shared_pointer ret(shared.lock());
1373  if(!ret) {
1374  std::tr1::shared_ptr<Provider> inst(new Provider(std::tr1::shared_ptr<Configuration>()));
1375  shared = ret = inst;
1376  }
1377  return ret;
1378  }
A lock for multithreading.
Definition: lock.h:36
epics::pvData::Mutex sharedM
ChannelProvider::weak_pointer shared

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