The new agg-plot architecture is now functional and linked with Lua. More debug to be done and more graphical elements should be added. - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/resource-manager.h
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2009年12月17日 11:02:22 +0000
committerFrancesco Abbate <francesco.bbt@gmail.com>2009年12月17日 11:02:22 +0000
commit720b18d7f1a5dba6ebc4c4f4ea4a5c2e1a8b74d4 (patch)
tree1f6da5d02f842a1866f3cb78dd12f37332473d66 /agg-plot/resource-manager.h
parentd00328bd46965223c83f3880204943d8e5844034 (diff)
downloadgsl-shell-720b18d7f1a5dba6ebc4c4f4ea4a5c2e1a8b74d4.tar.gz
The new agg-plot architecture is now functional and linked with Lua. More debug to be done and more graphical elements should be added.
Diffstat (limited to 'agg-plot/resource-manager.h')
-rw-r--r--agg-plot/resource-manager.h 29
1 files changed, 29 insertions, 0 deletions
diff --git a/agg-plot/resource-manager.h b/agg-plot/resource-manager.h
new file mode 100644
index 00000000..c59782a3
--- /dev/null
+++ b/agg-plot/resource-manager.h
@@ -0,0 +1,29 @@
+#ifndef AGGPLOT_RESOURCE_MANAGER_H
+#define AGGPLOT_RESOURCE_MANAGER_H
+
+
+class no_management {
+ public:
+ template <class T>
+ static void acquire(T* p) {};
+
+ template <class T>
+ static void dispose(T* p) {};
+};
+
+
+class ref_manager {
+public:
+ template <class T>
+ static void acquire(T* p) { p->ref(); };
+
+ template <class T>
+ static void dispose(T* p)
+ {
+ unsigned rc = p->unref();
+ if (rc == 0)
+ delete p;
+ };
+};
+
+#endif
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月20日 16:53:48 +0000

AltStyle によって変換されたページ (->オリジナル) /