casa  $Rev:20696$
Static Public Member Functions
casa::VersionInfo Class Reference

Version information for AIPS++. More...

#include <version.h>

List of all members.

Static Public Member Functions

static int majorVersion ()
 Major version of AIPS++, changes about twice a year.
static int minorVersion ()
 Minor version of AIPS++, changes about three times a day (every exhale).
static int patch ()
 Patch number of this release.
static const char * date ()
 String representation of the date when this release was created (when "exhale" was run).
static const char * info ()
 Extra information about this release, e.g.
static void report (std::ostream &os)
 Summarize the above into an ostream.

Detailed Description

Version information for AIPS++.

Intended use:

Public interface

Review Status

Reviewed By:
nkilleen
Date Reviewed:
1996/10/24
Test programs:
tversion

Synopsis

VersionInfo is a small class that reports information on the version of AIPS++ that an executable was linked with. Normally an application programmer won't use this class directly, rather it will be used by the ``Tasking'' system which will report this information in a standard way.

The available information is:

Additionally, there is a report() member function which summarizes the above to an ostream.

When released to end users, the minor number is always 0. On the other hand, along the development path the patch number is always zero. The report() member function takes advantage of this to reformat the version information to be more in line with what people are used to. For example, 07.247.00 becomes "0.7 (build 247)" and 08.000.5 becomes 0.8.5. Note that major version 10 will thus be reported as version 1.0

The version information is maintained automatically by "exhale" and is made available at link time by the make system.

Example

If you knew that a format change occurred at release 10.0 you could write code like:

    if (VersionInfo::majorVersion() >= 10) {
       ... process the new way
    } else {
       ... process the old way
    }

Of course generally it would be better to provide a conversion program for the persistent data, rather than filling applications with tests like this.

Motivation

It is important for bug-reporting and other such purposes to be able to uniquely identify the version of AIPS++ that some problem occurs in.

To Do

Definition at line 110 of file version.h.


Member Function Documentation

const char * casa::VersionInfo::date ( ) [inline, static]

String representation of the date when this release was created (when "exhale" was run).

Definition at line 154 of file version.h.

const char * casa::VersionInfo::info ( ) [inline, static]

Extra information about this release, e.g.

"beta release."

Definition at line 160 of file version.h.

int casa::VersionInfo::majorVersion ( ) [inline, static]

Major version of AIPS++, changes about twice a year.

Definition at line 136 of file version.h.

int casa::VersionInfo::minorVersion ( ) [inline, static]

Minor version of AIPS++, changes about three times a day (every exhale).

Definition at line 142 of file version.h.

int casa::VersionInfo::patch ( ) [inline, static]

Patch number of this release.

Changes when a bug-fix patch is created.

Definition at line 148 of file version.h.

static void casa::VersionInfo::report ( std::ostream &  os) [static]

Summarize the above into an ostream.

Note that an ostringstream can be converted to a String via a constructor. This information is NOT prepended with "AIPS++ version:" or anything like that. You may wish to add this yourself. The date is also not included.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines