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.
Public Member Functions | |
---|---|
TVersion () | |
TVersion ( TInt , TInt , TInt ) | |
IMPORT_C TVersionName | Name () |
Public Attributes | |
---|---|
TInt16 | iBuild |
TInt8 | iMajor |
TInt8 | iMinor |
IMPORT_C | TVersion | ( | ) |
Default constructor.
It sets the major, minor and build numbers to zero.
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.
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.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.