souffle  2.0.2-371-g6315b36
Public Member Functions | Data Fields | Friends
souffle::detail::multiplying_printer< T > Struct Template Reference

A utility class required for the implementation of the times function. More...

#include <StreamUtil.h>

Collaboration diagram for souffle::detail::multiplying_printer< T >:
Collaboration graph

Public Member Functions

 multiplying_printer (const T &value, unsigned times)
 

Data Fields

unsigned times
 
const T & value
 

Friends

std::ostream & operator<< (std::ostream &out, const multiplying_printer &printer)
 

Detailed Description

template<typename T>
struct souffle::detail::multiplying_printer< T >

A utility class required for the implementation of the times function.

Definition at line 304 of file StreamUtil.h.

Constructor & Destructor Documentation

◆ multiplying_printer()

template<typename T >
souffle::detail::multiplying_printer< T >::multiplying_printer ( const T &  value,
unsigned  times 
)
inline

Definition at line 307 of file StreamUtil.h.

307 : value(value), times(times) {}

Friends And Related Function Documentation

◆ operator<<

template<typename T >
std::ostream& operator<< ( std::ostream &  out,
const multiplying_printer< T > &  printer 
)
friend

Definition at line 309 of file StreamUtil.h.

309  {
310  for (unsigned i = 0; i < printer.times; i++) {
311  out << printer.value;
312  }
313  return out;
314  }

Field Documentation

◆ times

template<typename T >
unsigned souffle::detail::multiplying_printer< T >::times

Definition at line 306 of file StreamUtil.h.

◆ value

template<typename T >
const T& souffle::detail::multiplying_printer< T >::value

Definition at line 305 of file StreamUtil.h.


The documentation for this struct was generated from the following file:
souffle::detail::multiplying_printer::times
unsigned times
Definition: StreamUtil.h:306
i
size_t i
Definition: json11.h:663
souffle::detail::multiplying_printer::value
const T & value
Definition: StreamUtil.h:305