[#BloombergLP-balcl-TypeInfo] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::TypeInfo :relfileprefix: ../../ :mrdocs: This `class` describes an option's type, linked variable, and constraint. == Synopsis Declared in `<balcl_typeinfo.h>` [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. 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`). == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balcl/TypeInfo/ParseInputSource.adoc[`ParseInputSource`] | Enumerate the sources of input when parsing an option type. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balcl/TypeInfo/2constructor-0e4d.adoc[`TypeInfo`] [.small]#[constructor]# | Constructors | xref:BloombergLP/balcl/TypeInfo/2destructor.adoc[`~TypeInfo`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/balcl/TypeInfo/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/TypeInfo/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/balcl/TypeInfo/constraint.adoc[`constraint`] | Return a shared pointer to the constraint associated with the described option. | xref:BloombergLP/balcl/TypeInfo/isOptionalLinkedVariable.adoc[`isOptionalLinkedVariable`] | Return `true` if the described option has a linked variable and that variable is a `bsl::optional` object, and `false` otherwise. | 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. | xref:BloombergLP/balcl/TypeInfo/print.adoc[`print`] | Format this object to the specified output `stream` and return a reference to `stream`. | xref:BloombergLP/balcl/TypeInfo/resetConstraint.adoc[`resetConstraint`] | Reset this object so that it no longer has a constraint. | xref:BloombergLP/balcl/TypeInfo/resetLinkedVariableAndConstraint.adoc[`resetLinkedVariableAndConstraint`] | Reset this object so that it has neither a linked variable nor a constraint. | 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. Note that the option is a flag if it is of type `OptionType::e_BOOL`. | xref:BloombergLP/balcl/TypeInfo/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<TypeInfo, HasPrintMethod>`] | Nested trait declaration for `bslma::UsesBslmaAllocator`. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balcl/TypeInfo/d_allocator_p.adoc[`d_allocator_p`] | memory allocator (held) | xref:BloombergLP/balcl/TypeInfo/d_constraint_p.adoc[`d_constraint_p`] | constraint on the option value | xref:BloombergLP/balcl/TypeInfo/d_elemType.adoc[`d_elemType`] | type of the option value | xref:BloombergLP/balcl/TypeInfo/d_isOptionalLinkedVariable.adoc[`d_isOptionalLinkedVariable`] | `true` if the linked variable is a `bsl::optional` object | xref:BloombergLP/balcl/TypeInfo/d_linkedVariable_p.adoc[`d_linkedVariable_p`] | Address of the variable linked to this option value (held, not owned). |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balcl/operator_not_eq-04.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` do not have the same value. | xref:BloombergLP/balcl/operator_eq-07.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` have the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#