OGLplus (0.52.0) a C++ wrapper for OpenGL

limit.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_ERROR_LIMIT_1405022241_HPP
14 #define OGLPLUS_ERROR_LIMIT_1405022241_HPP
15 
16 #include <oglplus/config/basic.hpp>
17 #include <oglplus/error/basic.hpp>
18 
19 namespace oglplus {
20 
22 
31  : public Error
32 {
33 private:
34  GLfloat _value;
35  GLfloat _limit;
36 public:
37  static const char* Message(void);
38 
39  LimitError(const char* message)
40  : Error(message)
41  , _value(0)
42  , _limit(0)
43  { }
44 
45  LimitError& Value(GLfloat value)
46  {
47  _value = value;
48  return *this;
49  }
50 
52  GLfloat Value(void) const { return _value; }
53 
54  LimitError& Limit(GLfloat limit)
55  {
56  _limit = limit;
57  return *this;
58  }
59 
61  GLfloat Limit(void) const { return _limit; }
62 };
63 
64 } // namespace oglplus
65 
66 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
67 #include <oglplus/error/limit.ipp>
68 #endif
69 
70 #endif // include guard
Exception indicating exceeded implementation-defined limits.
Definition: limit.hpp:30
GLfloat Value(void) const
The value assigned to the limited-type variable.
Definition: limit.hpp:52
GLfloat Limit(void) const
The allowed limit of the limited-type.
Definition: limit.hpp:61
Exception class for general OpenGL errors.
Definition: basic.hpp:43
Declaration of basic OGLplus' exceptions.

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).