Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "dptr_base.h"
00010
00011
00012 #ifndef DPTR_NONCOPY_CLASS_0_1_H
00013 #define DPTR_NONCOPY_CLASS_0_1_H
00014
00016 namespace Chester_0_1{
00018
00022 class NonCopyDPtr
00023 {
00024 public:
00026 NonCopyDPtr(){}
00028 virtual ~NonCopyDPtr(){}
00029 private:
00031 NonCopyDPtr(const NonCopyDPtr&){}
00033 NonCopyDPtr& operator=(const NonCopyDPtr&){return *this;}
00034 };
00035
00036
00038 };
00039 using namespace Chester_0_1;
00041 #endif
00042
00043 #ifdef DEFINE_NONCOPY_DPTR
00044 #undef DEFINE_NONCOPY_DPTR
00045 #endif
00046
00054 #define DEFINE_NONCOPY_DPTR(Class) \
00055 Class::DPrivate::DPrivate(){d=new Class::Private;}\
00056 Class::DPrivate::DPrivate(const Class::DPrivate&){}\
00057 Class::DPrivate::~DPrivate(){delete d;}\
00058 Class::DPrivate& Class::DPrivate::operator=(const Class::DPrivate&)\
00059 {return *this;}