8#ifndef INCLUDED_BDLB_OPTIONALPRINTER
9#define INCLUDED_BDLB_OPTIONALPRINTER
75#include <bdlscm_version.h>
83#include <bsl_optional.h>
84#include <bsl_ostream.h>
125 bsl::ostream&
print(bsl::ostream& stream,
127 int spacesPerLevel = 4)
const;
159 template <
class TYPE>
183 int spacesPerLevel)
const
185 if (!d_data_p->has_value()) {
217 return object.print(stream, 0, -1);
Definition bdlb_optionalprinter.h:99
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bdlb_optionalprinter.h:181
OptionalPrinter(const bsl::optional< TYPE > *data)
Create OptionalPrinter with the specified data.
Definition bdlb_optionalprinter.h:173
BSLMF_NESTED_TRAIT_DECLARATION(OptionalPrinter, bslfmt::EnableStreamedFormatter)
Definition bslstl_optional.h:2043
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
Definition bdlb_printmethods.h:725
Definition bdlb_algorithmworkaroundutil.h:74
bsl::ostream & operator<<(bsl::ostream &stream, const BigEndianInt16 &integer)
Definition bdlb_optionalprinter.h:154
static OptionalPrinter< TYPE > makePrinter(const bsl::optional< TYPE > &data)
Return an OptionalPrinter that prints the specified data.
Definition bdlb_optionalprinter.h:205