glbinding  2.1.1.000000000000
A C++ binding for the OpenGL API, generated using the gl.xml specification.
Version.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <iosfwd>
5 #include <string>
6 #include <set>
7 #include <utility>
8 
9 #include <glbinding/glbinding_api.h>
10 
11 
12 namespace glbinding
13 {
14 
30 class GLBINDING_API Version
31 {
32 public:
37  Version();
38 
48  Version(unsigned char majorVersion, unsigned char minorVersion);
49 
57  Version(const Version & version);
58 
66  Version(Version && version);
67 
78  Version & operator=(const Version & version);
79 
90  Version & operator=(Version && version);
91 
102  bool operator< (const Version & version) const;
103 
114  bool operator> (const Version & version) const;
115 
126  bool operator==(const Version & version) const;
127 
138  bool operator!=(const Version & version) const;
139 
150  bool operator>=(const Version & version) const;
151 
162  bool operator<=(const Version & version) const;
163 
171  unsigned char majorVersion() const;
172 
180  unsigned char minorVersion() const;
181 
186  operator std::pair<unsigned char, unsigned char>() const;
187 
192  operator std::pair<unsigned short, unsigned short>() const;
193 
198  operator std::pair<unsigned int, unsigned int>() const;
199 
207  std::string toString() const;
208 
216  bool isValid() const;
217 
227  bool isNull() const;
228 
236  const Version & nearest() const;
237 
245  static const std::set<Version> & versions();
246 
254  static const std::set<Version> preceeding(const Version & version);
255 
263  static const std::set<Version> succeeding(const Version & version);
264 
272  static const Version & latest();
273 
274 protected:
275  unsigned char m_major;
276  unsigned char m_minor;
277 
278 protected:
279  static const std::set<Version> s_validVersions;
280  static const Version s_latest;
281 };
282 
283 
284 } // namespace glbinding
285 
286 
291 GLBINDING_API std::ostream & operator<<(std::ostream & stream, const glbinding::Version & version);
static const Version s_latest
The most current version.
Definition: Version.h:280
unsigned char m_minor
The minor version.
Definition: Version.h:276
static const std::set< Version > s_validVersions
The set of all valid versions.
Definition: Version.h:279
unsigned char m_major
The major version.
Definition: Version.h:275
Contains all the classes of glbinding.
GLBINDING_API std::ostream & operator<<(std::ostream &stream, const glbinding::Version &version)
The operator to allow Versions to be printed onto a std::ostream.
The Version class represents an OpenGL feature, consisting of majow version and minor version,...
Definition: Version.h:30