pva2pva 1.4.2
Loading...
Searching...
No Matches
ScalarAccessor< T > Struct Template Reference

Public Types

typedef T value_type

Public Member Functions

 ScalarAccessor (const epics::pvData::PVStructurePtr &s, const char *name)
 operator value_type ()
ScalarAccessor & operator= (T v)
ScalarAccessor & operator+= (T v)

Public Attributes

epics::pvData::PVScalar::shared_pointer field

Detailed Description

template<typename T>
struct ScalarAccessor< T >

Definition at line 38 of file utilities.h.

Member Typedef Documentation

◆ value_type

template<typename T>
typedef T ScalarAccessor< T >::value_type

Definition at line 40 of file utilities.h.

Constructor & Destructor Documentation

◆ ScalarAccessor()

template<typename T>
ScalarAccessor< T >::ScalarAccessor ( const epics::pvData::PVStructurePtr & s,
const char * name )
inline

Definition at line 41 of file utilities.h.

42 :field(s->getSubFieldT<epics::pvData::PVScalar>(name))
43 {}

Member Function Documentation

◆ operator value_type()

template<typename T>
ScalarAccessor< T >::operator value_type ( )
inline

Definition at line 44 of file utilities.h.

44 {
45 return field->getAs<T>();
46 }

◆ operator+=()

template<typename T>
ScalarAccessor & ScalarAccessor< T >::operator+= ( T v)
inline

Definition at line 51 of file utilities.h.

51 {
52 field->putFrom<T>(field->getAs<T>()+v);
53 return *this;
54 }

◆ operator=()

template<typename T>
ScalarAccessor & ScalarAccessor< T >::operator= ( T v)
inline

Definition at line 47 of file utilities.h.

47 {
48 field->putFrom<T>(v);
49 return *this;
50 }

Member Data Documentation

◆ field

template<typename T>
epics::pvData::PVScalar::shared_pointer ScalarAccessor< T >::field

Definition at line 39 of file utilities.h.


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