papyrus logo

pointer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the papyrus library.                             *
00006  *                                                                         *
00007  *   papyrus is free software; you can redistribute it and/or modify       *
00008  *   it under the terms of the GNU Lesser General Public License           *
00009  *   version 3.0 as published by the Free Software Foundation.             *
00010  *                                                                         *
00011  *   papyrus is distributed in the hope that it will be useful,            *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Lesser General Public License version 3.0 for more details.       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with the papyrus library. If not, see                   *
00018  *   <http://www.gnu.org/licenses/>.                                       *
00019  ***************************************************************************/
00020 #include <papyrus/papyrus-config.h>
00021 
00022 #ifndef PAPYRUSPOINTER_H
00023 #define PAPYRUSPOINTER_H
00024   // Headers for smart pointers
00025   #ifdef PAPYRUS_USE_BOOST_SMART_POINTER
00026     #include <boost/shared_ptr.hpp>
00027     //#include <boost/weak_ptr.hpp>
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

Generated on Fri Apr 16 12:40:11 2010 for papyrus by doxygen 1.6.1