This namespace provides functions that expose "enumeration" behavior for "enumeration" types. See the component‐level documentation for more information.

Types

Name

Description

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.

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

Name

Description

bdlat_enumFromInt

Default customization‐point implementation of fromInt.

bdlat_enumFromString

Default customization‐point implementation of fromString.

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.

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.

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.

bdlat_enumToInt

Default customization‐point implementation of toInt.

bdlat_enumToString

Default customization‐point implementation of toString.

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.

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.

hasFallback

Return true if the specified value supports a fallback enumerator, and false otherwise.

isFallback

Return true if the specified value is equal to a fallback enumerator, and false otherwise.

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.

toInt

Load into the specified result the integer representation of the enumerator value held by the specified value.

toString

Load into the specified result the string representation of the enumerator value held by the specified value.

Created with MrDocs