TVersion Class Reference

class TVersion

Contains version information.

A version is defined by a set of three numbers:

1. the major version number, ranging from 0 to 127, inclusive

2. the minor version number, ranging from 0 to 99 inclusive

3. the build number, ranging from 0 to 32767 inclusive.

The class provides a constructor for setting all three numbers. It also provides a member function to build a character representation of this information in a TVersionName descriptor.

TVersionName

Constructor & Destructor Documentation

TVersion()

IMPORT_C TVersion ( )

Default constructor.

It sets the major, minor and build numbers to zero.

TVersion(TInt, TInt, TInt)

IMPORT_C TVersion ( TInt aMajor,
TInt aMinor,
TInt aBuild
)

Constructs the object with the specified major version number, the minor version number and the build number.

Note that the constructor does not check that the values passed are within the specified ranges. As the parameters are TInt types, care must be taken to ensure that values passed do not exceed the specified maxima, otherwise they will be interpreted as negative values.

Parameters

TInt aMajor The major version number. This must be a number in the range 0 to 127.
TInt aMinor The minor version number. This must be a number in the range 0 to 99.
TInt aBuild The build number. This must be a number in the range 0 to 32,767.

Member Functions Documentation

Name()

IMPORT_C TVersionName Name ( ) const

Gets a descriptor buffer containing the formatted character representation of the version information.

The general format of the representation is: xxx.yy(zzzzz)

where:

1. xxx is the major version number; depending on the value, this may have a length of one, two or three characters.

2. yy is the minor version number; this is always two characters, padded with a leading zero, if necessary.

3. zzzzz is the build number; depending on the value, this may have a length of one to 5 characters.

Note that if the object is constructed with values that exceed the permitted range, they will appear negative in their formatted character representation.

Member Data Documentation

TInt16 iBuild

TInt16 iBuild

The build number.

TInt8 iMajor

TInt8 iMajor

The major version number.

TInt8 iMinor

TInt8 iMinor

The minor version number.