BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::PrintMethods Namespace Reference

Functions

template<class TYPE >
bsl::ostream & print (bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
 
bsl::ostream & print (bsl::ostream &stream, char object, int level=0, int spacesPerLevel=4)
 
bsl::ostream & print (bsl::ostream &stream, unsigned char object, int level=0, int spacesPerLevel=4)
 
template<class CHAR_T , class CHAR_TRAITS_T , class ALLOC >
bsl::ostream & print (bsl::ostream &stream, const bsl::basic_string< CHAR_T, CHAR_TRAITS_T, ALLOC > &object, int level=0, int spacesPerLevel=4)
 
template<class ALLOC >
bsl::ostream & print (bsl::ostream &stream, const bsl::vector< char, ALLOC > &object, int level=0, int spacesPerLevel=4)
 

Detailed Description

This namespace contains parameterized print methods having the standard BDE signature for such methods.

Function Documentation

◆ print() [1/5]

bsl::ostream & bdlb::PrintMethods::print ( bsl::ostream &  stream,
char  object,
int  level = 0,
int  spacesPerLevel = 4 
)

◆ print() [2/5]

template<class CHAR_T , class CHAR_TRAITS_T , class ALLOC >
bsl::ostream & bdlb::PrintMethods::print ( bsl::ostream &  stream,
const bsl::basic_string< CHAR_T, CHAR_TRAITS_T, ALLOC > &  object,
int  level = 0,
int  spacesPerLevel = 4 
)

Format the specified object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. Note that output will be formatted on one line. If stream is not valid on entry, this operation has no effect.

◆ print() [3/5]

template<class ALLOC >
bsl::ostream & bdlb::PrintMethods::print ( bsl::ostream &  stream,
const bsl::vector< char, ALLOC > &  object,
int  level = 0,
int  spacesPerLevel = 4 
)

Format the specified object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. Note that output will be formatted on one line. Also note that non-printable characters in object will be printed using their hexadecimal representation. If stream is not valid on entry, this operation has no effect.

◆ print() [4/5]

template<class TYPE >
bsl::ostream & bdlb::PrintMethods::print ( bsl::ostream &  stream,
const TYPE &  object,
int  level = 0,
int  spacesPerLevel = 4 
)

Format the specified object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect.

◆ print() [5/5]

bsl::ostream & bdlb::PrintMethods::print ( bsl::ostream &  stream,
unsigned char  object,
int  level = 0,
int  spacesPerLevel = 4 
)