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

This `struct` provides a namespace for enumerating types used for command&hyphen;line option values&period; See &lcub;Enumerators&rcub; for details&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct OptionType;
----

== Description

This `struct`&colon; &ast; Supports a complete set of _enumeration_ operations&period; &ast; Provides several additional utility functions&period;

For terminology see `bsldoc&lowbar;glossary`&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/OptionType/EnumToType-0f.adoc[`EnumToType`] 
| `EnumToType&lt;TYPE&lowbar;ENUMERATOR&gt;&colon;&colon;type` is the (C&plus;&plus;) type corresponding to the (template parameter) `TYPE&lowbar;ENUMERATOR` `Enum` value&period; See `TypeToEnum` for the inverse metafunction&period;
| xref:BloombergLP/balcl/OptionType/TypeToEnum-06.adoc[`TypeToEnum`] 
| `TypeToEnum&lt;TYPE&gt;&colon;&colon;value` is the `Enum` value corresponding to the (template parameter) `TYPE` where `TYPE` matches one of the `typedef`s defined above or `void`&period; See `EnumToType` for the inverse metafunction&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/OptionType/Bool.adoc[`Bool`] 
| Alias for the `bool` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/Char.adoc[`Char`] 
| Alias for the `char` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/CharArray.adoc[`CharArray`] 
| Alias for an array of `char` command&hyphen;line option values&period;
| xref:BloombergLP/balcl/OptionType/Date.adoc[`Date`] 
| Alias for the `Date` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/DateArray.adoc[`DateArray`] 
| Alias for an array of `Date` command&hyphen;line option values&period;
| xref:BloombergLP/balcl/OptionType/Datetime.adoc[`Datetime`] 
| Alias for the `Datetime` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/DatetimeArray.adoc[`DatetimeArray`] 
| Alias for an array of `Datetime` command&hyphen;line option values&period;
| xref:BloombergLP/balcl/OptionType/Double.adoc[`Double`] 
| Alias for the `double` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/DoubleArray.adoc[`DoubleArray`] 
| Alias for an array of `double` command&hyphen;line option values&period;
| xref:BloombergLP/balcl/OptionType/Int.adoc[`Int`] 
| Alias for the `int` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/Int64.adoc[`Int64`] 
| Alias for the `Int64` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/Int64Array.adoc[`Int64Array`] 
| Alias for an array of `Int64` command&hyphen;line option values&period;
| xref:BloombergLP/balcl/OptionType/IntArray.adoc[`IntArray`] 
| Alias for an array of `int` command&hyphen;line option values&period;
| xref:BloombergLP/balcl/OptionType/String.adoc[`String`] 
| Alias for the `string` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/StringArray.adoc[`StringArray`] 
| Alias for an array of `string` command&hyphen;line option values&period;
| xref:BloombergLP/balcl/OptionType/Time.adoc[`Time`] 
| Alias for the `Time` command&hyphen;line option value type&period;
| xref:BloombergLP/balcl/OptionType/TimeArray.adoc[`TimeArray`] 
| Alias for an array of `Time` command&hyphen;line option values&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/OptionType/Enum.adoc[`Enum`] 
| Enumerates the supported command&hyphen;line option value types&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/OptionType/fromArrayType.adoc[`fromArrayType`] 
| If `isArrayType(type)` for the specified `type`, then return the type of the elements of that array `type`&semi; otherwise return `e&lowbar;VOID`&period;
| xref:BloombergLP/balcl/OptionType/isArrayType.adoc[`isArrayType`] 
| Return `true` if the specified `type` corresponds to an array type, and `false` otherwise&period;
| xref:BloombergLP/balcl/OptionType/print.adoc[`print`] 
| Write the string representation of the specified enumeration `value` to the specified output `stream`, and return a reference to `stream`&period; Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects&period; If `level` is specified, optionally specify `spacesPerLevel`, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; See `toAscii` for what constitutes the string representation of a `OptionType&colon;&colon;Enum` value&period;
| xref:BloombergLP/balcl/OptionType/toArrayType.adoc[`toArrayType`] 
| If there is an array type whose elements have the specified `type` then return that array type&semi; otherwise return `e&lowbar;VOID`&period; `e&lowbar;VOID &equals;&equals; toArrayType(e&lowbar;BOOL)` because an array of boolean values is not allowed as a command&hyphen;line&hyphen;option type&period; Note that `type &equals;&equals; fromArrayType(TYPE)` when `TYPE !&equals; e&lowbar;VOID` is returned&period;
| xref:BloombergLP/balcl/OptionType/toAscii.adoc[`toAscii`] 
| Return the (non&hyphen;modifiable) string representation corresponding to the specified enumeration `value`, if it exists, and a unique (error) string otherwise&period; The string representation of `value` matches its corresponding enumerator name with the `e&lowbar;` prefix elided&period; For example&colon; &grave; bsl&colon;&colon;cout &lt;&lt; balcl&colon;&colon;OptionType&colon;&colon;toAscii( OptionType&colon;&colon;e&lowbar;STRING)&semi; &grave; will print the following on standard output&colon; &grave; STRING &grave; Note that specifying a `value` that does not match any of the enumerators will result in a string representation that is distinct from any of those corresponding to the enumerators, but is otherwise unspecified&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/OptionType/k_BOOL.adoc[`k&lowbar;BOOL`] 
| Null pointer tag for the `Bool` option type&period;
| xref:BloombergLP/balcl/OptionType/k_CHAR.adoc[`k&lowbar;CHAR`] 
| Null pointer tag for the `Char` option type&period;
| xref:BloombergLP/balcl/OptionType/k_CHAR_ARRAY.adoc[`k&lowbar;CHAR&lowbar;ARRAY`] 
| Null pointer tag for the `CharArray` option type&period;
| xref:BloombergLP/balcl/OptionType/k_DATE.adoc[`k&lowbar;DATE`] 
| Null pointer tag for the `Date` option type&period;
| xref:BloombergLP/balcl/OptionType/k_DATETIME.adoc[`k&lowbar;DATETIME`] 
| Null pointer tag for the `Datetime` option type&period;
| xref:BloombergLP/balcl/OptionType/k_DATETIME_ARRAY.adoc[`k&lowbar;DATETIME&lowbar;ARRAY`] 
| Null pointer tag for the `DatetimeArray` option type&period;
| xref:BloombergLP/balcl/OptionType/k_DATE_ARRAY.adoc[`k&lowbar;DATE&lowbar;ARRAY`] 
| Null pointer tag for the `DateArray` option type&period;
| xref:BloombergLP/balcl/OptionType/k_DOUBLE.adoc[`k&lowbar;DOUBLE`] 
| Null pointer tag for the `Double` option type&period;
| xref:BloombergLP/balcl/OptionType/k_DOUBLE_ARRAY.adoc[`k&lowbar;DOUBLE&lowbar;ARRAY`] 
| Null pointer tag for the `DoubleArray` option type&period;
| xref:BloombergLP/balcl/OptionType/k_INT.adoc[`k&lowbar;INT`] 
| Null pointer tag for the `Int` option type&period;
| xref:BloombergLP/balcl/OptionType/k_INT64.adoc[`k&lowbar;INT64`] 
| Null pointer tag for the `Int64` option type&period;
| xref:BloombergLP/balcl/OptionType/k_INT64_ARRAY.adoc[`k&lowbar;INT64&lowbar;ARRAY`] 
| Null pointer tag for the `Int64Array` option type&period;
| xref:BloombergLP/balcl/OptionType/k_INT_ARRAY.adoc[`k&lowbar;INT&lowbar;ARRAY`] 
| Null pointer tag for the `IntArray` option type&period;
| xref:BloombergLP/balcl/OptionType/k_STRING.adoc[`k&lowbar;STRING`] 
| Null pointer tag for the `String` option type&period;
| xref:BloombergLP/balcl/OptionType/k_STRING_ARRAY.adoc[`k&lowbar;STRING&lowbar;ARRAY`] 
| Null pointer tag for the `StringArray` option type&period;
| xref:BloombergLP/balcl/OptionType/k_TIME.adoc[`k&lowbar;TIME`] 
| Null pointer tag for the `Time` option type&period;
| xref:BloombergLP/balcl/OptionType/k_TIME_ARRAY.adoc[`k&lowbar;TIME&lowbar;ARRAY`] 
| Null pointer tag for the `TimeArray` option type&period;
|===



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