Privacy and Security Notice

Archived Messages for CDEV_1997@cebaf.gov: Re: Version information of cdev

Re: Version information of cdev

Walt Akers (akers@CEBAF.GOV)
Mon, 11 Aug 1997 10:21:10 -0400 (EDT)

>
> Hi, all:
> I think it is the time to add version information to cdev
> that callers can retrieve. By doing this way, programmers can be
> able to do conditional compilation on their applications or services.
> In addition, cdevSystem can find out version information of loaded
> services at run time. I created a simple header file called
> cdevVersion.h which can be included in the cdevSystem.h and cdev.h.
> If there is no objection, I will put this file into CVS. The following
> is the cdevVersion.h
>
> #ifndef _CDEV_VERSION_H
> #define _CDEV_VERSION_H
>
> #define CDEV_MAJOR_VERS 1
> #define CDEV_MINOR_VERS 6
> #define CDEV_REVISION 1
>
> #define CDEV_VERSION (CDEV_MAJOR_VERS*10000 + CDEV_MINOR_VERS*100 + CDEV_REVISION)
>
> #define CDEV_VERSION_STRING "CDEV Version 1.6.1"
>
> #endif

Wait!
cdevSystem already has a constant CDEV_MAJOR_VERSION and
CDEV_MINOR_VERSION that are const values that can be retrieved by
any application.

These were original enum values, but have since been changed to
constant strings to allow any number of variations (such as major and
minor revisions and release letters) to be added to the minor version.

I have also changed the cdevDirectory to load shared libraries and
DDL files based on these values.

Because they are static members, the major and minor version can be
accessed from the cdevSystem directly:

cdevSystem::CDEV_MAJOR_VERSION
cdevSystem::CDEV_MINOR_VERSION

Walt

--
=============================================================
Walt Akers Voice: (757)269-7669 E-Mail: akers@cebaf.gov
Thomas Jefferson National Accelerator Facility
12000 Jefferson Avenue, MS 16A
Newport News, Va 23606
=============================================================