|
Squid Web Cache master
|
std::ostream manipulator to print containers as flat lists More...
#include <IoManip.h>
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. | |
| auto & | suffixedBy (const char *const p) |
| a c-string to print after the last item (if any). Caller must ensure lifetime. | |
| auto & | delimitedBy (const char *const d) |
| a c-string to print between consecutive items (if any). Caller must ensure lifetime. | |
| auto & | quoted (const char *const q="\"") |
| c-string to print before and after each item. Caller must ensure lifetime. | |
| auto & | quoted (const char *const preQ, const char *const postQ) |
| c-strings to print before and after each item. Caller must ensure lifetime. | |
| void | print (std::ostream &) const |
| writes the container to the given stream | |
Public Attributes | |
| const Container & | container |
| zero or more items to print | |
| const char * | prefix = nullptr |
| a c-string to print before the first item (if any). Caller must ensure lifetime. | |
| const char * | suffix = nullptr |
| a c-string to print after the last item (if any). Caller must ensure lifetime. | |
| const char * | delimiter = nullptr |
| a c-string to print between consecutive items (if any). Caller must ensure lifetime. | |
| const char * | preQuote = nullptr |
| optional c-string to print before each item; | |
| const char * | postQuote = nullptr |
| optional c-string to print after each item; | |
|
inline |
Definition at line 188 of file IoManip.h.
References AsList< Container >::delimiter.
Referenced by ErrorState::Dump(), and operator<<().
|
inline |
Definition at line 182 of file IoManip.h.
References AsList< Container >::prefix.
Referenced by dump_peer_options(), and operator<<().
| void AsList< Container >::print | ( | std::ostream & | os | ) | const |
|
inline |
Definition at line 194 of file IoManip.h.
References AsList< Container >::postQuote, and AsList< Container >::preQuote.
|
inline |
Definition at line 191 of file IoManip.h.
References AsList< Container >::postQuote, and AsList< Container >::preQuote.
|
inline |
Definition at line 185 of file IoManip.h.
References AsList< Container >::suffix.
| const Container& AsList< Container >::container |
| const char* AsList< Container >::delimiter = nullptr |
Definition at line 204 of file IoManip.h.
Referenced by AsList< Container >::delimitedBy().
| const char* AsList< Container >::postQuote = nullptr |
Definition at line 206 of file IoManip.h.
Referenced by AsList< Container >::quoted(), and AsList< Container >::quoted().
| const char* AsList< Container >::prefix = nullptr |
Definition at line 202 of file IoManip.h.
Referenced by AsList< Container >::prefixedBy().
| const char* AsList< Container >::preQuote = nullptr |
Definition at line 205 of file IoManip.h.
Referenced by AsList< Container >::quoted(), and AsList< Container >::quoted().
| const char* AsList< Container >::suffix = nullptr |
Definition at line 203 of file IoManip.h.
Referenced by AsList< Container >::suffixedBy().