pointer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <papyrus/papyrus-config.h>
00021
00022 #ifndef PAPYRUSPOINTER_H
00023 #define PAPYRUSPOINTER_H
00024
00025 #ifdef PAPYRUS_USE_BOOST_SMART_POINTER
00026 #include <boost/shared_ptr.hpp>
00027
00028 #define PapyrusPointer boost::shared_ptr
00029 #define PapyrusWeakPointer boost::weak_ptr
00030 #define papyrus_static_pointer_cast boost::static_pointer_cast
00031 #define papyrus_const_pointer_cast boost::const_pointer_cast
00032 #define papyrus_dynamic_pointer_cast boost::dynamic_pointer_cast
00033 #else
00034 #ifdef PAPYRUS_USE_CXX0X_SMART_POINTER
00035 #include <memory>
00036 #define PapyrusPointer std::shared_ptr
00037 #define PapyrusWeakPointer std::weak_ptr
00038 #define papyrus_static_pointer_cast std::static_pointer_cast
00039 #define papyrus_const_pointer_cast std::const_pointer_cast
00040 #define papyrus_dynamic_pointer_cast std::dynamic_pointer_cast
00041 #else
00042 #include <typeinfo>
00043 #include <memory>
00044 #include <functional>
00045 #include <bits/concurrence.h>
00046 #include <ext/mt_allocator.h>
00047 #include <tr1/boost_shared_ptr.h>
00048 #define PapyrusPointer std::tr1::shared_ptr
00049 #define PapyrusWeakPointer std::tr1::weak_ptr
00050 #define papyrus_static_pointer_cast std::tr1::static_pointer_cast
00051 #define papyrus_const_pointer_cast std::tr1::const_pointer_cast
00052 #define papyrus_dynamic_pointer_cast std::tr1::dynamic_pointer_cast
00053 #endif
00054 #endif
00055
00056 #endif