A small utility class to manage and compare version tuples.
More...
|
| Version () |
| Dummy default constructor.
|
|
| Version (const std::string &version) |
| Simple constructor which takes a string with "." separated numbers.
|
|
| Version (const std::string &driver_version, const std::string &card_name) |
| Create a version instance from the driver and car name.
|
|
bool | operator== (const Version &other) const |
| Compares two version numbers.
|
|
bool | operator!= (const Version &other) const |
| Compares two version numbers.
|
|
|
std::vector< uint32_t > | m_version |
| The array containing the version number.
|
|
|
void | convertVersionString (const std::string &version) |
| Searches for the first number in the string, then converts the rest of the string into a tuple.
|
|
A small utility class to manage and compare version tuples.
◆ Version()
GraphicsRestrictions::Version::Version |
( |
const std::string & |
driver_version, |
|
|
const std::string & |
card_name |
|
) |
| |
|
inline |
Create a version instance from the driver and car name.
For example for an Intel HD3000 card the string is "3.1.0 - Build 9.17.10.3517" it would create [9,17,10,3517] - i.e. it takes the vendor info into account.
- Parameters
-
driver_version | The GL_VERSION string (i.e. opengl and version number). |
card_name | The GL_RENDERER string (i.e. graphics card). |
◆ convertVersionString()
void GraphicsRestrictions::Version::convertVersionString |
( |
const std::string & |
version | ) |
|
|
inlineprivate |
Searches for the first number in the string, then converts the rest of the string into a tuple.
E.g. "Build 12.34.56" --> [12,34,56].
◆ operator!=()
bool GraphicsRestrictions::Version::operator!= |
( |
const Version & |
other | ) |
const |
|
inline |
Compares two version numbers.
Equal returns true if the elements are identical.
◆ operator==()
bool GraphicsRestrictions::Version::operator== |
( |
const Version & |
other | ) |
const |
|
inline |
Compares two version numbers.
Equal returns true if the elements are identical.
The documentation for this class was generated from the following file:
- graphics/graphics_restrictions.cpp