dbus-cxx logo
pointer.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2007,2008,2009 by Rick L. Vinyard, Jr. *
3  * rvinyard@cs.nmsu.edu *
4  * *
5  * This file is part of the dbus-cxx library. *
6  * *
7  * The dbus-cxx library is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License *
9  * version 3 as published by the Free Software Foundation. *
10  * *
11  * The dbus-cxx library is distributed in the hope that it will be *
12  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty *
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this software. If not see <http://www.gnu.org/licenses/>. *
18  ***************************************************************************/
20 
21 #ifndef DBUS_CXXPOINTER
22 #define DBUS_CXXPOINTER
23  // Headers for smart pointers
24  #if defined( DBUS_CXX_USE_BOOST_SMART_POINTER )
25  #include <boost/shared_ptr.hpp>
26  #include <boost/weak_ptr.hpp>
27  #define DBusCxxPointer boost::shared_ptr
28  #define DBusCxxWeakPointer boost::weak_ptr
29  #define dbus_cxx_static_pointer_cast boost::static_pointer_cast
30  #define dbus_cxx_const_pointer_cast boost::const_pointer_cast
31  #define dbus_cxx_dynamic_pointer_cast boost::dynamic_pointer_cast
32  #elif defined( DBUS_CXX_USE_CXX0X_SMART_POINTER )
33  #include <memory>
34  #define DBusCxxPointer std::shared_ptr
35  #define DBusCxxWeakPointer std::weak_ptr
36  #define dbus_cxx_static_pointer_cast std::static_pointer_cast
37  #define dbus_cxx_const_pointer_cast std::const_pointer_cast
38  #define dbus_cxx_dynamic_pointer_cast std::dynamic_pointer_cast
39  #elif defined( DBUS_CXX_USE_TR1_SMART_POINTER )
40  #include <typeinfo>
41  #include <memory>
42  #include <functional>
43  #if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 1 ))
44  #include <ext/concurrence.h>
45  #include <tr1/type_traits>
46  #else
47  #include <bits/concurrence.h>
48  #endif
49  #include <ext/mt_allocator.h>
50  #include <tr1/boost_shared_ptr.h>
51  #define DBusCxxPointer std::tr1::shared_ptr
52  #define DBusCxxWeakPointer std::tr1::weak_ptr
53  #define dbus_cxx_static_pointer_cast std::tr1::static_pointer_cast
54  #define dbus_cxx_const_pointer_cast std::tr1::const_pointer_cast
55  #define dbus_cxx_dynamic_pointer_cast std::tr1::dynamic_pointer_cast
56  #else
57  #error "Could not find any available smart pointers to use"
58  #endif
59 
60 #endif

Generated on Sun Mar 19 2017 14:54:27 for dbus-cxx by doxygen 1.8.8