ADTF  3.18.2
cVersion

Wrapper class to work with POD type tVersion. More...

Public Types

typedef tVersion::value_type value_type
 Common value type of version numbers.
 

Public Member Functions

 cVersion (tVersion sVersion)
 Constructor. More...
 
cVersionSetMajor (value_type i_nMajor)
 Set major number of the version. More...
 
cVersionSetMinor (value_type i_nMinor)
 Set minor number of the version. More...
 
cVersionSetPatch (value_type i_nPatch)
 Set patch number of the version. More...
 
cVersionSetTweak (value_type i_nTweak)
 Set tweak number of the version. More...
 
value_type GetMajor () const
 Get major number of the version. More...
 
value_type GetMinor () const
 Get minor number of the version. More...
 
value_type GetPatch () const
 Get patch number of the version. More...
 
value_type GetTweak () const
 Get tweak number of the version. More...
 
const tVersionGetVersion () const
 Get entire version info. More...
 
tResult FromString (const cString &i_strVersion)
 Create the version object from a string. More...
 
cString ToString () const
 Create the string representation of the currently held version information. More...
 

Private Attributes

tVersion m_sVersion
 version type to wrap
 

Detailed Description

Wrapper class to work with POD type tVersion.

Definition at line 29 of file versiontype.h.

Constructor & Destructor Documentation

◆ cVersion()

cVersion ( tVersion  sVersion)

Constructor.

Parameters
[in]sVersionThe version information to use this wrapper with.

Member Function Documentation

◆ FromString()

tResult FromString ( const cString i_strVersion)

Create the version object from a string.

Parameters
[in]i_strVersionString representation of the version. Must have format "major[.minor[.patch[.tweak]]]"
Returns
Standard error type
Return values
ERR_NOERROREverything went fine, version information created from string
ERR_UNKNOWN_FORMATString representation of the version could not be recognized

◆ GetMajor()

value_type GetMajor ( ) const

Get major number of the version.

Returns
Major number

◆ GetMinor()

value_type GetMinor ( ) const

Get minor number of the version.

Returns
Minor number

◆ GetPatch()

value_type GetPatch ( ) const

Get patch number of the version.

Returns
Patch number

◆ GetTweak()

value_type GetTweak ( ) const

Get tweak number of the version.

Returns
Tweak number

◆ GetVersion()

const tVersion& GetVersion ( ) const

Get entire version info.

Returns
Wrapped version object

◆ SetMajor()

cVersion& SetMajor ( value_type  i_nMajor)

Set major number of the version.

Parameters
[in]i_nMajorThe major number
Returns
*this

◆ SetMinor()

cVersion& SetMinor ( value_type  i_nMinor)

Set minor number of the version.

Parameters
[in]i_nMinorThe minor number
Returns
*this

◆ SetPatch()

cVersion& SetPatch ( value_type  i_nPatch)

Set patch number of the version.

Parameters
[in]i_nPatchThe patch number
Returns
*this

◆ SetTweak()

cVersion& SetTweak ( value_type  i_nTweak)

Set tweak number of the version.

Parameters
[in]i_nTweakThe tweak number
Returns
*this

◆ ToString()

cString ToString ( ) const

Create the string representation of the currently held version information.

Returns
String representation of the version in format "major.minor.patch.tweak"