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

This `class` describes an option&apos;s type, linked variable, and constraint&period;

== Synopsis

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

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

== Description

This is an attribute class that describes the type, the variable to be linked, and the constraint on an option&period; Note that the constraint type is opaque, but it is possible to apply the constraint to an element of the same type as the option and see whether it is valid (using the `satisfiesConstraint` methods of `TypeInfoUtil`)&period;

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/TypeInfo/ParseInputSource.adoc[`ParseInputSource`] 
| Enumerate the sources of input when parsing an option type&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/TypeInfo/2constructor-0e4d.adoc[`TypeInfo`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/balcl/TypeInfo/2destructor.adoc[`&#126;TypeInfo`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/balcl/TypeInfo/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/TypeInfo/allocator.adoc[`allocator`] 
| Return the allocator used by this object to supply memory&period;
| xref:BloombergLP/balcl/TypeInfo/constraint.adoc[`constraint`] 
| Return a shared pointer to the constraint associated with the described option&period;
| xref:BloombergLP/balcl/TypeInfo/isOptionalLinkedVariable.adoc[`isOptionalLinkedVariable`] 
| Return `true` if the described option has a linked variable and that variable is a `bsl&colon;&colon;optional` object, and `false` otherwise&period;
| xref:BloombergLP/balcl/TypeInfo/linkedVariable.adoc[`linkedVariable`] 
| Return the address of the modifiable variable linked to the described option, or 0 if no variable is linked&period;
| xref:BloombergLP/balcl/TypeInfo/print.adoc[`print`] 
| Format this object to the specified output `stream` and return a reference to `stream`&period;
| xref:BloombergLP/balcl/TypeInfo/resetConstraint.adoc[`resetConstraint`] 
| Reset this object so that it no longer has a constraint&period;
| xref:BloombergLP/balcl/TypeInfo/resetLinkedVariableAndConstraint.adoc[`resetLinkedVariableAndConstraint`] 
| Reset this object so that it has neither a linked variable nor a constraint&period;
| xref:BloombergLP/balcl/TypeInfo/setConstraint-02.adoc[`setConstraint`] 
| `setConstraint` overloads
| xref:BloombergLP/balcl/TypeInfo/setLinkedVariable-012.adoc[`setLinkedVariable`] 
| `setLinkedVariable` overloads
| xref:BloombergLP/balcl/TypeInfo/type.adoc[`type`] 
| Return the type of the described option&period; Note that the option is a flag if it is of type `OptionType&colon;&colon;e&lowbar;BOOL`&period;
| xref:BloombergLP/balcl/TypeInfo/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;TypeInfo, HasPrintMethod&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/TypeInfo/d_allocator_p.adoc[`d&lowbar;allocator&lowbar;p`] 
| memory allocator (held)
| xref:BloombergLP/balcl/TypeInfo/d_constraint_p.adoc[`d&lowbar;constraint&lowbar;p`] 
| constraint on the option value
| xref:BloombergLP/balcl/TypeInfo/d_elemType.adoc[`d&lowbar;elemType`] 
| type of the option value
| xref:BloombergLP/balcl/TypeInfo/d_isOptionalLinkedVariable.adoc[`d&lowbar;isOptionalLinkedVariable`] 
| `true` if the linked variable is a `bsl&colon;&colon;optional` object
| xref:BloombergLP/balcl/TypeInfo/d_linkedVariable_p.adoc[`d&lowbar;linkedVariable&lowbar;p`] 
| Address of the variable linked to this option value (held, not owned)&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balcl/operator_not_eq-04.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` do not have the same value&period;
| xref:BloombergLP/balcl/operator_eq-07.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` have the same value&period;
|===


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