[#BloombergLP-bdlat_EnumFunctions] = xref:BloombergLP.adoc[BloombergLP]::bdlat_EnumFunctions :relfileprefix: ../ :mrdocs: This `namespace` provides functions that expose "enumeration" behavior for "enumeration" types. See the component‐level documentation for more information. == Types [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlat_EnumFunctions/HasFallbackEnumerator-00.adoc[`HasFallbackEnumerator`] | This `struct` should be specialized for third‐party types that need to declare the fact that they have a fallback enumerator value. Clients that specialize this struct must ensure that if `HasFallbackEnumerator<TYPE>::value` is true, then `IsEnumeration<TYPE>::value` is also true; otherwise, the behavior is undefined. | xref:BloombergLP/bdlat_EnumFunctions/IsEnumeration-0c.adoc[`IsEnumeration`] | This `struct` should be specialized for third‐party types that need to expose "enumeration" behavior. See the component‐level documentation for further information. |=== == Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlat_EnumFunctions/bdlat_enumFromInt.adoc[`bdlat_enumFromInt`] | Default customization‐point implementation of `fromInt`. | xref:BloombergLP/bdlat_EnumFunctions/bdlat_enumFromString.adoc[`bdlat_enumFromString`] | Default customization‐point implementation of `fromString`. | xref:BloombergLP/bdlat_EnumFunctions/bdlat_enumHasFallback.adoc[`bdlat_enumHasFallback`] | Return `true` if the specified `value` supports a fallback enumerator, and `false` otherwise. The behavior is undefined if this default implementation of `bdlat_enumHasFallback` is instantiated with a template parameter `TYPE` such that `bdlat_HasFallbackEnumerator<TYPE>` is `false`. Note that this is a customization point function and should not be called directly by user code. Use `bdlat_EnumFunctions::hasFallback` instead. | xref:BloombergLP/bdlat_EnumFunctions/bdlat_enumIsFallback.adoc[`bdlat_enumIsFallback`] | Return `true` if the specified `value` is equal to a fallback enumerator, and `false` otherwise. The behavior is undefined if this default implementation of `bdlat_enumIsFallback` is instantiated with a template parameter `TYPE` such that `bdlat_HasFallbackEnumerator<TYPE>` is `false`. Note that this is a customization point function and should not be called directly by user code. Use `bdlat_EnumFunctions::isFallback` instead. | xref:BloombergLP/bdlat_EnumFunctions/bdlat_enumMakeFallback.adoc[`bdlat_enumMakeFallback`] | Load into the specified `result` the fallback enumerator value. Return 0 on success, and a non‐zero value with no effect on `result` if it does not have a fallback enumerator. The behavior is undefined if this default implementation of `bdlat_enumMakeFallback` is instantiated with a template parameter `TYPE` such that `bdlat_HasFallbackEnumerator<TYPE>` is `false`. Note that this is a customization point function and should not be called directly by user code. Use `bdlat_EnumFunctions::makeFallback` instead. | xref:BloombergLP/bdlat_EnumFunctions/bdlat_enumToInt.adoc[`bdlat_enumToInt`] | Default customization‐point implementation of `toInt`. | xref:BloombergLP/bdlat_EnumFunctions/bdlat_enumToString.adoc[`bdlat_enumToString`] | Default customization‐point implementation of `toString`. | xref:BloombergLP/bdlat_EnumFunctions/fromInt.adoc[`fromInt`] | Load into the specified `result` the enumerator matching the specified `number`. Return 0 on success, and a non‐zero value with no effect on `result` if `number` does not match any enumerator. | xref:BloombergLP/bdlat_EnumFunctions/fromString.adoc[`fromString`] | Load into the specified `result` the enumerator matching the specified `string` of the specified `stringLength`. Return 0 on success, and a non‐zero value with no effect on `result` if `string` and `stringLength` do not match any enumerator. | xref:BloombergLP/bdlat_EnumFunctions/hasFallback.adoc[`hasFallback`] | Return `true` if the specified `value` supports a fallback enumerator, and `false` otherwise. | xref:BloombergLP/bdlat_EnumFunctions/isFallback.adoc[`isFallback`] | Return `true` if the specified `value` is equal to a fallback enumerator, and `false` otherwise. | xref:BloombergLP/bdlat_EnumFunctions/makeFallback.adoc[`makeFallback`] | Load into the specified `result` the fallback enumerator value. Return 0 on success, and a non‐zero value with no effect on `result` if it does not have a fallback enumerator. | xref:BloombergLP/bdlat_EnumFunctions/toInt.adoc[`toInt`] | Load into the specified `result` the integer representation of the enumerator value held by the specified `value`. | xref:BloombergLP/bdlat_EnumFunctions/toString.adoc[`toString`] | Load into the specified `result` the string representation of the enumerator value held by the specified `value`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#