voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
enableSharedFromThis.hpp
1 #ifndef ENABLESHAREDFROMTHIS_HPP
2 #define ENABLESHAREDFROMTHIS_HPP
3 
4 #include "blub/core/sharedPointer.hpp"
5 
6 #include <memory>
7 
8 
9 namespace blub
10 {
11 
12 
13 template <typename classType>
14 class enableSharedFromThis : public std::enable_shared_from_this<classType>
15 {
16 public:
17  typedef std::enable_shared_from_this<classType> t_base;
20 
21  t_thisPtrConst getSharedThisPtr() const
22  {
23  return blub::sharedPointer<classType const>(t_base::shared_from_this());
24  }
25  t_thisPtr getSharedThisPtr()
26  {
27  return blub::sharedPointer<classType>(t_base::shared_from_this());
28  }
29 };
30 
31 
32 }
33 
34 
35 #endif // ENABLESHAREDFROMTHIS_HPP
Definition: sharedPointer.hpp:12
Definition: enableSharedFromThis.hpp:14
Definition: deadlineTimer.hpp:10