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

Public Member Functions
TVersion()
TVersion(TInt, TInt, TInt)
IMPORT_C TVersionNameName()
Public Attributes
TInt16 iBuild
TInt8 iMajor
TInt8 iMinor

Constructor & Destructor Documentation

TVersion()

IMPORT_CTVersion()

Default constructor.

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

TVersion(TInt, TInt, TInt)

IMPORT_CTVersion(TIntaMajor,
TIntaMinor,
TIntaBuild
)

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 aMajorThe major version number. This must be a number in the range 0 to 127.
TInt aMinorThe minor version number. This must be a number in the range 0 to 99.
TInt aBuildThe build number. This must be a number in the range 0 to 32,767.

Member Functions Documentation

Name()

IMPORT_C TVersionNameName()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.