![]() |
This is Unofficial EPICS BASE Doxygen Site
|
Methods for accessing an enumerated structure. More...
#include "pvEnumerated.h"
Public Member Functions | |
PVEnumerated () | |
bool | attach (PVFieldPtr const &pvField) |
void | detach () |
bool | isAttached () |
bool | setIndex (int32 index) |
int32 | getIndex () |
std::string | getChoice () |
bool | choicesMutable () |
PVStringArray::const_svector | getChoices () |
int32 | getNumberChoices () |
bool | setChoices (const StringArray &choices) |
Methods for accessing an enumerated structure.
An enumerated structure has the following fields:
This class can be attached to an enumerated structure field of any PVData object. The methods provide access to the fields in the attached structure. This class should not be extended.
Definition at line 34 of file pvEnumerated.h.
|
inline |
Definition at line 39 of file pvEnumerated.h.
bool epics::pvData::PVEnumerated::attach | ( | PVFieldPtr const & | pvField | ) |
Definition at line 26 of file pvEnumerated.cpp.
bool epics::pvData::PVEnumerated::choicesMutable | ( | ) |
Can choices be changed?
if | not attached. |
Definition at line 84 of file pvEnumerated.cpp.
void epics::pvData::PVEnumerated::detach | ( | ) |
Detach for pvField.
Definition at line 41 of file pvEnumerated.cpp.
string epics::pvData::PVEnumerated::getChoice | ( | ) |
Get the choice corresponding to current index.
if | not attached. |
Definition at line 70 of file pvEnumerated.cpp.
|
inline |
Get the choices.
if | not attached. |
Definition at line 91 of file pvEnumerated.h.
int32 epics::pvData::PVEnumerated::getIndex | ( | ) |
Get the index.
if | not attached. |
Definition at line 62 of file pvEnumerated.cpp.
int32 epics::pvData::PVEnumerated::getNumberChoices | ( | ) |
Get the size of the choices array.
if | not attached. |
Definition at line 92 of file pvEnumerated.cpp.
bool epics::pvData::PVEnumerated::isAttached | ( | ) |
Is the PVEnumerated attached to a pvField?
Definition at line 47 of file pvEnumerated.cpp.
bool epics::pvData::PVEnumerated::setChoices | ( | const StringArray & | choices | ) |
Get the choices.
choices | The new value for choices.` |
if | not attached. |
Definition at line 100 of file pvEnumerated.cpp.
bool epics::pvData::PVEnumerated::setIndex | ( | int32 | index | ) |
Set the index.
index | The new index. |
if | not attached. The index will be changed even if it is out of range of size of choices. |
Definition at line 52 of file pvEnumerated.cpp.