dbus-cxx logo

pointer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007,2008,2009 by Rick L. Vinyard, Jr.                  *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the dbus-cxx library.                            *
00006  *                                                                         *
00007  *   The dbus-cxx library is free software; you can redistribute it and/or *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The dbus-cxx library is distributed in the hope that it will be       *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #include <dbus-cxx/dbus-cxx-config.h>
00020 
00021 #ifndef DBUS_CXXPOINTER
00022 #define DBUS_CXXPOINTER
00023   // Headers for smart pointers
00024   #ifdef DBUS_CXX_USE_BOOST_SMART_POINTER
00025     #include <boost/shared_ptr.hpp>
00026     //#include <boost/weak_ptr.hpp>
00027     #define DBusCxxPointer boost::shared_ptr
00028     #define DBusCxxWeakPointer boost::weak_ptr
00029     #define dbus_cxx_static_pointer_cast  boost::static_pointer_cast
00030     #define dbus_cxx_const_pointer_cast   boost::const_pointer_cast
00031     #define dbus_cxx_dynamic_pointer_cast boost::dynamic_pointer_cast
00032   #else
00033     #ifdef DBUS_CXX_USE_CXX0X_SMART_POINTER
00034       #include <memory>
00035       #define DBusCxxPointer std::shared_ptr
00036       #define DBusCxxWeakPointer std::weak_ptr
00037       #define dbus_cxx_static_pointer_cast  std::static_pointer_cast
00038       #define dbus_cxx_const_pointer_cast   std::const_pointer_cast
00039       #define dbus_cxx_dynamic_pointer_cast std::dynamic_pointer_cast
00040     #else
00041       #include <typeinfo>
00042       #include <memory>
00043       #include <functional>
00044       #include <bits/concurrence.h>
00045       #include <ext/mt_allocator.h>
00046       #include <tr1/boost_shared_ptr.h>
00047       #define DBusCxxPointer std::tr1::shared_ptr
00048       #define DBusCxxWeakPointer std::tr1::weak_ptr
00049       #define dbus_cxx_static_pointer_cast  std::tr1::static_pointer_cast
00050       #define dbus_cxx_const_pointer_cast   std::tr1::const_pointer_cast
00051       #define dbus_cxx_dynamic_pointer_cast std::tr1::dynamic_pointer_cast
00052     #endif
00053   #endif
00054 
00055 #endif

Generated on Thu May 28 16:50:50 2009 for dbus-cxx by doxygen 1.5.7.1