Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009 #ifndef smartPointer_H_
00010 #define smartPointer_H_
00011
00012 #include <vlutil/vlSmartPointers.h>
00013
00014 namespace MAKLogger
00015 {
00016
00017 template <typename T>
00018 bool compareValidAndEqual(const DtBoost::weak_ptr<T>& wp1,const DtBoost::weak_ptr<T>& wp2)
00019 {
00020 DtBoost::shared_ptr<T> sp1 = wp1.lock();
00021 DtBoost::shared_ptr<T> sp2 = wp2.lock();
00022
00024 return (sp1 && sp2) && (sp1 == sp2);
00025 }
00026
00027 template <typename T>
00028 bool compareValidAndEqual(const DtBoost::shared_ptr<T>& sp1,const DtBoost::weak_ptr<T>& wp1)
00029 {
00030 DtBoost::shared_ptr<T> sp2 = wp1.lock();
00032 return (sp2) && (sp1 == sp2);
00033 }
00034
00035 }
00036
00037 #endif