This class implements introspection object for a union.
More...
#include <pv/pvIntrospect.h>
|
| static const std::string & | defaultId () |
| |
| static const std::string & | anyId () |
| |
This class implements introspection object for a union.
Definition at line 858 of file pvIntrospect.h.
◆ const_reference
◆ const_shared_pointer
| std::tr1::shared_ptr<const Union> epics::pvData::Union::const_shared_pointer |
◆ const_weak_pointer
| std::tr1::weak_ptr<const Union> epics::pvData::Union::const_weak_pointer |
◆ reference
◆ shared_pointer
| std::tr1::shared_ptr<Union> epics::pvData::Union::shared_pointer |
◆ weak_pointer
| std::tr1::weak_ptr<Union> epics::pvData::Union::weak_pointer |
◆ anyId()
| static const std::string & epics::pvData::Union::anyId |
( |
| ) |
|
|
static |
Get the default variant union ID.
- Returns
- The default variant union ID.
◆ build()
| std::tr1::shared_ptr< PVUnion > epics::pvData::Union::build |
( |
| ) |
const |
Allocate a new instance
- Version
- Added after 7.0.0
◆ defaultId()
| static const std::string & epics::pvData::Union::defaultId |
( |
| ) |
|
|
static |
Get the default union ID.
- Returns
- The default union ID.
◆ deserialize()
◆ dump()
| virtual std::ostream & epics::pvData::Union::dump |
( |
std::ostream & | o | ) |
const |
|
virtual |
Puts the string representation to the stream.
- Parameters
-
- Returns
- The output stream.
Implements epics::pvData::Field.
◆ getField() [1/4]
| FieldConstPtr epics::pvData::Union::getField |
( |
std::size_t | index | ) |
const |
|
inline |
Lookup Field by index, within this Union.
- Parameters
-
| index | Index of member in this union.
std::size_t getNumberFields() const
|
- Returns
- Field pointer (never NULL)
- Exceptions
-
Definition at line 944 of file pvIntrospect.h.
◆ getField() [2/4]
template<typename FT >
| std::tr1::shared_ptr< const FT > epics::pvData::Union::getField |
( |
std::size_t | index | ) |
const |
|
inline |
Lookup Field by index, within this Union.
- Parameters
-
| index | Index of member in this union. |
- Returns
- NULL if member is not a sub-class of FT
- Exceptions
-
Definition at line 952 of file pvIntrospect.h.
◆ getField() [3/4]
| FieldConstPtr epics::pvData::Union::getField |
( |
std::string const & | fieldName | ) |
const |
Lookup Field by name
- Parameters
-
| fieldName | Member field name. May not contain '.' |
- Returns
- NULL if no member by this name.
◆ getField() [4/4]
template<typename FT >
| std::tr1::shared_ptr< const FT > epics::pvData::Union::getField |
( |
std::string const & | fieldName | ) |
const |
|
inline |
Lookup Field by name and cast to Field sub-class.
- Parameters
-
| fieldName | Member field name. May not contain '.' |
- Returns
- NULL If no member by this name, or member exists, but has type other than FT.
Definition at line 906 of file pvIntrospect.h.
◆ getFieldIndex()
| std::size_t epics::pvData::Union::getFieldIndex |
( |
std::string const & | fieldName | ) |
const |
Get the field index for the specified fieldName.
- Returns
- The introspection interface. This will be -1 if the field is not in the union.
◆ getFieldName()
| std::string epics::pvData::Union::getFieldName |
( |
std::size_t | fieldIndex | ) |
const |
|
inline |
Get the name of the field with the specified index;
- Parameters
-
| fieldIndex | The index of the desired field. |
- Returns
- The fieldName.
Definition at line 1006 of file pvIntrospect.h.
◆ getFieldNames()
| StringArray const & epics::pvData::Union::getFieldNames |
( |
| ) |
const |
|
inline |
Get the names of the fields in the union.
- Returns
- The array of fieldNames.
Definition at line 1000 of file pvIntrospect.h.
◆ getFields()
Get the fields in the union.
- Returns
- The array of fields.
Definition at line 995 of file pvIntrospect.h.
◆ getFieldT() [1/4]
| FieldConstPtr epics::pvData::Union::getFieldT |
( |
std::size_t | index | ) |
const |
|
inline |
Lookup Field by index, within this Union.
- Parameters
-
| index | Index of member in this union. |
- Returns
- Field pointer (never NULL)
- Exceptions
-
Definition at line 963 of file pvIntrospect.h.
◆ getFieldT() [2/4]
template<typename FT >
| std::tr1::shared_ptr< const FT > epics::pvData::Union::getFieldT |
( |
std::size_t | index | ) |
const |
|
inline |
Lookup Field by index, within this Structure.
- Parameters
-
| index | Index of member in this structure. |
- Returns
- Field pointer (never NULL)
- Exceptions
-
Definition at line 972 of file pvIntrospect.h.
◆ getFieldT() [3/4]
| FieldConstPtr epics::pvData::Union::getFieldT |
( |
std::string const & | fieldName | ) |
const |
|
inline |
Lookup Field by name
- Parameters
-
| fieldName | Member field name. May not contain '.' |
- Returns
- Field pointer (never NULL)
- Exceptions
-
Definition at line 918 of file pvIntrospect.h.
◆ getFieldT() [4/4]
template<typename FT >
| std::tr1::shared_ptr< const FT > epics::pvData::Union::getFieldT |
( |
std::string const & | fieldName | ) |
const |
|
inline |
Lookup Field by name and cast to Field sub-class.
- Parameters
-
| fieldName | Member field name. May not contain '.' |
- Returns
- Field pointer (never NULL)
- Exceptions
-
| std::runtime_error | If no member by this name, or member exists, but has type other than FT. |
Definition at line 926 of file pvIntrospect.h.
◆ getID()
| virtual std::string epics::pvData::Union::getID |
( |
| ) |
const |
|
virtual |
Get the identification string.
- Returns
- The identification string, can be empty.
Implements epics::pvData::Field.
◆ getNumberFields()
| std::size_t epics::pvData::Union::getNumberFields |
( |
| ) |
const |
|
inline |
Get the number of immediate subfields in the union.
- Returns
- The number of fields.
Definition at line 892 of file pvIntrospect.h.
◆ guess()
Attempt to find an suitable member to stored the specified type.
Returned index is guerenteed to by of specified Type (either scalar or scalarArray). Provided ScalarType is taken as a hint.
- Parameters
-
| t | Must be either scalar or scalarArray |
| s | The preferred ScalarType |
- Returns
- A valid index or -1
◆ isVariant()
| bool epics::pvData::Union::isVariant |
( |
| ) |
const |
|
inline |
Check if this union is variant union (aka any type).
- Returns
true if this union is variant union, otherwise false.
Definition at line 1011 of file pvIntrospect.h.
◆ serialize()
Serialize field into given buffer.
- Parameters
-
| buffer | serialization buffer. |
| flusher | flush interface. |
Implements epics::pvData::Serializable.
◆ FieldCreate
◆ Structure
◆ ANY_ID
| const std::string epics::pvData::Union::ANY_ID |
|
static |
◆ DEFAULT_ID
| const std::string epics::pvData::Union::DEFAULT_ID |
|
static |
The documentation for this class was generated from the following file: