00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _STELOBJECTTYPE_HPP_
00021 #define _STELOBJECTTYPE_HPP_
00022
00023 #include <QSharedPointer>
00024
00027 template <class T> class QSharedPointerNoDelete : public QSharedPointer<T>
00028 {
00029 public:
00030 QSharedPointerNoDelete() {;}
00031 QSharedPointerNoDelete(T *ptr) : QSharedPointer<T>(ptr, QSharedPointerNoDelete::noDelete) {;}
00032 QSharedPointerNoDelete(T *ptr, bool own) : QSharedPointer<T>(ptr) {Q_ASSERT(own==true);}
00033 QSharedPointerNoDelete(const QSharedPointer<T>& ptr) : QSharedPointer<T>(ptr) {;}
00034 static void noDelete(T *ptr) {;}
00035 inline operator const QSharedPointer<T>&() const {return *(static_cast<QSharedPointer<T> >(this));}
00036 };
00037
00040
00041 class StelObject;
00042
00045 typedef QSharedPointerNoDelete<StelObject> StelObjectP;
00046
00047 #endif // _STELOBJECTTYPE_HPP_