All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
lar::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 a, size_t n)
 
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 lar::dump::ArrayDumper< T * >

Definition at line 88 of file DumpUtils.h.

Member Typedef Documentation

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

Definition at line 89 of file DumpUtils.h.

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

Definition at line 90 of file DumpUtils.h.

Constructor & Destructor Documentation

template<typename T >
lar::dump::ArrayDumper< T * >::ArrayDumper ( Array_t  a,
size_t  n 
)
inline

Definition at line 95 of file DumpUtils.h.

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

Member Function Documentation

template<typename T >
lar::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 lar::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); }
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
size_t n
Number of elements to be printed.
Definition: DumpUtils.h:93

Member Data Documentation

template<typename T >
Array_t lar::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 lar::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: