This is Unofficial EPICS BASE Doxygen Site
BaseChannelProviderFactory< CP > Struct Template Reference

#include "pvahelper.h"

+ Inheritance diagram for BaseChannelProviderFactory< CP >:
+ Collaboration diagram for BaseChannelProviderFactory< CP >:

Public Types

typedef CP provider_type
 

Public Member Functions

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

Public Attributes

std::string name
 
epicsMutex lock
 
std::tr1::weak_ptr< CP > last_shared
 

Detailed Description

template<class CP>
struct BaseChannelProviderFactory< CP >

Definition at line 351 of file pvahelper.h.

Member Typedef Documentation

template<class CP >
typedef CP BaseChannelProviderFactory< CP >::provider_type

Definition at line 353 of file pvahelper.h.

Constructor & Destructor Documentation

template<class CP >
BaseChannelProviderFactory< CP >::BaseChannelProviderFactory ( const char *  name)
inline

Definition at line 358 of file pvahelper.h.

358 :name(name) {}
template<class CP >
virtual BaseChannelProviderFactory< CP >::~BaseChannelProviderFactory ( )
inlinevirtual

Definition at line 359 of file pvahelper.h.

359 {}

Member Function Documentation

template<class CP >
virtual std::string BaseChannelProviderFactory< CP >::getFactoryName ( )
inlinevirtual

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

Returns
the factory name.

Implements epics::pvAccess::ChannelProviderFactory.

Definition at line 361 of file pvahelper.h.

361 { return name; }
template<class CP >
virtual epics::pvAccess::ChannelProvider::shared_pointer BaseChannelProviderFactory< CP >::newInstance ( const std::tr1::shared_ptr< epics::pvAccess::Configuration > &  )
inlinevirtual

Create a new instance using a specific Configuration.

Returns
a new instance.

Reimplemented from epics::pvAccess::ChannelProviderFactory.

Definition at line 374 of file pvahelper.h.

375  {
376  std::tr1::shared_ptr<CP> ret(new CP());
377  return ret;
378  }
template<class CP >
virtual epics::pvAccess::ChannelProvider::shared_pointer BaseChannelProviderFactory< CP >::sharedInstance ( )
inlinevirtual

Get a shared instance using the default Configuration.

Returns
a shared instance.

Implements epics::pvAccess::ChannelProviderFactory.

Definition at line 363 of file pvahelper.h.

364  {
366  std::tr1::shared_ptr<CP> ret(last_shared.lock());
367  if(!ret) {
368  ret.reset(new CP());
369  last_shared = ret;
370  }
371  return ret;
372  }
std::tr1::weak_ptr< CP > last_shared
Definition: pvahelper.h:356

Member Data Documentation

template<class CP >
std::tr1::weak_ptr<CP> BaseChannelProviderFactory< CP >::last_shared

Definition at line 356 of file pvahelper.h.

template<class CP >
epicsMutex BaseChannelProviderFactory< CP >::lock

Definition at line 355 of file pvahelper.h.

template<class CP >
std::string BaseChannelProviderFactory< CP >::name

Definition at line 354 of file pvahelper.h.


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