X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2FSingleton.hxx;h=0db235fec976aa7646ecf105b58d878fe43ce5c4;hb=02ac1a43c12c821c92a2e416d0ec343dbe5784e7;hp=cc98c497633a7d754f910af66d151a8995b6325a;hpb=110753e92c4d512432b93d8789348a54341dec98;p=simgear.git diff --git a/simgear/structure/Singleton.hxx b/simgear/structure/Singleton.hxx index cc98c497..0db235fe 100644 --- a/simgear/structure/Singleton.hxx +++ b/simgear/structure/Singleton.hxx @@ -1,12 +1,7 @@ #ifndef SIMGEAR_SINGLETON_HXX #define SIMGEAR_SINGLETON_HXX 1 -#include - -#ifndef NO_OPENSCENEGRAPH_INTERFACE -#include -#include -#endif +#include "singleton.hpp" namespace simgear { @@ -29,35 +24,5 @@ public: } }; -#ifndef NO_OPENSCENEGRAPH_INTERFACE -template -class SingletonRefPtr -{ -public: - SingletonRefPtr() - { - ptr = new RefClass; - } - static RefClass* instance() - { - SingletonRefPtr& singleton - = boost::details::pool::singleton_default::instance(); - return singleton.ptr.get(); - } -private: - osg::ref_ptr ptr; -}; - -template -class ReferencedSingleton : public virtual osg::Referenced -{ -public: - static RefClass* instance() - { - return SingletonRefPtr::instance(); - } -}; -#endif // of NO_OPENSCENEGRAPH_INTERFACE - } #endif