Template Class shared_vector_base

Inheritance Relationships

Derived Types

Class Documentation

template<typename E>
class shared_vector_base

Subclassed by epics::pvData::shared_vector< E, Enable >, epics::pvData::shared_vector< E, typename meta::is_void< E >::type >

Public Functions

inline shared_vector_base()

Empty vector (not very interesting)

template<typename A>
inline shared_vector_base(A *v, size_t o, size_t c)
inline shared_vector_base(const std::tr1::shared_ptr<E> &d, size_t o, size_t c)
template<typename A, typename B>
inline shared_vector_base(A d, B b, size_t o, size_t c)
inline shared_vector_base(const shared_vector_base &O)
inline shared_vector_base(shared_vector_base<_E_non_const> &O, _shared_vector_freeze_tag)

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

inline shared_vector_base(shared_vector<const E> &O, _shared_vector_thaw_tag)

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

inline shared_vector_base &operator=(const shared_vector_base &o)

Copy an existing vector.

inline void swap(shared_vector_base &o)

Swap the contents of this vector with another.

inline void clear()

Clear contents. size() becomes 0.

inline bool unique() const

Data is not shared?

inline size_t size() const

Number of elements visible through this vector.

inline bool empty() const

shorthand for size()==0

inline void 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.

Note

offset and length are in units of sizeof(E). or bytes (1) when E=void.

Parameters
  • offset – The request new offset relative to the current offset.

  • length – The requested new length.

inline const std::tr1::shared_ptr<E> &dataPtr() const
inline size_t dataOffset() const
inline size_t dataCount() const
inline size_t dataTotal() const

Protected Types

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

Protected Functions

inline 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.