Quick Links:

bal | bbl | bdl | bsl

Namespaces

Component bdlscm_version
[Package bdlscm]

Provide source control management (versioning) information. More...

Namespaces

namespace  bdlscm

Detailed Description

Outline
Purpose:
Provide source control management (versioning) information.
Classes:
bdlscm::Version namespace for RCS and SCCS versioning information for bdl
Description:
This component provides source control management (versioning) information for the bdl package group. In particular, this component embeds RCS-style and SCCS-style version strings in binary executable files that use one or more components from the bdl package group. This version information may be extracted from binary files using common UNIX utilities (e.g., ident and what). In addition, the version static member function in the bdlscm::Version struct can be used to query version information for the bdl package group at runtime. The following usage examples illustrate these two basic capabilities.
Note that unless the version method will be called, it is not necessary to #include this component header file to get bdl version information embedded in an executable. It is only necessary to use one or more bdl components (and, hence, link in the bdl library).
Usage:
This section illustrates intended use of this component.
Example 1: Embedding Version Information:
The version of the bdl package group linked into a program can be obtained at runtime using the version static member function as follows:
        #include <bdlscm_version.h>

        assert(0 != bdlscm::Version::version());

        bsl::cout << "BDL version: " << bdlscm::Version::version()
                  << bsl::endl;
Output similar to the following will be printed to stdout:
        BDL version: BLP_LIB_BDE_BDL_0.01.0
The "0.01.0" portion of the string distinguishes different versions of the bdl package group.
Example 2: Accessing the Embedded Version information:
The versioning information embedded into a binary file by this component can be examined under UNIX using several well-known utilities. For example:
        $ ident a.out
        a.out:
             $Id: BLP_LIB_BDE_BDL_0.01.0 $

        $ what a.out | grep BDL
                BLP_LIB_BDE_BDL_0.01.0

        $ strings a.out | grep BDL
        $Id: BLP_LIB_BDE_BDL_0.01.0 $
        @(#)BLP_LIB_BDE_BDL_0.01.0
        BLP_LIB_BDE_BDL_0.01.0
Note that ident and what typically will display many version strings unrelated to bdl depending on the libraries used by a.out.