HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vdf_BoxedContainer< T > Class Template Reference

#include <boxedContainer.h>

Public Member Functions

 Vdf_BoxedContainer ()=default
 
 Vdf_BoxedContainer (unsigned int n)
 
bool operator== (const Vdf_BoxedContainer &rhs) const
 
bool operator!= (const Vdf_BoxedContainer &rhs) const
 
bool empty () const
 
size_t size () const
 
void reserve (unsigned int n)
 
const Toperator[] (unsigned int i) const
 
Toperator[] (unsigned int i)
 
const Tdata () const
 
Tdata ()
 
const Vdf_BoxedRangesGetRanges () const
 
template<typename Iterator >
void AppendRange (Iterator begin, Iterator end)
 

Friends

void swap (Vdf_BoxedContainer &lhs, Vdf_BoxedContainer &rhs)
 

Detailed Description

template<typename T>
class Vdf_BoxedContainer< T >

This simple container stores multiple values that flow through the network as a single data flow element. It enables data flow of vectorized data without encoding the length of that data in the topology of the network. This container is transparent to client code, such that its contents can be consumed just like any vectorized data.

Definition at line 84 of file boxedContainer.h.

Constructor & Destructor Documentation

template<typename T>
Vdf_BoxedContainer< T >::Vdf_BoxedContainer ( )
default

Constructs an empty container with no elements and no ranges.

template<typename T>
Vdf_BoxedContainer< T >::Vdf_BoxedContainer ( unsigned int  n)
inlineexplicit

Constructs a container with n elements and one range containing all elements. Each element will be default initialized.

Definition at line 108 of file boxedContainer.h.

Member Function Documentation

template<typename T >
template<typename Iterator >
void Vdf_BoxedContainer< T >::AppendRange ( Iterator  begin,
Iterator  end 
)

Appends the data elements [ begin, end ) to the end of the container, and adds a new group containing those same data elements.

Definition at line 201 of file boxedContainer.h.

template<typename T>
const T* Vdf_BoxedContainer< T >::data ( ) const
inline

Returns a pointer to the immutable data elements.

Definition at line 157 of file boxedContainer.h.

template<typename T>
T* Vdf_BoxedContainer< T >::data ( )
inline

Returns a pointer to the mutable data elements.

Definition at line 163 of file boxedContainer.h.

template<typename T>
bool Vdf_BoxedContainer< T >::empty ( void  ) const
inline

Returns true if the container does not hold any elements.

Definition at line 127 of file boxedContainer.h.

template<typename T>
const Vdf_BoxedRanges& Vdf_BoxedContainer< T >::GetRanges ( ) const
inline

Returns the subranges of boxed data.

Definition at line 169 of file boxedContainer.h.

template<typename T>
bool Vdf_BoxedContainer< T >::operator!= ( const Vdf_BoxedContainer< T > &  rhs) const
inline

Returns true if rhs does not compare equal with this container.

Definition at line 121 of file boxedContainer.h.

template<typename T>
bool Vdf_BoxedContainer< T >::operator== ( const Vdf_BoxedContainer< T > &  rhs) const
inline

Returns true if rhs compares equal with this container.

Definition at line 115 of file boxedContainer.h.

template<typename T>
const T& Vdf_BoxedContainer< T >::operator[] ( unsigned int  i) const
inline

Returns the immutable value stored at index i.

Definition at line 145 of file boxedContainer.h.

template<typename T>
T& Vdf_BoxedContainer< T >::operator[] ( unsigned int  i)
inline

Returns the mutable value stored at index i.

Definition at line 151 of file boxedContainer.h.

template<typename T>
void Vdf_BoxedContainer< T >::reserve ( unsigned int  n)
inline

Reserves storage for n elements in this container.

Definition at line 139 of file boxedContainer.h.

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

Returns the number of elements stored in this container.

Definition at line 133 of file boxedContainer.h.

Friends And Related Function Documentation

template<typename T>
void swap ( Vdf_BoxedContainer< T > &  lhs,
Vdf_BoxedContainer< T > &  rhs 
)
friend

Definition at line 180 of file boxedContainer.h.


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