![]() |
This is Unofficial EPICS BASE Doxygen Site
|
#include "anyscalar.h"
Classes | |
struct | bad_cast |
Public Member Functions | |
AnyScalar () | |
template<typename T > | |
AnyScalar (T v) | |
Construct from provided value. More... | |
AnyScalar (ScalarType type, const void *buf) | |
AnyScalar (const AnyScalar &o) | |
~AnyScalar () | |
AnyScalar & | operator= (const AnyScalar &o) |
template<typename T > | |
AnyScalar & | operator= (T v) |
void | clear () |
void | swap (AnyScalar &o) |
ScalarType | type () const |
Type code of contained value. Or (ScalarType)-1 is empty. More... | |
void * | unsafe () |
const void * | unsafe () const |
bool | empty () const |
operator bool_type () const | |
const void * | bufferUnsafe () const |
template<typename T > | |
detail::any_storage_type< typename meta::strip_const< T >::type >::type & | ref () |
template<typename T > | |
meta::decorate_const< typename detail::any_storage_type< typename meta::strip_const< T >::type >::type >::type & | ref () const |
template<typename T > | |
T | as () const |
Friends | |
epicsShareFunc std::ostream & | operator<< (std::ostream &strm, const AnyScalar &v) |
A type-safe variant union capable of holding any of the PVD scalar types (POD or string)
Definition at line 51 of file anyscalar.h.
|
inline |
|
inlineexplicit |
Construct from provided value.
Definition at line 104 of file anyscalar.h.
epics::pvData::AnyScalar::AnyScalar | ( | ScalarType | type, |
const void * | buf | ||
) |
Construct from un-typed pointer. Caller is responsible to ensure that buf actually points to the provided type
Definition at line 11 of file anyscalar.cpp.
epics::pvData::AnyScalar::AnyScalar | ( | const AnyScalar & | o | ) |
Definition at line 23 of file anyscalar.cpp.
|
inline |
Definition at line 129 of file anyscalar.h.
|
inline |
copy out wrapped value, with a value conversion.
Definition at line 230 of file anyscalar.h.
const void * epics::pvData::AnyScalar::bufferUnsafe | ( | ) | const |
Provide read-only access to underlying buffer. For a string this is std::string::c_str().
Definition at line 137 of file anyscalar.cpp.
void epics::pvData::AnyScalar::clear | ( | ) |
Reset internal state.
Definition at line 49 of file anyscalar.cpp.
|
inline |
Definition at line 165 of file anyscalar.h.
|
inline |
Definition at line 173 of file anyscalar.h.
Definition at line 131 of file anyscalar.h.
|
inline |
Definition at line 137 of file anyscalar.h.
|
inline |
Return typed reference to wrapped value. Non-const reference allows value modification
bad_cast | when the requested type does not match the stored type |
Definition at line 194 of file anyscalar.h.
|
inline |
Return typed reference to wrapped value. Const reference does not allow modification.
bad_cast | when the requested type does not match the stored type |
Definition at line 215 of file anyscalar.h.
void epics::pvData::AnyScalar::swap | ( | AnyScalar & | o | ) |
Definition at line 58 of file anyscalar.cpp.
|
inline |
Type code of contained value. Or (ScalarType)-1 is empty.
Definition at line 158 of file anyscalar.h.
|
inline |
Definition at line 162 of file anyscalar.h.
|
inline |
Definition at line 163 of file anyscalar.h.
|
friend |
Definition at line 145 of file anyscalar.cpp.