#include "singleton.hpp"
-#include "SGReferenced.hxx"
-#include "SGSharedPtr.hxx"
+#ifndef NO_OPENSCENEGRAPH_INTERFACE
+#include <osg/Referenced>
+#include <osg/ref_ptr>
+#endif
namespace simgear
{
}
};
+#ifndef NO_OPENSCENEGRAPH_INTERFACE
template <typename RefClass>
class SingletonRefPtr
{
return singleton.ptr.get();
}
private:
- SGSharedPtr<RefClass> ptr;
+ osg::ref_ptr<RefClass> ptr;
};
template <typename RefClass>
-class ReferencedSingleton : public virtual SGReferenced
+class ReferencedSingleton : public virtual osg::Referenced
{
public:
static RefClass* instance()
return SingletonRefPtr<RefClass>::instance();
}
};
+#endif // of NO_OPENSCENEGRAPH_INTERFACE
}
#endif