Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::Version Struct Reference

Define the content version with major and minor. More...

Collaboration diagram for gem::Version:

Classes

struct  Fields
 Struct to hold the major and minor version, each as a separate 16-bit (short) int. More...

Public Member Functions

 Version (int aVersion=0)
 Constructor setting version to 0 if none passed in, otherwise, first 16 bits of the 32 bit int, from left to right, are an int holding the major version, and the other 16 bits are an int holding the minor version.
 Version (short int aMajor, short int aMinor)
 Constructor setting major and minor version using the values passed in.
bool operator< (const Version &v) const
 Returns true if version passed in is greater than this version.
bool operator!= (const Version &v) const
 Returns true if version passed in is not equal to this version.

Public Attributes

union { 
   int   version 
 32-bit int to store version, 1 16-bit int for each of major,minor.
   Fields   f 
 Bitfield to access each individual major,minor value as a 16-bit int.
}; 

Detailed Description

Define the content version with major and minor.

Constructor & Destructor Documentation

◆ Version() [1/2]

gem::Version::Version ( int aVersion = 0)
inline

Constructor setting version to 0 if none passed in, otherwise, first 16 bits of the 32 bit int, from left to right, are an int holding the major version, and the other 16 bits are an int holding the minor version.

Parameters
aVersionVersion number to set.

◆ Version() [2/2]

gem::Version::Version ( short int aMajor,
short int aMinor )
inline

Constructor setting major and minor version using the values passed in.

Parameters
aMajorMajor version number.
aMinorMinor version number.

Member Function Documentation

◆ operator!=()

bool gem::Version::operator!= ( const Version & v) const
inline

Returns true if version passed in is not equal to this version.

Parameters
vVersion to compare to.
Returns
True if version passed in is not equal to this version, false otherwise.

◆ operator<()

bool gem::Version::operator< ( const Version & v) const
inline

Returns true if version passed in is greater than this version.

Parameters
vVersion to compare to.
Returns
True if version passed in is greater than this version, false otherwise.