PVData C++  8.0.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
epics::pvData::detail::PVVectorStorage< T, Base > Class Template Referenceabstract

Common code for PV*Array. More...

#include <pv/pvData.h>

Inheritance diagram for epics::pvData::detail::PVVectorStorage< T, Base >:
Inheritance graph
[legend]
Collaboration diagram for epics::pvData::detail::PVVectorStorage< T, Base >:
Collaboration graph
[legend]

Public Types

typedef T value_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef
::epics::pvData::shared_vector
< T > 
svector
 
typedef
::epics::pvData::shared_vector
< const T > 
const_svector
 

Public Member Functions

virtual const_svector view () const =0
 Fetch a read-only view of the current array data.
 
virtual void swap (const_svector &other)=0
 
virtual void replace (const const_svector &next)=0
 
svector reuse ()
 

Protected Member Functions

template<typename A >
 PVVectorStorage (A a)
 

Detailed Description

template<typename T, class Base>
class epics::pvData::detail::PVVectorStorage< T, Base >

Common code for PV*Array.

Definition at line 1105 of file pvData.h.

Member Function Documentation

template<typename T, class Base>
virtual void epics::pvData::detail::PVVectorStorage< T, Base >::replace ( const const_svector next)
pure virtual

Discard current contents and replaced with the provided. Fails for Immutable arrays calls postPut()

Implemented in epics::pvData::PVValueArray< PVUnionPtr >, epics::pvData::PVValueArray< PVStructurePtr >, and epics::pvData::PVValueArray< T >.

template<typename T, class Base>
svector epics::pvData::detail::PVVectorStorage< T, Base >::reuse ( )
inline

Remove and return the current array data or an unique copy if shared.

Does not (and should not) call postPut()

The returned shared_vector<T> will have unique()==true.

Definition at line 1155 of file pvData.h.

template<typename T, class Base>
virtual void epics::pvData::detail::PVVectorStorage< T, Base >::swap ( const_svector other)
pure virtual

Exchange our contents for the provided.

Exceptions
std::logic_errorfor Immutable arrays.

Callers must ensure that postPut() is called after the last swap() operation.

Before you call this directly, consider using the reuse(), or replace() methods.

Implemented in epics::pvData::PVValueArray< PVUnionPtr >, epics::pvData::PVValueArray< PVStructurePtr >, and epics::pvData::PVValueArray< T >.


The documentation for this class was generated from the following file: