Represents a version number. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...

Public Member Functions

ASPOSECPP_SHARED_API Version (int major, int minor, int build, int revision)
 Constructs an instance that represent the specified major, minor, build and revsion values. More...
 
ASPOSECPP_SHARED_API Version (int major, int minor, int build)
 Constructs an instance that represent the specified major, minor and build values. More...
 
ASPOSECPP_SHARED_API Version (int major, int minor)
 Constructs an instance that represent the specified major and values. More...
 
ASPOSECPP_SHARED_API Version (const String &version)
 Constructs an instance that represent the version number represented as a string. More...
 
ASPOSECPP_SHARED_API Version ()
 Constructs an instance that represents version number 0.0.-1.-1. More...
 
ASPOSECPP_SHARED_API int get_Major () const
 Returns the major version. More...
 
ASPOSECPP_SHARED_API int get_Minor () const
 Returns the minor version. More...
 
ASPOSECPP_SHARED_API int get_Build () const
 Returns the build number. More...
 
ASPOSECPP_SHARED_API int get_Revision () const
 Returns the revision number. More...
 
ASPOSECPP_SHARED_API int16_t get_MajorRevision () const
 Returns the high 16-bit value of the revision number. More...
 
ASPOSECPP_SHARED_API int16_t get_MinorRevision () const
 Returns the low 16-bit value of the revision number. More...
 
ASPOSECPP_SHARED_API int CompareTo (const Version &ver) const
 Compares the versions represented by the current object and the specified object. More...
 
ASPOSECPP_SHARED_API int GetHashCode () const
 Returns a hash code for the current object. More...
 
ASPOSECPP_SHARED_API bool Equals (const Version &ver) const
 Determines if the version numbers represented by the current and the specified objects are equal. More...
 
ASPOSECPP_SHARED_API String ToString () const
 Returns the string representation of the version number represented by the current object. More...
 
ASPOSECPP_SHARED_API String ToString (int fieldCount) const
 Returns the string representation of the specified number of sections of version number represented by the current object. More...
 

Static Public Member Functions

static ASPOSECPP_SHARED_API Version Parse (const String &input)
 Converts the string representation of a version number into equivalent instance of Version class. More...
 

Friends

ASPOSECPP_SHARED_API bool operator== (const Version &lhs, const Version &rhs)
 Determines if the version numbers represented by the specified Version objects are equal. More...
 
ASPOSECPP_SHARED_API bool operator!= (const Version &lhs, const Version &rhs)
 Determines if the version numbers represented by the specified Version objects are not equal. More...
 
ASPOSECPP_SHARED_API bool operator< (const Version &lhs, const Version &rhs)
 Determines the relation between the version numbers represented by the specified Version objects. More...
 
ASPOSECPP_SHARED_API bool operator<= (const Version &lhs, const Version &rhs)
 Determines the relation between the version numbers represented by the specified Version objects. More...
 
ASPOSECPP_SHARED_API bool operator> (const Version &lhs, const Version &rhs)
 Determines the relation between the version numbers represented by the specified Version objects. More...
 
ASPOSECPP_SHARED_API bool operator>= (const Version &lhs, const Version &rhs)
 Determines the relation between the version numbers represented by the specified Version objects. More...
 

Detailed Description

Represents a version number. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

Constructor & Destructor Documentation

◆ Version() [1/5]

ASPOSECPP_SHARED_API System::Version::Version ( int  major,
int  minor,
int  build,
int  revision 
)

Constructs an instance that represent the specified major, minor, build and revsion values.

Parameters
majorThe major version number
minorThe minor version numebr
buildThe build number
revisionThe revision number

◆ Version() [2/5]

ASPOSECPP_SHARED_API System::Version::Version ( int  major,
int  minor,
int  build 
)

Constructs an instance that represent the specified major, minor and build values.

Parameters
majorThe major version number
minorThe minor version numebr
buildThe build number

◆ Version() [3/5]

ASPOSECPP_SHARED_API System::Version::Version ( int  major,
int  minor 
)

Constructs an instance that represent the specified major and values.

Parameters
majorThe major version number
minorThe minor version numebr

◆ Version() [4/5]

ASPOSECPP_SHARED_API System::Version::Version ( const String version)

Constructs an instance that represent the version number represented as a string.

Parameters
versionThe string containing a version number

◆ Version() [5/5]

ASPOSECPP_SHARED_API System::Version::Version ( )

Constructs an instance that represents version number 0.0.-1.-1.

Member Function Documentation

◆ CompareTo()

ASPOSECPP_SHARED_API int System::Version::CompareTo ( const Version ver) const

Compares the versions represented by the current object and the specified object.

Parameters
verA Version object to compare with the current object
Returns
-1 if the version number represented by the current object is less than that represented by ver; 0 if the version numbers are equal; 1 if the version number represented by the current object is greater than the value represented by ver

◆ Equals()

ASPOSECPP_SHARED_API bool System::Version::Equals ( const Version ver) const

Determines if the version numbers represented by the current and the specified objects are equal.

Parameters
verA Version object to compare the current object with
Returns
True if version numbers represented by the current object and the specified object are equal, otherwise - false

◆ get_Build()

ASPOSECPP_SHARED_API int System::Version::get_Build ( ) const

Returns the build number.

◆ get_Major()

ASPOSECPP_SHARED_API int System::Version::get_Major ( ) const

Returns the major version.

◆ get_MajorRevision()

ASPOSECPP_SHARED_API int16_t System::Version::get_MajorRevision ( ) const

Returns the high 16-bit value of the revision number.

◆ get_Minor()

ASPOSECPP_SHARED_API int System::Version::get_Minor ( ) const

Returns the minor version.

◆ get_MinorRevision()

ASPOSECPP_SHARED_API int16_t System::Version::get_MinorRevision ( ) const

Returns the low 16-bit value of the revision number.

◆ get_Revision()

ASPOSECPP_SHARED_API int System::Version::get_Revision ( ) const

Returns the revision number.

◆ GetHashCode()

ASPOSECPP_SHARED_API int System::Version::GetHashCode ( ) const

Returns a hash code for the current object.

◆ Parse()

static ASPOSECPP_SHARED_API Version System::Version::Parse ( const String input)
static

Converts the string representation of a version number into equivalent instance of Version class.

Parameters
inputA string containing the string representation of a version number
Returns
An instance of Version class that represents the version number equivalent to that represented by the input

◆ ToString() [1/2]

ASPOSECPP_SHARED_API String System::Version::ToString ( ) const

Returns the string representation of the version number represented by the current object.

◆ ToString() [2/2]

ASPOSECPP_SHARED_API String System::Version::ToString ( int  fieldCount) const

Returns the string representation of the specified number of sections of version number represented by the current object.

Parameters
fieldCountThe number of sections of the version number to include in the string representation returned
Returns
The string representation of the version number represented by the current object

Friends And Related Function Documentation

◆ operator!=

ASPOSECPP_SHARED_API bool operator!= ( const Version lhs,
const Version rhs 
)
friend

Determines if the version numbers represented by the specified Version objects are not equal.

Parameters
lhsThe first comparand
rhsThe second comparand
Returns
True if the version numbers represented by lhs and rhs are not equal, otherwise - false

◆ operator<

ASPOSECPP_SHARED_API bool operator< ( const Version lhs,
const Version rhs 
)
friend

Determines the relation between the version numbers represented by the specified Version objects.

Parameters
lhsThe first comparand
rhsThe second comparand
Returns
True if the version number represented by lhs is less than the version number represented rh, otherwise - false

◆ operator<=

ASPOSECPP_SHARED_API bool operator<= ( const Version lhs,
const Version rhs 
)
friend

Determines the relation between the version numbers represented by the specified Version objects.

Parameters
lhsThe first comparand
rhsThe second comparand
Returns
True if the version number represented by lhs is less than or equal to the version number represented rh, otherwise - false

◆ operator==

ASPOSECPP_SHARED_API bool operator== ( const Version lhs,
const Version rhs 
)
friend

Determines if the version numbers represented by the specified Version objects are equal.

Parameters
lhsThe first comparand
rhsThe second comparand
Returns
True if the version numbers represented by lhs and rhs are equal, otherwise - false

◆ operator>

ASPOSECPP_SHARED_API bool operator> ( const Version lhs,
const Version rhs 
)
friend

Determines the relation between the version numbers represented by the specified Version objects.

Parameters
lhsThe first comparand
rhsThe second comparand
Returns
True if the version number represented by lhs is greater than the version number represented rh, otherwise - false

◆ operator>=

ASPOSECPP_SHARED_API bool operator>= ( const Version lhs,
const Version rhs 
)
friend

Determines the relation between the version numbers represented by the specified Version objects.

Parameters
lhsThe first comparand
rhsThe second comparand
Returns
True if the version number represented by lhs is greater than or equal to the version number represented rh, otherwise - false