AsList< Container > Class Template Reference

std::ostream manipulator to print containers as flat lists More...

#include <IoManip.h>

Collaboration diagram for AsList< Container >:

Public Member Functions

 AsList (const Container &c)
 
auto & prefixedBy (const char *const p)
 a c-string to print before the first item (if any). Caller must ensure lifetime. More...
 
auto & delimitedBy (const char *const d)
 a c-string to print between consecutive items (if any). Caller must ensure lifetime. More...
 

Public Attributes

const Container & container
 zero or more items to print More...
 
const char * prefix = nullptr
 a c-string to print before the first item (if any). Caller must ensure lifetime. More...
 
const char * delimiter = nullptr
 a c-string to print between consecutive items (if any). Caller must ensure lifetime. More...
 

Detailed Description

template<typename Container>
class AsList< Container >

Definition at line 106 of file IoManip.h.

Constructor & Destructor Documentation

◆ AsList()

template<typename Container >
AsList< Container >::AsList ( const Container &  c)
inlineexplicit

Definition at line 109 of file IoManip.h.

Member Function Documentation

◆ delimitedBy()

template<typename Container >
auto & AsList< Container >::delimitedBy ( const char *const  d)
inline

Definition at line 115 of file IoManip.h.

References AsList< Container >::delimiter.

Referenced by operator<<().

◆ prefixedBy()

template<typename Container >
auto & AsList< Container >::prefixedBy ( const char *const  p)
inline

Definition at line 112 of file IoManip.h.

References AsList< Container >::prefix.

Referenced by operator<<().

Member Data Documentation

◆ container

template<typename Container >
const Container& AsList< Container >::container

Definition at line 118 of file IoManip.h.

Referenced by operator<<().

◆ delimiter

template<typename Container >
const char* AsList< Container >::delimiter = nullptr

Definition at line 121 of file IoManip.h.

Referenced by AsList< Container >::delimitedBy(), and operator<<().

◆ prefix

template<typename Container >
const char* AsList< Container >::prefix = nullptr

Definition at line 120 of file IoManip.h.

Referenced by operator<<(), and AsList< Container >::prefixedBy().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors