The Version class represents an OpenGL feature, consisting of major version and minor version, excluding the profile information.
More...
#include <glbinding/Version.h>
|
GLBINDING_CONSTEXPR | Version () |
| Default constructor, resulting in an invalid Version object.
|
|
GLBINDING_CONSTEXPR | Version (unsigned char majorVersion, unsigned char minorVersion) |
| Constructor for a Version object with the given major and minor version.
|
|
GLBINDING_CONSTEXPR | Version (const Version &version) |
| Copy constructor.
|
|
| Version (Version &&version) |
| Move constructor.
|
|
GLBINDING_CONSTEXPR unsigned char | majorVersion () const |
| Accessor for the major version.
|
|
GLBINDING_CONSTEXPR unsigned char | minorVersion () const |
| Accessor for the minor version.
|
|
std::string | toString () const |
| Create a string representing the Version using the scheme "<majorVersion>.<minorVersion>".
|
|
GLBINDING_CONSTEXPR bool | isNull () const |
| Check if the Version was constructed using the default 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.
|
|
GLBINDING_CONSTEXPR bool | operator< (const Version &version) const |
| Operator for lesser comparison to another Version.
|
|
GLBINDING_CONSTEXPR bool | operator> (const Version &version) const |
| Operator for greater comparison to another Version.
|
|
GLBINDING_CONSTEXPR bool | operator== (const Version &version) const |
| Operator for equal comparison to another Version.
|
|
GLBINDING_CONSTEXPR bool | operator!= (const Version &version) const |
| Operator for unequal comparison to another Version.
|
|
GLBINDING_CONSTEXPR bool | operator>= (const Version &version) const |
| Operator for greater equal comparison to another Version.
|
|
GLBINDING_CONSTEXPR bool | operator<= (const Version &version) const |
| Operator for lesser equal comparison to another Version.
|
|
|
unsigned char | m_major |
| The major version.
|
|
unsigned char | m_minor |
| The minor version.
|
|
The Version class represents an OpenGL feature, consisting of major version and minor version, excluding the profile information.
This instance can represent both any officially released OpenGL feature and other combinations of major and minor version, and provides methods for validity checking and comparison
Example code:
{
}
The Version class represents an OpenGL feature, consisting of major version and minor version,...
Definition Version.h:34
static Version version()
Queries the OpenGL feature number.
◆ Version() [1/4]
GLBINDING_CONSTEXPR glbinding::Version::Version |
( |
| ) |
|
|
inline |
Default constructor, resulting in an invalid Version object.
◆ Version() [2/4]
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 |
◆ Version() [3/4]
GLBINDING_CONSTEXPR glbinding::Version::Version |
( |
const Version & | version | ) |
|
|
inline |
Copy constructor.
- Parameters
-
[in] | version | The Version the data is used from |
◆ Version() [4/4]
glbinding::Version::Version |
( |
Version && | version | ) |
|
|
inline |
Move constructor.
- Parameters
-
[in] | version | The Version the data is moved from |
◆ majorVersion()
GLBINDING_CONSTEXPR unsigned char glbinding::Version::majorVersion |
( |
| ) |
const |
|
inline |
Accessor for the major version.
- Returns
- The major version
References m_major.
◆ minorVersion()
GLBINDING_CONSTEXPR unsigned char glbinding::Version::minorVersion |
( |
| ) |
const |
|
inline |
Accessor for the minor version.
- Returns
- The minor version
References m_minor.
◆ toString()
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 Version is invalid
References isNull(), m_major, and m_minor.
◆ isNull()
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().
◆ operator=() [1/2]
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.
◆ operator=() [2/2]
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.
◆ operator<()
GLBINDING_CONSTEXPR bool glbinding::Version::operator< |
( |
const Version & | version | ) |
const |
|
inline |
◆ operator>()
GLBINDING_CONSTEXPR bool glbinding::Version::operator> |
( |
const Version & | version | ) |
const |
|
inline |
◆ operator==()
GLBINDING_CONSTEXPR bool glbinding::Version::operator== |
( |
const Version & | version | ) |
const |
|
inline |
◆ operator!=()
GLBINDING_CONSTEXPR bool glbinding::Version::operator!= |
( |
const Version & | version | ) |
const |
|
inline |
◆ operator>=()
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 than or equal to the other Version, else false
◆ operator<=()
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 lower than or equal to the other Version, else false
◆ m_major
unsigned char glbinding::Version::m_major |
|
protected |
◆ m_minor
unsigned char glbinding::Version::m_minor |
|
protected |
The documentation for this class was generated from the following files: