[#BloombergLP-balcl-OccurrenceInfo]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::OccurrenceInfo
:relfileprefix: ../../
:mrdocs:

This `class` is a simple attribute class that describes a command&hyphen;line option occurrence requirement (i&period;e&period;, required, optional, or optional but hidden) and default value, if any&period;

== Synopsis

Declared in `&lt;balcl&lowbar;occurrenceinfo&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class OccurrenceInfo;
----

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/OccurrenceInfo/OccurrenceType-09.adoc[`OccurrenceType`] 
| Enumerate the occurrence requirements for a command&hyphen;line option&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/OccurrenceInfo/2constructor-0d56.adoc[`OccurrenceInfo`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/balcl/OccurrenceInfo/2destructor.adoc[`&#126;OccurrenceInfo`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/balcl/OccurrenceInfo/operator_assign.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object&period;
| xref:BloombergLP/balcl/OccurrenceInfo/allocator.adoc[`allocator`] 
| Return the allocator used by this object to supply memory&period; Note that if no allocator was supplied at construction the currently installed default allocator at construction is used&period;
| xref:BloombergLP/balcl/OccurrenceInfo/defaultValue.adoc[`defaultValue`] 
| Return a `const` reference to the default value of this object&period;
| xref:BloombergLP/balcl/OccurrenceInfo/hasDefaultValue.adoc[`hasDefaultValue`] 
| Return `true` if this object has a default value, and `false` otherwise&period;
| xref:BloombergLP/balcl/OccurrenceInfo/isHidden.adoc[`isHidden`] 
| Return `true` if the described option is hidden (i&period;e&period;, not printed in the usage string), and `false` otherwise&period;
| xref:BloombergLP/balcl/OccurrenceInfo/isRequired.adoc[`isRequired`] 
| Return `true` if the described option is required, and `false` otherwise&period;
| xref:BloombergLP/balcl/OccurrenceInfo/occurrenceType-08.adoc[`occurrenceType`] 
| Return the occurrence type of the described option (i&period;e&period;, required, optional, or hidden)&period;
| xref:BloombergLP/balcl/OccurrenceInfo/print.adoc[`print`] 
| Format this object to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this object&period; If `level` is negative, suppress indentation of the first line&period; If `stream` is not valid on entry, this operation has no effect&period; The behavior is undefined if `spacesPerLevel` is negative&period;
| xref:BloombergLP/balcl/OccurrenceInfo/setDefaultValue.adoc[`setDefaultValue`] 
| Set the type and default value of the associated option to the specified `defaultValue`&period; The behavior is undefined unless the this object describes an optional argument (`e&lowbar;REQUIRED !&equals; occurrenceType()`) and `defaultValue&period;type()` is neither `OptionType&colon;&colon;e&lowbar;BOOL` nor &apos;OptionType&colon;&colon;e&lowbar;VOID nor a null value (`false &equals;&equals; defaultValue&period;isNull()`)&period;
| xref:BloombergLP/balcl/OccurrenceInfo/setHidden.adoc[`setHidden`] 
| Set the associated option to be hidden&period; The behavior is undefined unless the option is optional (`e&lowbar;REQUIRED !&equals; occurrenceType()`)&period;
| xref:BloombergLP/balcl/OccurrenceInfo/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;OccurrenceInfo, HasPrintMethod&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/operator_not_eq-01.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` do not have the same value, and `false` otherwise&period; Two objects of type `OccurrenceInfo` do not have the same value if and only if they have different occurrence types, or exactly one has a default value, or else both have a default value but their respective default values have either different types or different values&period;
| xref:BloombergLP/balcl/operator_eq-0a.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` have the same value, and `false` otherwise&period; Two objects of type `OccurrenceInfo` have the same value if and only if they have the same occurrence type and either both do not have a default value, or their respective default values have the same type and value&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
