[#BloombergLP-balcl-OccurrenceInfo] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::OccurrenceInfo :relfileprefix: ../../ :mrdocs: This `class` describes a command‐line option's occurrence requirement and default value. == Synopsis Declared in `<balcl_occurrenceinfo.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class OccurrenceInfo; ---- == Description This is a simple attribute class that describes a command‐line option occurrence requirement (i.e., required, optional, or optional but hidden) and default value, if any. == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balcl/OccurrenceInfo/OccurrenceType-09.adoc[`OccurrenceType`] | Enumerate the occurrence requirements for a command‐line option. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balcl/OccurrenceInfo/2constructor-0d56.adoc[`OccurrenceInfo`] [.small]#[constructor]# | Constructors | xref:BloombergLP/balcl/OccurrenceInfo/2destructor.adoc[`~OccurrenceInfo`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/balcl/OccurrenceInfo/operator_assign.adoc[`operator=`] | Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. | xref:BloombergLP/balcl/OccurrenceInfo/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/balcl/OccurrenceInfo/defaultValue.adoc[`defaultValue`] | Return a `const` reference to the default value of this object. | xref:BloombergLP/balcl/OccurrenceInfo/hasDefaultValue.adoc[`hasDefaultValue`] | Return `true` if this object has a default value, and `false` otherwise. | xref:BloombergLP/balcl/OccurrenceInfo/isHidden.adoc[`isHidden`] | Return `true` if the described option is hidden (i.e., not printed in the usage string), and `false` otherwise. | xref:BloombergLP/balcl/OccurrenceInfo/isRequired.adoc[`isRequired`] | Return `true` if the described option is required, and `false` otherwise. | xref:BloombergLP/balcl/OccurrenceInfo/occurrenceType-08.adoc[`occurrenceType`] | Return the occurrence type of the described option (i.e., required, optional, or hidden). | xref:BloombergLP/balcl/OccurrenceInfo/print.adoc[`print`] | Format this object to the specified output `stream` and return a reference to `stream`. | xref:BloombergLP/balcl/OccurrenceInfo/setDefaultValue.adoc[`setDefaultValue`] | Set the default value of the associated option. | xref:BloombergLP/balcl/OccurrenceInfo/setHidden.adoc[`setHidden`] | Set the associated option to be hidden. The behavior is undefined unless the option is optional (`e_REQUIRED != occurrenceType()`). | xref:BloombergLP/balcl/OccurrenceInfo/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<OccurrenceInfo, HasPrintMethod>`] | Nested trait declaration for `bslma::UsesBslmaAllocator`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balcl/operator_not_eq-01.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` do not have the same value. | xref:BloombergLP/balcl/operator_eq-0a.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` have the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#