LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 102 of file DumpUtils.h.

Member Typedef Documentation

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

Definition at line 103 of file DumpUtils.h.

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

Definition at line 104 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 109 of file DumpUtils.h.

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

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 119 of file DumpUtils.h.

120  {
121  std::ostringstream sstr;
122  this->operator()(sstr);
123  return sstr.str();
124  }
void operator()(Stream &&out) const
Inserts the content of the referenced array into the specified stream.
Definition: DumpUtils.h:113
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 113 of file DumpUtils.h.

References lar::dump::details::dumpArray().

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

Member Data Documentation

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

A reference to the array to be printed.

Definition at line 106 of file DumpUtils.h.

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

Number of elements to be printed.

Definition at line 107 of file DumpUtils.h.


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