Class PVField

Inheritance Relationships

Base Types

  • public epics::pvData::Serializable (Class Serializable)

  • public std::tr1::enable_shared_from_this< PVField >

Derived Types

Class Documentation

class PVField : public virtual epics::pvData::Serializable, public std::tr1::enable_shared_from_this<PVField>

PVField is the base class for each PVData field.

Each PVData field has an interface that extends PVField.

Subclassed by epics::pvData::PVArray, epics::pvData::PVScalar, epics::pvData::PVStructure, epics::pvData::PVUnion

Public Types

enum [anonymous]

Values:

enumerator isPVField

Public Functions

POINTER_DEFINITIONS(PVField)
virtual ~PVField()

Destructor

inline const std::string &getFieldName() const

Get the fieldName for this field.

Returns

The name or empty string if top-level field.

std::string 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 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.

Returns

The offset.

std::size_t 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.

Returns

The offset.

std::size_t getNumberFields() const

Get the total number of fields in this field. This is equal to nextFieldOffset - fieldOffset.

inline bool isImmutable() const

Is the field immutable, i.e. does it not allow changes.

Returns

(false,true) if it (is not, is) immutable.

virtual void setImmutable()

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.

inline const FieldConstPtr &getField() const

Get the Field that describes the field.

Returns

Field, which is the reflection interface.

inline PVStructure *getParent()

Get the parent of this field.

Returns

The parent interface or null if this is PVRecord

inline const PVStructure *getParent() const
void postPut()

postPut. Called when the field is updated by the implementation.

void setPostHandler(PostHandlerPtr const &postHandler)

Set the handler for postPut. At most one handler can be set.

Parameters

postHandler – The handler.

virtual bool equals(PVField &pv)

Is this field equal to another field.

Parameters

pv – other field

Returns

(false,true) if (is not,is) equal.

virtual std::ostream &dumpValue(std::ostream &o) const = 0

Puts the PVField raw value to the stream.

Parameters

o – output stream.

Returns

The output stream.

void copy(const PVField &from)
void copyUnchecked(const PVField &from)

Public Static Attributes

static size_t num_instances

Protected Functions

inline PVField::shared_pointer getPtrSelf()
explicit PVField(FieldConstPtr field)
void setParentAndName(PVStructure *parent, std::string const &fieldName)