PVData C++  8.0.3
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
epics::pvData::detail::shared_vector_base< E > Class Template Reference
Inheritance diagram for epics::pvData::detail::shared_vector_base< E >:
Inheritance graph

Public Member Functions

 shared_vector_base ()
 Empty vector (not very interesting)
template<typename A >
 shared_vector_base (A *v, size_t o, size_t c)
 shared_vector_base (const std::tr1::shared_ptr< E > &d, size_t o, size_t c)
template<typename A , typename B >
 shared_vector_base (A d, B b, size_t o, size_t c)
 shared_vector_base (const shared_vector_base &O)
 shared_vector_base (shared_vector_base< _E_non_const > &O, _shared_vector_freeze_tag)
 shared_vector_base (shared_vector< const E > &O, _shared_vector_thaw_tag)
shared_vector_baseoperator= (const shared_vector_base &o)
 Copy an existing vector.
void swap (shared_vector_base &o)
 Swap the contents of this vector with another.
void clear ()
 Clear contents. size() becomes 0.
bool unique () const
 Data is not shared?
size_t size () const
 Number of elements visible through this vector.
bool empty () const
 shorthand for size()==0
void slice (size_t offset, size_t length=(size_t) -1)
 Reduce the view of this shared_vector. More...
const std::tr1::shared_ptr< E > & dataPtr () const
size_t dataOffset () const
size_t dataCount () const
size_t dataTotal () const

Protected Types

typedef meta::strip_const< E >::type _E_non_const

Protected Member Functions

void _null_input ()

Protected Attributes

std::tr1::shared_ptr< E > m_sdata
size_t m_offset
 Offset in the data array of first visible element.
size_t m_count
 Number of visible elements between m_offset and end of data.
size_t m_total
 Total number of elements between m_offset and the end of data.


template<typename E1 >
class shared_vector_base

Detailed Description

template<typename E>
class epics::pvData::detail::shared_vector_base< E >

Definition at line 53 of file sharedVector.h.

Constructor & Destructor Documentation

◆ shared_vector_base() [1/2]

template<typename E>
epics::pvData::detail::shared_vector_base< E >::shared_vector_base ( shared_vector_base< _E_non_const > &  O,

Constructor used to implement freeze(). Should not be called directly.

Definition at line 136 of file sharedVector.h.

◆ shared_vector_base() [2/2]

template<typename E>
epics::pvData::detail::shared_vector_base< E >::shared_vector_base ( shared_vector< const E > &  O,

Constructor used to implement thaw(). Should not be called directly.

Definition at line 155 of file sharedVector.h.

Member Function Documentation

◆ slice()

template<typename E>
void epics::pvData::detail::shared_vector_base< E >::slice ( size_t  offset,
size_t  length = (size_t)-1 

Reduce the view of this shared_vector.

Reduce the portion of the underlying buffer which is accessible through this shared_vector.

When the requested new offset and length are not possible then the following holds.

When offset is >= size() then after slice() size()==0. When length >= size()-offset then after slice() size() = old_size-offset.

offsetThe request new offset relative to the current offset.
lengthThe requested new length.
offset and length are in units of sizeof(E). or bytes (1) when E=void.

Definition at line 244 of file sharedVector.h.

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