All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
uhd::ref_vector< T > Class Template Reference

`#include <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

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

  ptr | a pointer to a chunk of memory

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

  vec | a const reference to an std::vector

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

  mem | a pointer to an array of pointers
  len | the length of the array of pointers

## Member Function Documentation

template<typename T >

const T& uhd::ref_vector< T >::operator[] | ( | size_t | index | ) | const

inline

Index operator gets the value of rv[index].

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:

- include/uhd/types/ref_vector.hpp