PVData C++  8.0.4
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
epics::pvData::PVScalar Class Referenceabstract

PVScalar is the base class for each scalar field. More...

#include <pv/pvData.h>

Inheritance diagram for epics::pvData::PVScalar:
Inheritance graph
Collaboration diagram for epics::pvData::PVScalar:
Collaboration graph

Public Types

typedef std::tr1::shared_ptr< PVScalarshared_pointer
typedef std::tr1::shared_ptr< const PVScalarconst_shared_pointer
typedef std::tr1::weak_ptr< PVScalarweak_pointer
typedef std::tr1::weak_ptr< const PVScalarconst_weak_pointer
typedef PVScalarreference
typedef const PVScalarconst_reference
- Public Types inherited from epics::pvData::PVField
enum  { isPVField =1 }
typedef std::tr1::shared_ptr< PVFieldshared_pointer
typedef std::tr1::shared_ptr< const PVFieldconst_shared_pointer
typedef std::tr1::weak_ptr< PVFieldweak_pointer
typedef std::tr1::weak_ptr< const PVFieldconst_weak_pointer

Public Member Functions

virtual ~PVScalar ()
const ScalarConstPtr getScalar () const
template<typename T >
getAs () const
virtual void getAs (AnyScalar &v) const =0
template<typename T >
void putFrom (T val)
virtual void putFrom (const void *, ScalarType)=0
 Convert and assign.
void putFrom (const AnyScalar &v)
virtual void assign (const PVScalar &)=0
virtual void copy (const PVScalar &from)=0
virtual void copyUnchecked (const PVScalar &from)=0
- Public Member Functions inherited from epics::pvData::PVField
virtual ~PVField ()
const std::stringgetFieldName () const
std::string getFullName () const
std::size_t getFieldOffset () const
std::size_t getNextFieldOffset () const
std::size_t getNumberFields () const
bool isImmutable () const
virtual void setImmutable ()
const FieldConstPtrgetField () const
PVStructuregetParent ()
const PVStructuregetParent () const
void postPut ()
void setPostHandler (PostHandlerPtr const &postHandler)
virtual bool equals (PVField &pv)
virtual std::ostreamdumpValue (std::ostream &o) const =0
void copy (const PVField &from)
void copyUnchecked (const PVField &from)
- Public Member Functions inherited from epics::pvData::Serializable
virtual ~Serializable ()
virtual void serialize (ByteBuffer *buffer, SerializableControl *flusher) const =0
virtual void deserialize (ByteBuffer *buffer, DeserializableControl *flusher)=0

Protected Member Functions

virtual void getAs (void *, ScalarType) const =0
 PVScalar (ScalarConstPtr const &scalar)
- Protected Member Functions inherited from epics::pvData::PVField
PVField::shared_pointer getPtrSelf ()
 PVField (FieldConstPtr field)
void setParentAndName (PVStructure *parent, std::string const &fieldName)


template<typename E >
class PVScalarValue

Additional Inherited Members

- Static Public Attributes inherited from epics::pvData::PVField
static size_t num_instances

Detailed Description

PVScalar is the base class for each scalar field.

Definition at line 272 of file pvData.h.

Constructor & Destructor Documentation

◆ ~PVScalar()

virtual epics::pvData::PVScalar::~PVScalar ( )


Member Function Documentation

◆ getAs()

template<typename T >
T epics::pvData::PVScalar::getAs ( ) const

Convert and return the scalar value in the requested type. Result type is determined from the function template argument which must be one of the ScalarType enums. Uses castUnsafe<TO>() for value conversion.

PVScalar* pv = ...;
uint32 val = pv->getAs<pvInt>();

Definition at line 302 of file pvData.h.

◆ getScalar()

const ScalarConstPtr epics::pvData::PVScalar::getScalar ( ) const

Get the Scalar introspection interface for the PVScalar.

the interface.

◆ putFrom()

template<typename T >
void epics::pvData::PVScalar::putFrom ( val)

Convert and assign the provided value. The value type is determined from the function template argument which must be one of the ScalarType enums. Uses castUnsafe<TO>() for value conversion.

PVScalar* pv = ...;

Definition at line 324 of file pvData.h.

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