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
14namespace glbinding
15{
16
17
27template <typename T>
28class Value : public AbstractValue
29{
30public:
38 Value(const T & value);
39
46 Value & operator=(const Value &) = delete;
47
55 virtual void printOn(std::ostream & stream) const override;
56
57protected:
58 const T value;
59};
60
65template <> 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
77template <> GLBINDING_API void Value<gl::GLboolean>::printOn(std::ostream & stream) const;
78
83template <> GLBINDING_API void Value<const gl::GLubyte *>::printOn(std::ostream & stream) const;
84
89template <> GLBINDING_API void Value<const gl::GLchar *>::printOn(std::ostream & stream) const;
90
95template <> GLBINDING_API void Value<gl::GLuint_array_2>::printOn(std::ostream & stream) const;
96
106template <typename Argument>
107AbstractValue * createValue(const Argument & argument);
108
120template <typename... Arguments>
121std::vector<AbstractValue*> createValues(Arguments&&... arguments);
122
123
124} // namespace glbinding
125
126
127#include <glbinding/Value.inl>
The AbstractValue class represents the superclass of a printable wrapper around an OpenGL data type.
Definition: AbstractValue.h:21
The Value class represents a printable wrapper around an OpenGL data type.
Definition: Value.h:29
Value & operator=(const Value &)=delete
The deleted assigment operator.
Value(const T &value)
Constructor.
Definition: Value.inl:48
const T value
The value that should be printed later.
Definition: Value.h:58
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.
std::vector< AbstractValue * > createValues(Arguments &&... arguments)
A wrapper around the creation of a vector of arguments.
Definition: Value.inl:66
AbstractValue * createValue(const Argument &argument)
A wrapper around the type deduction and memory allocation of a specific argument.
Definition: Value.inl:60