BDE 4.14.0 Production release
|
Provide functions to return BDEX version information for types.
This component provides a namespace, bslx::VersionFunctions
, that contains functions for determining the BDEX version number for types.
This namespace defines the maxSupportedBdexVersion
function, which is overloaded to return a predetermined value, k_NO_VERSION
, also defined in this namespace, for each of the fundamental types, enum
types, and bsl::string
. For bsl::vector
, the maxSupportedBdexVersion
function returns 1 if the vector is parameterized on one of the three types mentioned above. Otherwise, the version number returned is the same as that returned for bsl::vector::value_type
. For BDEX-compliant types, the function returns the BDEX version number returned by the maxSupportedBdexVersion
method provided by that type.
In general, this component is used by higher-level bslx
components to query the version number for types.
This section illustrates intended use of this component.
This component may be used by clients to query the version number for types in a convenient manner. First, define an enum
, my_Enum
:
Then, define a BDEX-compliant class, my_Class
:
Finally, verify the value returned by maxSupportedBdexVersion
for some fundamental types, my_Enum
, and my_Class
with an arbitrary versionSelector
: