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::Version::Version |
( |
| ) |
|
Default constructor, resulting in an invalid Version object.
glbinding::Version::Version |
( |
unsigned char |
majorVersion, |
|
|
unsigned char |
minorVersion |
|
) |
| |
Constructor for a Version object with the given major and minor version.
- Parameters
-
[in] | majorVersion | The major version |
[in] | minorVersion | The minor version |
glbinding::Version::Version |
( |
const Version & |
version | ) |
|
Copy constructor.
- Parameters
-
[in] | version | The Version the data is used from |
glbinding::Version::Version |
( |
Version && |
version | ) |
|
Move constructor.
- Parameters
-
[in] | version | The Version the data is moved from |
The assignment operator of another Version.
- Parameters
-
[in] | version | The version the data is used from |
- Returns
- The reference to this Version
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
bool glbinding::Version::operator< |
( |
const Version & |
version | ) |
const |
Operator for lesser comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- true iff this Version is lesser than the other Version
bool glbinding::Version::operator> |
( |
const Version & |
version | ) |
const |
Operator for greater comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- true iff this Version is greater than the other Version
bool glbinding::Version::operator== |
( |
const Version & |
version | ) |
const |
Operator for equal comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- true iff this Version is equal to the other Version
bool glbinding::Version::operator!= |
( |
const Version & |
version | ) |
const |
Operator for unequal comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- true iff this Version is not equal to the other Version
bool glbinding::Version::operator>= |
( |
const Version & |
version | ) |
const |
Operator for greater equal comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- true iff this Version is greater or equal than the other Version
bool glbinding::Version::operator<= |
( |
const Version & |
version | ) |
const |
Operator for lesser equal comparison to another Version.
- Parameters
-
[in] | version | The Version to compare to |
- Returns
- true iff this Version is lesser or equal than the other Version
unsigned char glbinding::Version::majorVersion |
( |
| ) |
const |
Accessor for the major version.
- Returns
- the major version
unsigned char glbinding::Version::minorVersion |
( |
| ) |
const |
Accessor for the minor version.
- Returns
- the minor version
std::string glbinding::Version::toString |
( |
| ) |
const |
Create a string representing the Version using the scheme "<majorVersion>.<minorVersion>".
- Returns
- The version as string, "-.-" iff the string is invalid.
bool glbinding::Version::isValid |
( |
| ) |
const |
Check for validity of this Version, based on the list of all valid OpenGL feautures.
- Returns
- true iff the version is valid (i.e., if this version is present in the set of valid versions).
bool glbinding::Version::isNull |
( |
| ) |
const |
Check if the Version was constructed using the default constructor.
- Returns
- true iff the major version is 0.
This method can be used to check if this Version was constructed using the default constructor or is otherwise malformed.
const Version& glbinding::Version::nearest |
( |
| ) |
const |
static const std::set<Version>& glbinding::Version::versions |
( |
| ) |
|
|
static |
Accessor for the list of all valid Versions (OpenGL features).
- Returns
- the set of all valid Versions (= released OpenGL Features).
static const std::set<Version> glbinding::Version::preceeding |
( |
const Version & |
version | ) |
|
|
static |
Returns the list of all valid, previous Versions (Features) known by the gl.xml.
- Returns
- The list of all valid Versions (Features) with a version number below the provided one.
static const std::set<Version> glbinding::Version::succeeding |
( |
const Version & |
version | ) |
|
|
static |
Returns the list of all valid, subsequent Versions (Features) known by the gl.xml.
- Returns
- The list of all valid Versions (Features) with a version number above the provided one.
static const Version& glbinding::Version::latest |
( |
| ) |
|
|
static |
Return the most current valid Version.
- Returns
- the most current Version from the set of all valid versions.
unsigned char glbinding::Version::m_major |
|
protected |
unsigned char glbinding::Version::m_minor |
|
protected |
const std::set<Version> glbinding::Version::s_validVersions |
|
staticprotected |
The set of all valid versions.
const Version glbinding::Version::s_latest |
|
staticprotected |
The most current version.
The documentation for this class was generated from the following file: