BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balcl::OptionValue_NullOf Class Reference

#include <balcl_optionvalue.h>

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (OptionValue_NullOf, bslmf::IsBitwiseMoveable)
 
 BSLMF_NESTED_TRAIT_DECLARATION (OptionValue_NullOf, bslmf::IsBitwiseEqualityComparable)
 
 BSLMF_NESTED_TRAIT_DECLARATION (OptionValue_NullOf, bdlb::HasPrintMethod)
 
 OptionValue_NullOf (OptionType::Enum optionType)
 
template<class TYPE >
bool isType (const TYPE &) const
 
OptionType::Enum type () const
 Return the option type of this object.
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Detailed Description

This single-attribute class represents a null value of a given nullable balcl::OptionType. OptionValue uses this type to represent its state where there is a known type, but no value for it. Note that OptionType::e_VOID is not nullable, therefore not supported here. Note that: There is no swap member or namespace-level function declared (and defined) for this class on purpose, the general swap works fast for such a simple type.

See balcl_optionvalue

Constructor & Destructor Documentation

◆ OptionValue_NullOf()

balcl::OptionValue_NullOf::OptionValue_NullOf ( OptionType::Enum  optionType)
inlineexplicit

Create an OptionValue_NullOf object with the specified nullable optionType. The behavior is undefined if optionType == OptionType::e_VOID.

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION() [1/3]

balcl::OptionValue_NullOf::BSLMF_NESTED_TRAIT_DECLARATION ( OptionValue_NullOf  ,
bdlb::HasPrintMethod   
)

◆ BSLMF_NESTED_TRAIT_DECLARATION() [2/3]

balcl::OptionValue_NullOf::BSLMF_NESTED_TRAIT_DECLARATION ( OptionValue_NullOf  ,
bslmf::IsBitwiseEqualityComparable   
)

◆ BSLMF_NESTED_TRAIT_DECLARATION() [3/3]

balcl::OptionValue_NullOf::BSLMF_NESTED_TRAIT_DECLARATION ( OptionValue_NullOf  ,
bslmf::IsBitwiseMoveable   
)

◆ isType()

template<class TYPE >
bool balcl::OptionValue_NullOf::isType ( const TYPE &  ) const
inline

Return true if TYPE corresponds to the type attribute, and false if it does not.

◆ print()

bsl::ostream & balcl::OptionValue_NullOf::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const
inline

Format this 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.

◆ type()

OptionType::Enum balcl::OptionValue_NullOf::type ( ) const
inline

The documentation for this class was generated from the following file: