Template Class PVScalarValue

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class PVScalarValue : public epics::pvData::PVScalar

Class that holds the data for each possible scalar type.

Public Types

typedef T value_type
typedef T *pointer
typedef const T *const_pointer

Public Functions

POINTER_DEFINITIONS(PVScalarValue)
virtual ~PVScalarValue()

Destructor

inline storage_t::arg_type get() const

Get the value.

Returns

The value.

inline void put(typename storage_t::arg_type v)

Put a new value into the PVScalar.

Parameters

value – The value.

virtual std::ostream & dumpValue (std::ostream &o) const OVERRIDE

Puts the PVField raw value to the stream.

Parameters

o – output stream.

Returns

The output stream.

virtual void operator>>=(T &value) const
virtual void operator<<=(typename storage_t::arg_type value)
template<typename T1>
inline T1 getAs() const
template<typename T1>
inline void putFrom(typename detail::ScalarStorageOps<T1>::arg_type val)
inline void putFrom(const AnyScalar &v)
virtual void assign (const PVScalar &scalar) OVERRIDE FINAL
virtual void copy (const PVScalar &from) OVERRIDE FINAL
virtual void copyUnchecked (const PVScalar &from) OVERRIDE FINAL
virtual void serialize (ByteBuffer *pbuffer, SerializableControl *pflusher) const OVERRIDE

Serialize field into given buffer.

Parameters
  • buffer – serialization buffer.

  • flusher – flush interface.

virtual void deserialize (ByteBuffer *pbuffer, DeserializableControl *pflusher) OVERRIDE FINAL

Deserialize buffer.

Parameters
  • buffer – serialization buffer.

  • flusher – deserialization control.

inline virtual void getAs (AnyScalar &v) const OVERRIDE FINAL
inline virtual void putFrom (const void *src, ScalarType stype) OVERRIDE FINAL

Convert and assign.

template<> const ScalarType typeCode
template<>
virtual void serialize(ByteBuffer *pbuffer, SerializableControl *pflusher) const

Serialize field into given buffer.

Parameters
  • buffer – serialization buffer.

  • flusher – flush interface.

template<>
virtual void deserialize(ByteBuffer *pbuffer, DeserializableControl *pflusher)

Deserialize buffer.

Parameters
  • buffer – serialization buffer.

  • flusher – deserialization control.

template<>
inline virtual std::ostream &dumpValue(std::ostream &o) const

Some explicit specializations exist.

template<>
inline virtual std::ostream &dumpValue(std::ostream &o) const

Puts the PVField raw value to the stream.

Parameters

o – output stream.

Returns

The output stream.

template<>
inline virtual std::ostream &dumpValue(std::ostream &o) const

Puts the PVField raw value to the stream.

Parameters

o – output stream.

Returns

The output stream.

Public Static Attributes

static const ScalarType typeCode = pvBoolean

Protected Functions

inline explicit PVScalarValue(ScalarConstPtr const &scalar)
inline virtual void getAs (void *result, ScalarType rtype) const OVERRIDE FINAL

Protected Attributes

storage_t storage

Friends

friend class PVDataCreate