8#ifndef INCLUDED_BDLB_OPTIONALPRINTER
9#define INCLUDED_BDLB_OPTIONALPRINTER
70#include <bdlscm_version.h>
76#include <bsl_optional.h>
77#include <bsl_ostream.h>
114 bsl::ostream&
print(bsl::ostream& stream,
116 int spacesPerLevel = 4)
const;
145 template <
class TYPE>
169 int spacesPerLevel)
const
171 if (!d_data_p->has_value()) {
203 return object.print(stream, 0, -1);
Definition bdlb_optionalprinter.h:92
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bdlb_optionalprinter.h:167
OptionalPrinter(const bsl::optional< TYPE > *data)
Create OptionalPrinter with the specified data.
Definition bdlb_optionalprinter.h:159
Definition bslstl_optional.h:1861
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
Definition bdlb_printmethods.h:719
Definition bdlb_algorithmworkaroundutil.h:74
bsl::ostream & operator<<(bsl::ostream &stream, const BigEndianInt16 &integer)
Definition bdlb_optionalprinter.h:140
static OptionalPrinter< TYPE > makePrinter(const bsl::optional< TYPE > &data)
Return an OptionalPrinter that prints the specified data.
Definition bdlb_optionalprinter.h:191