Loading...
Searching...
No Matches
Vdf_BoxedContainer< T > Class Template Reference

This simple container stores multiple values that flow through the network as a single data flow element. More...

#include <boxedContainer.h>

Public Member Functions

 Vdf_BoxedContainer ()=default
 Constructs an empty container with no elements and no ranges.
 
 Vdf_BoxedContainer (unsigned int n)
 Constructs a container with n elements and one range containing all elements.
 
bool operator== (const Vdf_BoxedContainer &rhs) const
 Returns true if rhs compares equal with this container.
 
bool operator!= (const Vdf_BoxedContainer &rhs) const
 Returns true if rhs does not compare equal with this container.
 
bool empty () const
 Returns true if the container does not hold any elements.
 
size_t size () const
 Returns the number of elements stored in this container.
 
void reserve (unsigned int n)
 Reserves storage for n elements in this container.
 
const T & operator[] (unsigned int i) const
 Returns the immutable value stored at index i.
 
T & operator[] (unsigned int i)
 Returns the mutable value stored at index i.
 
const T * data () const
 Returns a pointer to the immutable data elements.
 
T * data ()
 Returns a pointer to the mutable data elements.
 
const Vdf_BoxedRangesGetRanges () const
 Returns the subranges of boxed data.
 
template<typename Iterator >
void 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.
 

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

◆ Vdf_BoxedContainer() [1/2]

Vdf_BoxedContainer ( )
default

Constructs an empty container with no elements and no ranges.

◆ Vdf_BoxedContainer() [2/2]

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

◆ AppendRange()

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

◆ data() [1/2]

T * data ( )
inline

Returns a pointer to the mutable data elements.

Definition at line 163 of file boxedContainer.h.

◆ data() [2/2]

const T * data ( ) const
inline

Returns a pointer to the immutable data elements.

Definition at line 157 of file boxedContainer.h.

◆ empty()

bool empty ( ) const
inline

Returns true if the container does not hold any elements.

Definition at line 127 of file boxedContainer.h.

◆ GetRanges()

const Vdf_BoxedRanges & GetRanges ( ) const
inline

Returns the subranges of boxed data.

Definition at line 169 of file boxedContainer.h.

◆ operator!=()

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

◆ operator==()

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

◆ operator[]() [1/2]

T & operator[] ( unsigned int  i)
inline

Returns the mutable value stored at index i.

Definition at line 151 of file boxedContainer.h.

◆ operator[]() [2/2]

const T & operator[] ( unsigned int  i) const
inline

Returns the immutable value stored at index i.

Definition at line 145 of file boxedContainer.h.

◆ reserve()

void reserve ( unsigned int  n)
inline

Reserves storage for n elements in this container.

Definition at line 139 of file boxedContainer.h.

◆ size()

size_t size ( ) const
inline

Returns the number of elements stored in this container.

Definition at line 133 of file boxedContainer.h.

Friends And Related Function Documentation

◆ swap

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: