|
PVData C++ 8.0.9
|
This class implements introspection object for a union. More...
#include <pv/pvIntrospect.h>


Public Types | |
| 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 |
| Public Types inherited from epics::pvData::Field | |
| 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 |
Public Member Functions | |
| std::size_t | getNumberFields () const |
| FieldConstPtr | getField (std::string const &fieldName) const |
| template<typename FT> | |
| std::tr1::shared_ptr< const FT > | getField (std::string const &fieldName) const |
| FieldConstPtr | getFieldT (std::string const &fieldName) const |
| template<typename FT> | |
| std::tr1::shared_ptr< const FT > | getFieldT (std::string const &fieldName) const |
| FieldConstPtr | getField (std::size_t index) const |
| template<typename FT> | |
| std::tr1::shared_ptr< const FT > | getField (std::size_t index) const |
| FieldConstPtr | getFieldT (std::size_t index) const |
| template<typename FT> | |
| std::tr1::shared_ptr< const FT > | getFieldT (std::size_t index) const |
| std::size_t | getFieldIndex (std::string const &fieldName) const |
| FieldConstPtrArray const & | getFields () const |
| StringArray const & | getFieldNames () const |
| std::string | getFieldName (std::size_t fieldIndex) const |
| bool | isVariant () const |
| int32 | guess (Type t, ScalarType s) const |
| virtual std::string | getID () const |
| virtual std::ostream & | dump (std::ostream &o) const |
| virtual void | serialize (ByteBuffer *buffer, SerializableControl *control) const |
| virtual void | deserialize (ByteBuffer *buffer, DeserializableControl *control) |
| std::tr1::shared_ptr< PVUnion > | build () const |
| Public Member Functions inherited from epics::pvData::Field | |
| Type | getType () const |
| std::tr1::shared_ptr< PVField > | build () const |
| Public Member Functions inherited from epics::pvData::Serializable | |
| virtual | ~Serializable () |
Static Public Member Functions | |
| static const std::string & | defaultId () |
| static const std::string & | anyId () |
Static Public Attributes | |
| static const std::string | DEFAULT_ID |
| static const std::string | ANY_ID |
| Static Public Attributes inherited from epics::pvData::Field | |
| static size_t | num_instances |
Protected Member Functions | |
| Union (StringArray const &fieldNames, FieldConstPtrArray const &fields, std::string const &id=defaultId()) | |
| Protected Member Functions inherited from epics::pvData::Field | |
| Field (Type type) | |
| void | cacheCleanup () |
Friends | |
| class | FieldCreate |
| class | Structure |
This class implements introspection object for a union.
Definition at line 858 of file pvIntrospect.h.
| typedef const Union& epics::pvData::Union::const_reference |
Definition at line 886 of file pvIntrospect.h.
| typedef std::tr1::shared_ptr<const Union> epics::pvData::Union::const_shared_pointer |
Definition at line 860 of file pvIntrospect.h.
| typedef std::tr1::weak_ptr<const Union> epics::pvData::Union::const_weak_pointer |
Definition at line 860 of file pvIntrospect.h.
| typedef Union& epics::pvData::Union::reference |
Definition at line 885 of file pvIntrospect.h.
| typedef std::tr1::shared_ptr<Union> epics::pvData::Union::shared_pointer |
Definition at line 860 of file pvIntrospect.h.
| typedef std::tr1::weak_ptr<Union> epics::pvData::Union::weak_pointer |
Definition at line 860 of file pvIntrospect.h.
|
static |
Get the default variant union ID.
| std::tr1::shared_ptr< PVUnion > epics::pvData::Union::build | ( | ) | const |
Allocate a new instance
|
static |
Get the default union ID.
|
virtual |
Deserialize buffer.
| buffer | serialization buffer. |
| flusher | deserialization control. |
Implements epics::pvData::Serializable.
|
virtual |
Puts the string representation to the stream.
| o | output stream. |
Implements epics::pvData::Field.
|
inline |
Lookup Field by index, within this Union.
| index | Index of member in this union. index>=0 && index<getNumberFields()
std::size_t getNumberFields() const Definition pvIntrospect.h:892 |
| std::out_of_range | If index >= getNumberFields() |
Definition at line 952 of file pvIntrospect.h.
|
inline |
Lookup Field by index, within this Union.
| index | Index of member in this union. index>=0 && index<getNumberFields()
|
| std::out_of_range | If index >= getNumberFields() |
Definition at line 944 of file pvIntrospect.h.
|
inline |
Lookup Field by name and cast to Field sub-class.
| fieldName | Member field name. May not contain '.' |
Definition at line 906 of file pvIntrospect.h.
| FieldConstPtr epics::pvData::Union::getField | ( | std::string const & | fieldName | ) | const |
Lookup Field by name
| fieldName | Member field name. May not contain '.' |
| std::size_t epics::pvData::Union::getFieldIndex | ( | std::string const & | fieldName | ) | const |
Get the field index for the specified fieldName.
|
inline |
Get the name of the field with the specified index;
| fieldIndex | The index of the desired field. |
Definition at line 1006 of file pvIntrospect.h.
|
inline |
Get the names of the fields in the union.
Definition at line 1000 of file pvIntrospect.h.
|
inline |
Get the fields in the union.
Definition at line 995 of file pvIntrospect.h.
|
inline |
Lookup Field by index, within this Structure.
| index | Index of member in this structure. index>=0 && index<getNumberFields()
|
| std::out_of_range | If index >= getNumberFields() |
| std::runtime_error | If member is not a sub-class of FT |
Definition at line 972 of file pvIntrospect.h.
|
inline |
Lookup Field by index, within this Union.
| index | Index of member in this union. index>=0 && index<getNumberFields()
|
| std::out_of_range | If index >= getNumberFields() |
Definition at line 963 of file pvIntrospect.h.
|
inline |
Lookup Field by name and cast to Field sub-class.
| fieldName | Member field name. May not contain '.' |
| 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.
|
inline |
Lookup Field by name
| fieldName | Member field name. May not contain '.' |
| std::runtime_error | If no member by this name |
Definition at line 918 of file pvIntrospect.h.
|
virtual |
Get the identification string.
Implements epics::pvData::Field.
|
inline |
Get the number of immediate subfields in the union.
Definition at line 892 of file pvIntrospect.h.
| int32 epics::pvData::Union::guess | ( | Type | t, |
| ScalarType | s ) const |
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.
| t | Must be either scalar or scalarArray |
| s | The preferred ScalarType |
|
inline |
Check if this union is variant union (aka any type).
true if this union is variant union, otherwise false. Definition at line 1011 of file pvIntrospect.h.
|
virtual |
Serialize field into given buffer.
| buffer | serialization buffer. |
| flusher | flush interface. |
Implements epics::pvData::Serializable.
|
friend |
Definition at line 1046 of file pvIntrospect.h.
|
friend |
Definition at line 1047 of file pvIntrospect.h.
|
static |
Default variant union ID.
Definition at line 876 of file pvIntrospect.h.
|
static |
Default union ID.
Definition at line 865 of file pvIntrospect.h.