8#ifndef INCLUDED_BALCL_OPTIONVALUE
9#define INCLUDED_BALCL_OPTIONVALUE
268#include <balscm_version.h>
290#include <bsl_iosfwd.h>
291#include <bsl_string.h>
292#include <bsl_vector.h>
336 template <
class TYPE>
337 bool isType(
const TYPE&)
const;
353 bsl::ostream&
print(bsl::ostream& stream,
355 int spacesPerLevel = 4)
const;
557 template <
class TYPE>
558 void set(
const TYPE& value);
574 template <
class TYPE>
604 template <
class TYPE>
605 const TYPE&
the()
const;
630 bsl::ostream&
print(bsl::ostream& stream,
632 int spacesPerLevel = 4)
const;
687: d_value(basicAllocator)
694: d_value(basicAllocator)
702: d_value(value, basicAllocator)
709: d_value(value, basicAllocator)
716: d_value(value, basicAllocator)
723: d_value(value, basicAllocator)
730: d_value(value, basicAllocator)
737: d_value(value, basicAllocator)
752: d_value(value, basicAllocator)
759: d_value(value, basicAllocator)
766: d_value(value, basicAllocator)
773: d_value(value, basicAllocator)
780: d_value(value, basicAllocator)
788: d_value(value, basicAllocator)
795: d_value(value, basicAllocator)
802: d_value(value, basicAllocator)
809: d_value(value, basicAllocator)
816: d_value(value, basicAllocator)
823: d_value(value, basicAllocator)
830: d_value(original.d_value, basicAllocator)
838 d_value = rhs.d_value;
885 return d_value.
the<TYPE>();
895 d_value.
swap(other.d_value);
919 return d_value.
the<TYPE>();
926 return d_value.getAllocator();
935 return lhs.d_value == rhs.d_value;
941 return !(lhs == rhs);
946 const OptionValue&
object)
948 return object.
print(stream, 0, -1);
957 a.d_value.swap(b.d_value);
992 int spacesPerLevel)
const
1002 const OptionValue_NullOf& rhs)
1004 return lhs.type() == rhs.type();
1009 const OptionValue_NullOf& rhs)
1011 return !(lhs == rhs);
1018 const OptionValue_NullOf&
object)
1020 return object.print(stream, 0, -1);
Definition balcl_optionvalue.h:311
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition balcl_optionvalue.h:990
OptionValue_NullOf(OptionType::Enum optionType)
Definition balcl_optionvalue.h:967
BSLMF_NESTED_TRAIT_DECLARATION(OptionValue_NullOf, bslmf::IsBitwiseEqualityComparable)
bool isType(const TYPE &) const
Definition balcl_optionvalue.h:976
BSLMF_NESTED_TRAIT_DECLARATION(OptionValue_NullOf, bdlb::HasPrintMethod)
BSLMF_NESTED_TRAIT_DECLARATION(OptionValue_NullOf, bslmf::IsBitwiseMoveable)
OptionType::Enum type() const
Return the option type of this object.
Definition balcl_optionvalue.h:982
Definition balcl_optionvalue.h:393
friend bool operator==(const OptionValue &, const OptionValue &)
friend void swap(OptionValue &, OptionValue &)
OptionValue & operator=(const OptionValue &rhs)
Definition balcl_optionvalue.h:836
bool isNull() const
Definition balcl_optionvalue.h:906
~OptionValue()=default
Destroy this object.
OptionType::Enum type() const
OptionValue()
Definition balcl_optionvalue.h:680
void reset()
Definition balcl_optionvalue.h:843
bool hasNonVoidType() const
Definition balcl_optionvalue.h:900
void set(const TYPE &value)
Definition balcl_optionvalue.h:850
BSLMF_NESTED_TRAIT_DECLARATION(OptionValue, bdlb::HasPrintMethod)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
void setNull()
Definition balcl_optionvalue.h:860
void setType(OptionType::Enum type)
Definition balcl_optionvalue.h:873
bslma::Allocator * allocator() const
Definition balcl_optionvalue.h:924
BSLMF_NESTED_TRAIT_DECLARATION(OptionValue, bslma::UsesBslmaAllocator)
TYPE & the()
Definition balcl_optionvalue.h:881
void reset()
Definition bdlb_variant.h:7472
bool is() const
Definition bdlb_variant.h:7605
TYPE & createInPlace(ARGS &&... arguments)
Definition bdlb_variant.h:7454
bool isUnset() const
Definition bdlb_variant.h:7612
TYPE & the()
Definition bdlb_variant.h:7517
VariantImp & assign(const TYPE &value)
void swap(VariantImp &other)
Definition bdlb_variant.h:7482
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bdlb_variant.h:7619
Definition bdlb_variant.h:2312
Definition bdlt_date.h:294
Definition bdlt_datetime.h:331
Definition bdlt_time.h:196
Definition bslstl_string.h:1281
Definition bslma_allocator.h:457
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balcl_commandline.h:1364
bool operator==(const CommandLine_SchemaData &lhs, const CommandLine_SchemaData &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const CommandLine &rhs)
void swap(OptionValue &a, OptionValue &b)
bool operator!=(const CommandLine_SchemaData &lhs, const CommandLine_SchemaData &rhs)
bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
Definition bdlb_printmethods.h:719
Definition balcl_optiontype.h:282
bsls::Types::Int64 Int64
Definition balcl_optiontype.h:231
char Char
Definition balcl_optiontype.h:229
bool Bool
Definition balcl_optiontype.h:228
int Int
Definition balcl_optiontype.h:230
double Double
Definition balcl_optiontype.h:232
Enum
Definition balcl_optiontype.h:248
@ e_VOID
Definition balcl_optiontype.h:250
Definition bdlb_printmethods.h:306
Definition bslma_usesbslmaallocator.h:343
Definition bslmf_isbitwiseequalitycomparable.h:499
Definition bslmf_isbitwisemoveable.h:718
long long Int64
Definition bsls_types.h:132