Public Types | Public Member Functions | Public Attributes | List of all members
gar::dump::ArrayDumper< T * > Struct Template Reference

#include <DumpUtils.h>

Public Types

using Array_t = T *
 
using This_t = ArrayDumper< Array_t >
 

Public Member Functions

 ArrayDumper (Array_t aloc, size_t nloc)
 
template<typename Stream >
void operator() (Stream &&out) const
 Inserts the content of the referenced array into the specified stream. More...
 
 operator std::string () const
 Converts the content of the stored vector into a string. More...
 

Public Attributes

Array_t a
 A reference to the array to be printed. More...
 
size_t n
 Number of elements to be printed. More...
 

Detailed Description

template<typename T>
struct gar::dump::ArrayDumper< T * >

Definition at line 88 of file DumpUtils.h.

Member Typedef Documentation

template<typename T >
using gar::dump::ArrayDumper< T * >::Array_t = T*

Definition at line 89 of file DumpUtils.h.

template<typename T >
using gar::dump::ArrayDumper< T * >::This_t = ArrayDumper<Array_t>

Definition at line 90 of file DumpUtils.h.

Constructor & Destructor Documentation

template<typename T >
gar::dump::ArrayDumper< T * >::ArrayDumper ( Array_t  aloc,
size_t  nloc 
)
inline

Definition at line 95 of file DumpUtils.h.

95 : a(aloc), n(nloc) {}
size_t n
Number of elements to be printed.
Definition: DumpUtils.h:93
Array_t a
A reference to the array to be printed.
Definition: DumpUtils.h:92

Member Function Documentation

template<typename T >
gar::dump::ArrayDumper< T * >::operator std::string ( ) const
inlineexplicit

Converts the content of the stored vector into a string.

Definition at line 103 of file DumpUtils.h.

104  { std::ostringstream sstr; this->operator()(sstr); return sstr.str(); }
void operator()(Stream &&out) const
Inserts the content of the referenced array into the specified stream.
Definition: DumpUtils.h:99
template<typename T >
template<typename Stream >
void gar::dump::ArrayDumper< T * >::operator() ( Stream &&  out) const
inline

Inserts the content of the referenced array into the specified stream.

Definition at line 99 of file DumpUtils.h.

100  { details::dumpArray(std::forward<Stream>(out), a, n); }
size_t n
Number of elements to be printed.
Definition: DumpUtils.h:93
void dumpArray(Stream &&out, Array &&a, size_t n)
Inserts n of elements of a in the specified stream.
Definition: DumpUtils.h:37
Array_t a
A reference to the array to be printed.
Definition: DumpUtils.h:92

Member Data Documentation

template<typename T >
Array_t gar::dump::ArrayDumper< T * >::a

A reference to the array to be printed.

Definition at line 92 of file DumpUtils.h.

template<typename T >
size_t gar::dump::ArrayDumper< T * >::n

Number of elements to be printed.

Definition at line 93 of file DumpUtils.h.


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