The Version class represents an OpenGL feature, consisting of majow version and minor version, excluding the profile information.
More...
#include <glbinding/include/glbinding/Version.h>
The Version class represents an OpenGL feature, consisting of majow version and minor version, excluding the profile information.
This instance can represent both any officially released OpenGL feature and other combinations of major and minar version and provides methods for validity checking and comparison
Example code:
GLBINDING_CONSTEXPR glbinding::Version::Version |
( |
| ) |
|
|
inline |
Default constructor, resulting in an invalid Version object.
GLBINDING_CONSTEXPR glbinding::Version::Version |
( |
unsigned char |
majorVersion, |
|
|
unsigned char |
minorVersion |
|
) |
| |
|
inline |
Constructor for a Version object with the given major and minor version.
- Parameters
-
[in] | majorVersion | The major version |
[in] | minorVersion | The minor version |
GLBINDING_CONSTEXPR glbinding::Version::Version |
( |
const Version & |
version | ) |
|
|
inline |
Copy constructor.
- Parameters
-
[in] | version | The Version the data is used from |
glbinding::Version::Version |
( |
Version && |
version | ) |
|
|
inline |
Move constructor.
- Parameters
-
[in] | version | The Version the data is moved from |
GLBINDING_CONSTEXPR unsigned char glbinding::Version::majorVersion |
( |
| ) |
const |
|
inline |
Accessor for the major version.
- Returns
- the major version
References m_major.
GLBINDING_CONSTEXPR unsigned char glbinding::Version::minorVersion |
( |
| ) |
const |
|
inline |
Accessor for the minor version.
- Returns
- the minor version
References m_major, and m_minor.
std::string glbinding::Version::toString |
( |
| ) |
const |
|
inline |
Create a string representing the Version using the scheme "<majorVersion>.<minorVersion>".
- Returns
- The version as string, "-.-" iff the string is invalid
References isNull(), m_major, and m_minor.
GLBINDING_CONSTEXPR bool glbinding::Version::isNull |
( |
| ) |
const |
|
inline |
Check if the Version was constructed using the default constructor.
- Returns
- 'true' if the major version is 0, else 'false'
References m_major.
Referenced by toString().
The assignment operator of another Version.
- Parameters
-
[in] | version | The version the data is used from |
- Returns
- The reference to this Version
References m_major, and m_minor.
The assignment operator of another Version that is moved from.
- Parameters
-
[in] | version | The version the data is moved from |
- Returns
- The reference to this Version
References m_major, and m_minor.
GLBINDING_CONSTEXPR bool glbinding::Version::operator< |
( |
const Version & |
version | ) |
const |
|
inline |
GLBINDING_CONSTEXPR bool glbinding::Version::operator> |
( |
const Version & |
version | ) |
const |
|
inline |
Operator for greater comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- 'true' if this Version is greater than the other Version, else 'false'
References m_major, and m_minor.
GLBINDING_CONSTEXPR bool glbinding::Version::operator== |
( |
const Version & |
version | ) |
const |
|
inline |
GLBINDING_CONSTEXPR bool glbinding::Version::operator!= |
( |
const Version & |
version | ) |
const |
|
inline |
Operator for unequal comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- 'true' if this Version is not equal to the other Version, else 'false'
References m_major, and m_minor.
GLBINDING_CONSTEXPR bool glbinding::Version::operator>= |
( |
const Version & |
version | ) |
const |
|
inline |
Operator for greater equal comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- 'true' if this Version is greater or equal than the other Version, else 'false'
GLBINDING_CONSTEXPR bool glbinding::Version::operator<= |
( |
const Version & |
version | ) |
const |
|
inline |
Operator for lesser equal comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- 'true' if this Version is lesser or equal than the other Version, else 'false'
unsigned char glbinding::Version::m_major |
|
protected |
unsigned char glbinding::Version::m_minor |
|
protected |
The documentation for this class was generated from the following files: