This class implements introspection object for a union.
More...
#include <pv/pvIntrospect.h>
|
typedef std::tr1::shared_ptr
< Union > | shared_pointer |
|
typedef std::tr1::shared_ptr
< const Union > | const_shared_pointer |
|
typedef std::tr1::weak_ptr< Union > | weak_pointer |
|
typedef std::tr1::weak_ptr
< const Union > | const_weak_pointer |
|
typedef Union & | reference |
|
typedef const Union & | const_reference |
|
enum | { isField =1
} |
|
typedef std::tr1::shared_ptr
< Field > | shared_pointer |
|
typedef std::tr1::shared_ptr
< const Field > | const_shared_pointer |
|
typedef std::tr1::weak_ptr< Field > | weak_pointer |
|
typedef std::tr1::weak_ptr
< const Field > | const_weak_pointer |
|
|
class | FieldCreate |
|
class | Structure |
|
This class implements introspection object for a union.
Definition at line 858 of file pvIntrospect.h.
static const std::string& epics::pvData::Union::anyId |
( |
| ) |
|
|
static |
Get the default variant union ID.
- Returns
- The default variant union ID.
std::tr1::shared_ptr<PVUnion> epics::pvData::Union::build |
( |
| ) |
const |
Allocate a new instance
- Version
- Added after 7.0.0
static const std::string& epics::pvData::Union::defaultId |
( |
| ) |
|
|
static |
Get the default union ID.
- Returns
- The default union ID.
Puts the string representation to the stream.
- Parameters
-
- Returns
- The output stream.
Implements epics::pvData::Field.
Lookup Field by name
- Parameters
-
fieldName | Member field name. May not contain '.' |
- Returns
- NULL if no member by this name.
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.
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. |
- Returns
- Field pointer (never NULL)
- Exceptions
-
Definition at line 944 of file pvIntrospect.h.
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.
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.
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.
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.
Get the fields in the union.
- Returns
- The array of fields.
Definition at line 995 of file pvIntrospect.h.
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.
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.
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.
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.
virtual std::string epics::pvData::Union::getID |
( |
| ) |
const |
|
virtual |
Get the identification string.
- Returns
- The identification string, can be empty.
Implements epics::pvData::Field.
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.
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
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 field into given buffer.
- Parameters
-
buffer | serialization buffer. |
flusher | flush interface. |
Implements epics::pvData::Serializable.
The documentation for this class was generated from the following file: