USRP Hardware Driver and USRP Manual  Version: 4.0.0.0-170-gd398fe465
UHD and USRP Manual
uhd::ref_vector< T > Class Template Reference

#include <uhd/types/ref_vector.hpp>

Public Member Functions

template<typename Ptr >
 ref_vector (Ptr *ptr)
 
template<typename Vector >
 ref_vector (const Vector &vec)
 
 ref_vector (const T *mem, size_t len)
 
const T & operator[] (size_t index) const
 Index operator gets the value of rv[index]. More...
 
size_t size (void) const
 The number of elements in this container. More...
 

Detailed Description

template<typename T>
class uhd::ref_vector< T >

Reference vector:

  • Provides a std::vector-like interface for an array.
  • Statically sized, and does not manage the memory.

Constructor & Destructor Documentation

◆ ref_vector() [1/3]

template<typename T >
template<typename Ptr >
uhd::ref_vector< T >::ref_vector ( Ptr *  ptr)
inline

Create a reference vector of size 1 from a pointer. Therefore: rv[0] == ptr and rv.size() == 1

Parameters
ptra pointer to a chunk of memory

◆ ref_vector() [2/3]

template<typename T >
template<typename Vector >
uhd::ref_vector< T >::ref_vector ( const Vector &  vec)
inline

Create a reference vector from a std::vector container. Therefore: rv[n] == vec[n] and rv.size() == vec.size()

Parameters
veca const reference to an std::vector

◆ ref_vector() [3/3]

template<typename T >
uhd::ref_vector< T >::ref_vector ( const T *  mem,
size_t  len 
)
inline

Create a reference vector from a pointer and a length Therefore: rv[n] == mem[n] and rv.size() == len

Parameters
mema pointer to an array of pointers
lenthe length of the array of pointers

Member Function Documentation

◆ operator[]()

template<typename T >
const T& uhd::ref_vector< T >::operator[] ( size_t  index) const
inline

Index operator gets the value of rv[index].

◆ size()

template<typename T >
size_t uhd::ref_vector< T >::size ( void  ) const
inline

The number of elements in this container.


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