moGL  travis-test-3
Modern OpenGL wrapper, thin C++14 header-only layer on top of the OpenGL 4.5+ core spec
object/handle.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef MOGL_HANDLE_INCLUDED
00019 #define MOGL_HANDLE_INCLUDED
00020 
00021 #include <string>
00022 
00023 namespace mogl
00024 {
00025     template <class T>
00026     class Handle
00027     {
00028     public:
00029         Handle(GLenum identifier = GL_NONE);
00030         virtual ~Handle() = default;
00031 
00032         Handle(const Handle& other) = delete;
00033         Handle& operator=(const Handle& other) = delete;
00034 
00035         Handle(Handle&& other) noexcept;
00036 
00037     public:
00038         T           getHandle() const;
00039         std::string getLabel() const;
00040         void        setLabel(const std::string& name);
00041 
00042     public:
00043         virtual bool    isHandleValid() const = 0;
00044 
00045     protected:
00046         T   _handle;
00047 
00048     private:
00049         const GLenum    _identifier;
00050     };
00051 }
00052 
00053 #include "handle.inl"
00054 
00055 #endif // MOGL_HANDLE_INCLUDED
 All Classes Namespaces Files Functions Variables Defines