aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/RefCount.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/FbTk/RefCount.hh b/src/FbTk/RefCount.hh
index 8adcc83..2595864 100644
--- a/src/FbTk/RefCount.hh
+++ b/src/FbTk/RefCount.hh
@@ -134,6 +134,26 @@ void RefCount<Pointer>::incRefCount() {
134 (*m_refcount)++; 134 (*m_refcount)++;
135} 135}
136 136
137template <typename Pointer>
138inline RefCount<Pointer> makeRef() {
139 return RefCount<Pointer>(new Pointer);
140}
141
142template <typename Pointer, typename Arg1>
143inline RefCount<Pointer> makeRef(const Arg1 &arg1) {
144 return RefCount<Pointer>(new Pointer(arg1));
145}
146
147template <typename Pointer, typename Arg1, typename Arg2>
148inline RefCount<Pointer> makeRef(const Arg1 &arg1, const Arg2 &arg2) {
149 return RefCount<Pointer>(new Pointer(arg1, arg2));
150}
151
152template <typename Pointer, typename Arg1, typename Arg2, typename Arg3>
153inline RefCount<Pointer> makeRef(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) {
154 return RefCount<Pointer>(new Pointer(arg1, arg2, arg3));
155}
156
137} // end namespace FbTk 157} // end namespace FbTk
138 158
139#endif // FBTK_REFCOUNT_HH 159#endif // FBTK_REFCOUNT_HH