Template Class PVValueArray< PVUnionPtr >¶
Defined in File pvData.h
Inheritance Relationships¶
Base Type¶
public epics::pvData::detail::PVVectorStorage< PVUnionPtr, PVArray >
(Template Class PVVectorStorage)
Class Documentation¶
-
template<>
class PVValueArray<PVUnionPtr> : public epics::pvData::detail::PVVectorStorage<PVUnionPtr, PVArray>¶ Data class for a unionArray.
Public Types
-
typedef PVUnionPtr value_type¶
-
typedef PVUnionPtr *pointer¶
-
typedef const PVUnionPtr *const_pointer¶
-
typedef PVUnionArray &reference¶
-
typedef const PVUnionArray &const_reference¶
-
typedef ::epics::pvData::shared_vector<PVUnionPtr> svector¶
-
typedef ::epics::pvData::shared_vector<const PVUnionPtr> const_svector¶
Public Functions
-
POINTER_DEFINITIONS(PVUnionArray)¶
-
inline virtual ~PVValueArray()¶
Destructor
- inline virtual ArrayConstPtr getArray () const OVERRIDE FINAL
Get the introspection interface
- Returns
The interface.
- inline virtual size_t getLength () const OVERRIDE FINAL
Get the array length.
- Returns
The length.
- inline virtual size_t getCapacity () const OVERRIDE FINAL
Get the array capacity.
- Returns
The capacity.
- virtual void setCapacity (size_t capacity) OVERRIDE FINAL
Set the array capacity.
- Parameters
capacity – The length.
- virtual void setLength (std::size_t length) OVERRIDE FINAL
Set the array length.
- Parameters
length – The length.
-
inline UnionArrayConstPtr getUnionArray() const¶
Get the introspection interface
- Returns
The interface.
-
std::size_t append(std::size_t number)¶
Append new elements to the end of the array.
- Parameters
number – The number of elements to add.
- Returns
the new length of the array.
-
bool remove(std::size_t offset, std::size_t number)¶
Remove elements from the array.
- Parameters
offset – The offset of the first element to remove.
number – The number of elements to remove.
- Returns
(false,true) if the elements were removed.
-
void compress()¶
Compress. This removes all null elements from the array.
- inline virtual const_svector view () const OVERRIDE
Fetch a read-only view of the current array data.
- virtual void swap (const_svector &other) OVERRIDE
Exchange our contents for the provided.
Callers must ensure that postPut() is called after the last swap() operation.
Before you call this directly, consider using the reuse(), or replace() methods.
- Throws
std::logic_error – for Immutable arrays.
- inline virtual void replace (const const_svector &other) OVERRIDE FINAL
Discard current contents and replaced with the provided. Fails for Immutable arrays calls postPut()
- virtual void serialize (ByteBuffer *pbuffer, SerializableControl *pflusher) const OVERRIDE FINAL
Serialize field into given buffer.
- Parameters
buffer – serialization buffer.
flusher – flush interface.
- virtual void deserialize (ByteBuffer *buffer, DeserializableControl *pflusher) OVERRIDE FINAL
Deserialize buffer.
- Parameters
buffer – serialization buffer.
flusher – deserialization control.
- virtual void serialize (ByteBuffer *pbuffer, SerializableControl *pflusher, std::size_t offset, std::size_t count) const OVERRIDE FINAL
Serialize field into given buffer.
- Parameters
buffer – serialization buffer.
flusher – flush interface.
offset – offset in elements.
count – number of elements
- virtual std::ostream & dumpValue (std::ostream &o) const OVERRIDE FINAL
Puts the PVField raw value to the stream.
- Parameters
o – output stream.
- Returns
The output stream.
- virtual std::ostream & dumpValue (std::ostream &o, std::size_t index) const OVERRIDE FINAL
-
void copy(const PVUnionArray &from)¶
-
void copyUnchecked(const PVUnionArray &from)¶
Protected Functions
-
explicit PVValueArray(UnionArrayConstPtr const &unionArray)¶
-
typedef PVUnionPtr value_type¶