| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

Referenced.h
Go to the documentation of this file.
1
2 #pragma once
3
4 #include <globjects/globjects_api.h>
5
6 #include <globjects/base/HeapOnly.h>
7
8
9 namespace globjects
10 {
11
12
22 class GLOBJECTS_API Referenced : public HeapOnly
23 {
24 public:
25 Referenced();
26
27 void ref() const;
28 void unref() const;
29
30 int refCounter() const;
31
32 private:
33 Referenced(const Referenced &) = delete;
34 Referenced & operator=(const Referenced &) = delete;
35
36 protected:
37 virtual ~Referenced();
38
39 private:
40 mutable int m_refCounter;
41 };
42
43
44 } // namespace globjects
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::HeapOnly
The HeapOnly class Restricts creation to heap.
Definition: HeapOnly.h:16
HeapOnly.h
globjects::Referenced
Superclass for all classes that use reference counting in globjects.
Definition: Referenced.h:22