This is Unofficial EPICS BASE Doxygen Site
sharedVector.h File Reference
#include <ostream>
#include <algorithm>
#include <stdexcept>
#include <iterator>
#include <cassert>
#include "pv/sharedPtr.h"
#include "pv/pvIntrospect.h"
#include "pv/typeCast.h"
#include "pv/templateMeta.h"
+ Include dependency graph for sharedVector.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  epics::pvData::shared_vector< E, Enable >
 A holder for a contiguous piece of memory. More...
 
struct  epics::pvData::detail::default_array_deleter< E >
 
struct  epics::pvData::detail::call_with< T >
 
struct  epics::pvData::detail::call_with< std::tr1::shared_ptr< T > >
 
struct  epics::pvData::detail::call_with< std::string >
 
struct  epics::pvData::detail::_shared_vector_freeze_tag
 
struct  epics::pvData::detail::_shared_vector_thaw_tag
 
struct  epics::pvData::detail::_shared_vector_cast_tag
 
class  epics::pvData::detail::shared_vector_base< E >
 
class  epics::pvData::shared_vector< E, Enable >
 A holder for a contiguous piece of memory. More...
 
class  epics::pvData::shared_vector< E, typename meta::is_void< E >::type >
 Specialization for storing untyped pointers. More...
 
struct  epics::pvData::detail::static_shared_vector_caster< TO, FROM, Enable >
 
struct  epics::pvData::detail::static_shared_vector_caster< TO, FROM, typename meta::_and< meta::_and< meta::is_not_void< TO >, meta::is_void< FROM > >, meta::same_const< TO, FROM > >::type >
 
struct  epics::pvData::detail::static_shared_vector_caster< TO, FROM, typename meta::_and< meta::_and< meta::is_void< TO >, meta::is_not_void< FROM > >, meta::same_const< TO, FROM > >::type >
 
struct  epics::pvData::detail::static_shared_vector_caster< TOFRO, TOFRO, void >
 
struct  epics::pvData::detail::shared_vector_converter< TO, FROM, Enable >
 
struct  epics::pvData::detail::shared_vector_converter< TO, FROM, typename meta::same_root< TO, FROM >::type >
 
struct  epics::pvData::detail::shared_vector_converter< TO, FROM, typename meta::_and< meta::is_void< TO >, meta::is_not_void< FROM > >::type >
 
struct  epics::pvData::detail::shared_vector_converter< TO, FROM, typename meta::_and< meta::is_not_void< TO >, meta::is_void< FROM > >::type >
 
struct  epics::pvData::detail::const_caster< TO, FROM, Enable >
 
struct  epics::pvData::detail::const_caster< TYPE, const TYPE >
 
struct  epics::pvData::detail::const_caster< const TYPE, TYPE >
 
struct  epics::pvData::detail::const_caster< TYPE, TYPE >
 

Namespaces

 epics
 TODO only here because of the Lockable.
 
 epics::pvData
 pvData
 
 epics::pvData::detail
 
 epics::pvData::ScalarTypeFunc
 Convenience functions for ScalarType.
 

Functions

shared_vector< void > epics::pvData::ScalarTypeFunc::allocArray (ScalarType id, size_t len)
 Allocate an untyped array based on ScalarType. More...
 
template<ScalarType ID>
shared_vector< typename ScalarTypeTraits< ID >::typeepics::pvData::ScalarTypeFunc::allocArray (size_t len)
 Allocate an untyped array based on ScalarType. More...
 
template<typename A , typename B >
bool operator== (const epics::pvData::shared_vector< A > &a, const epics::pvData::shared_vector< B > &b)
 
template<typename A , typename B >
bool operator!= (const epics::pvData::shared_vector< A > &a, const epics::pvData::shared_vector< B > &b)
 
template<typename E >
std::ostream & operator<< (std::ostream &strm, const epics::pvData::shared_vector< E > &arr)
 

Function Documentation

template<typename A , typename B >
bool operator!= ( const epics::pvData::shared_vector< A > &  a,
const epics::pvData::shared_vector< B > &  b 
)

Definition at line 978 of file sharedVector.h.

980 {
981  return !(a==b);
982 }
template<typename E >
std::ostream& operator<< ( std::ostream &  strm,
const epics::pvData::shared_vector< E > &  arr 
)

Definition at line 985 of file sharedVector.h.

986 {
987  strm<<'{'<<arr.size()<<"}[";
988  for(size_t i=0; i<arr.size(); i++) {
989  if(i>10) {
990  strm<<"...";
991  break;
992  }
993  strm<<arr[i];
994  if(i+1<arr.size())
995  strm<<", ";
996  }
997  strm<<']';
998  return strm;
999 }
int i
Definition: scan.c:967
size_t size() const
Number of elements visible through this vector.
Definition: sharedVector.h:220
template<typename A , typename B >
bool operator== ( const epics::pvData::shared_vector< A > &  a,
const epics::pvData::shared_vector< B > &  b 
)

Definition at line 967 of file sharedVector.h.

969 {
970  if(a.size() != b.size())
971  return false;
972  if(a.dataOffset()==b.dataOffset() && a.dataPtr().get()==b.dataPtr().get())
973  return true;
974  return std::equal(a.begin(), a.end(), b.begin());
975 }
size_t size() const
Number of elements visible through this vector.
Definition: sharedVector.h:220
const std::tr1::shared_ptr< E > & dataPtr() const
Definition: sharedVector.h:261