![]() |
glbinding
2.1.1.000000000000
A C++ binding for the OpenGL API, generated using the gl.xml specification.
|
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>
Public Member Functions | |
Version () | |
Default constructor, resulting in an invalid Version object. | |
Version (unsigned char majorVersion, unsigned char minorVersion) | |
Constructor for a Version object with the given major and minor version. | |
Version (const Version &version) | |
Copy constructor. | |
Version (Version &&version) | |
Move constructor. | |
Version & | operator= (const Version &version) |
The assignment operator of another Version. | |
Version & | operator= (Version &&version) |
The assignment operator of another Version that is moved from. | |
bool | operator< (const Version &version) const |
Operator for lesser comparison to another Version. | |
bool | operator> (const Version &version) const |
Operator for greater comparison to another Version. | |
bool | operator== (const Version &version) const |
Operator for equal comparison to another Version. | |
bool | operator!= (const Version &version) const |
Operator for unequal comparison to another Version. | |
bool | operator>= (const Version &version) const |
Operator for greater equal comparison to another Version. | |
bool | operator<= (const Version &version) const |
Operator for lesser equal comparison to another Version. | |
unsigned char | majorVersion () const |
Accessor for the major version. | |
unsigned char | minorVersion () const |
Accessor for the minor version. | |
std::string | toString () const |
Create a string representing the Version using the scheme "<majorVersion>.<minorVersion>". | |
bool | isValid () const |
Check for validity of this Version, based on the list of all valid OpenGL feautures. | |
bool | isNull () const |
Check if the Version was constructed using the default constructor. | |
const Version & | nearest () const |
Returns the nearest valid Version to this Version. | |
Static Public Member Functions | |
static const std::set< Version > & | versions () |
Accessor for the list of all valid Versions (OpenGL features). | |
static const std::set< Version > | preceeding (const Version &version) |
Returns the list of all valid, previous Versions (Features) known by the gl.xml. | |
static const std::set< Version > | succeeding (const Version &version) |
Returns the list of all valid, subsequent Versions (Features) known by the gl.xml. | |
static const Version & | latest () |
Return the most current valid Version. | |
Protected Attributes | |
unsigned char | m_major |
The major version. | |
unsigned char | m_minor |
The minor version. | |
Static Protected Attributes | |
static const std::set< Version > | s_validVersions |
The set of all valid versions. | |
static const Version | s_latest |
The most current version. | |
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.
Constructor for a Version object with the given major and minor version.
[in] | majorVersion | The major version |
[in] | minorVersion | The minor version |
Copy constructor.
[in] | version | The Version the data is used from |
glbinding::Version::Version | ( | Version && | version | ) |
Move constructor.
[in] | version | The Version the data is moved from |
Accessor for the major version.
Accessor for the minor version.
std::string glbinding::Version::toString | ( | ) | const |
Create a string representing the Version using the scheme "<majorVersion>.<minorVersion>".
bool glbinding::Version::isValid | ( | ) | const |
Check for validity of this Version, based on the list of all valid OpenGL feautures.
bool glbinding::Version::isNull | ( | ) | const |
Accessor for the list of all valid Versions (OpenGL features).
Returns the list of all valid, previous Versions (Features) known by the gl.xml.
Returns the list of all valid, subsequent Versions (Features) known by the gl.xml.
The set of all valid versions.