PVData C++
8.0.6
|
PVField is the base class for each PVData field. More...
#include <pv/pvData.h>
Public Types | |
enum | { isPVField =1 } |
typedef std::tr1::shared_ptr < PVField > | shared_pointer |
typedef std::tr1::shared_ptr < const PVField > | const_shared_pointer |
typedef std::tr1::weak_ptr < PVField > | weak_pointer |
typedef std::tr1::weak_ptr < const PVField > | const_weak_pointer |
Public Member Functions | |
virtual | ~PVField () |
const std::string & | getFieldName () const |
std::string | getFullName () const |
std::size_t | getFieldOffset () const |
std::size_t | getNextFieldOffset () const |
std::size_t | getNumberFields () const |
bool | isImmutable () const |
virtual void | setImmutable () |
const FieldConstPtr & | getField () const |
PVStructure * | getParent () |
const PVStructure * | getParent () const |
void | postPut () |
void | setPostHandler (PostHandlerPtr const &postHandler) |
virtual bool | equals (PVField &pv) |
virtual std::ostream & | dumpValue (std::ostream &o) const =0 |
void | copy (const PVField &from) |
void | copyUnchecked (const PVField &from) |
Public Member Functions inherited from epics::pvData::Serializable | |
virtual | ~Serializable () |
virtual void | serialize (ByteBuffer *buffer, SerializableControl *flusher) const =0 |
virtual void | deserialize (ByteBuffer *buffer, DeserializableControl *flusher)=0 |
Static Public Attributes | |
static size_t | num_instances |
Protected Member Functions | |
PVField::shared_pointer | getPtrSelf () |
PVField (FieldConstPtr field) | |
void | setParentAndName (PVStructure *parent, std::string const &fieldName) |
Friends | |
class | PVDataCreate |
class | PVStructure |
PVField is the base class for each PVData field.
Each PVData field has an interface that extends PVField.
|
virtual |
Destructor
|
pure virtual |
Puts the PVField raw value to the stream.
o | output stream. |
Implemented in epics::pvData::PVValueArray< PVUnionPtr >, epics::pvData::PVValueArray< PVStructurePtr >, epics::pvData::PVValueArray< T >, epics::pvData::PVUnion, epics::pvData::PVStructure, epics::pvData::PVString, epics::pvData::PVScalarValue< T >, epics::pvData::PVScalarValue< T >, epics::pvData::PVScalarValue< T >, epics::pvData::PVScalarValue< T >, and epics::pvData::PVScalarValue< std::string >.
|
virtual |
Is this field equal to another field.
pv | other field |
|
inline |
|
inline |
std::size_t epics::pvData::PVField::getFieldOffset | ( | ) | const |
Get offset of the PVField field within top-level structure. Every field within the PVStructure has a unique offset. The top-level structure has an offset of 0. The first field within the structure has offset equal to 1. The other offsets are determined by recursively traversing each structure of the tree.
std::string epics::pvData::PVField::getFullName | ( | ) | const |
Fully expand the name of this field using the names of its parent fields with a dot '.' separating each name.
std::size_t epics::pvData::PVField::getNextFieldOffset | ( | ) | const |
Get the next offset. If the field is a scalar or array field then this is just offset + 1. If the field is a structure it is the offset of the next field after this structure. Thus (nextOffset - offset) is always equal to the number of fields within the field.
std::size_t epics::pvData::PVField::getNumberFields | ( | ) | const |
Get the total number of fields in this field. This is equal to nextFieldOffset - fieldOffset.
|
inline |
|
inline |
void epics::pvData::PVField::postPut | ( | ) |
postPut. Called when the field is updated by the implementation.
|
virtual |
Set the field to be immutable, i.e. it can no longer be modified. This is permanent, i.e. once done the field cannot be made mutable.
Reimplemented in epics::pvData::PVStructure, and epics::pvData::PVArray.
void epics::pvData::PVField::setPostHandler | ( | PostHandlerPtr const & | postHandler | ) |
Set the handler for postPut. At most one handler can be set.
postHandler | The handler. |