glbinding  2.1.1.000000000000
A C++ binding for the OpenGL API, generated using the gl.xml specification.
Value.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <vector>
5 
6 #include <glbinding/glbinding_api.h>
7 
9 
10 #include <glbinding/gl/types.h>
11 #include <glbinding/gl/boolean.h>
12 
13 
14 namespace glbinding
15 {
16 
17 
27 template <typename T>
28 class Value : public AbstractValue
29 {
30 public:
38  Value(const T & value);
39 
46  Value & operator=(const Value &) = delete;
47 
55  virtual void printOn(std::ostream & stream) const override;
56 
57 protected:
58  const T value;
59 };
60 
65 template <> GLBINDING_API void Value<gl::GLenum>::printOn(std::ostream & stream) const;
66 
68 // * @brief
69 // * A specialized method for the gl::GLbitfield Value template.
70 // */
71 //template <> GLBINDING_API void Value<gl::GLbitfield>::printOn(std::ostream & stream) const;
72 
77 template <> GLBINDING_API void Value<gl::GLboolean>::printOn(std::ostream & stream) const;
78 
83 template <> GLBINDING_API void Value<const gl::GLubyte *>::printOn(std::ostream & stream) const;
84 
89 template <> GLBINDING_API void Value<const gl::GLchar *>::printOn(std::ostream & stream) const;
90 
95 template <> GLBINDING_API void Value<gl::GLuint_array_2>::printOn(std::ostream & stream) const;
96 
106 template <typename Argument>
107 AbstractValue * createValue(const Argument & argument);
108 
120 template <typename... Arguments>
121 std::vector<AbstractValue*> createValues(Arguments&&... arguments);
122 
123 
124 } // namespace glbinding
125 
126 
127 #include <glbinding/Value.inl>
const T value
The value that should be printed later.
Definition: Value.h:58
std::vector< AbstractValue * > createValues(Arguments &&... arguments)
A wrapper around the creation of a vector of arguments.
Definition: Value.inl:66
The Value class represents a printable wrapper around an OpenGL data type.
Definition: Value.h:28
The AbstractValue class represents the superclass of a printable wrapper around an OpenGL data type.
Definition: AbstractValue.h:20
AbstractValue * createValue(const Argument &argument)
A wrapper around the type deduction and memory allocation of a specific argument.
Definition: Value.inl:60
Value(const T &value)
Constructor.
Definition: Value.inl:48
virtual void printOn(std::ostream &stream) const override
Prints the contents of this Value on a stream.
Definition: Value.inl:54
Contains all the classes of glbinding.
Value & operator=(const Value &)=delete
The deleted assigment operator.