clipsmm - C++ CLIPS Interface Library

clipsmm logo
pointer.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006,2009 by Rick L. Vinyard, Jr. *
3  * rvinyard@cs.nmsu.edu *
4  * *
5  * This file is part of the clipsmm library. *
6  * *
7  * The clipsmm 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 clipsmm 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  ***************************************************************************/
19 #include <clipsmm/clipsmm-config.h>
20 
21 #ifndef CLIPSPOINTER
22 #define CLIPSPOINTER
23  // Headers for smart pointers
24  #ifdef CLIPSMM_USE_BOOST_SMART_POINTER
25  #include <boost/shared_ptr.hpp>
26  //#include <boost/weak_ptr.hpp>
27  #define CLIPSPointer boost::shared_ptr
28  #define CLIPSWeakPointer boost::weak_ptr
29  #define clips_static_pointer_cast boost::static_pointer_cast
30  #define clips_const_pointer_cast boost::const_pointer_cast
31  #define clips_dynamic_pointer_cast boost::dynamic_pointer_cast
32  #else
33  #ifdef CLIPSMM_USE_CXX0X_SMART_POINTER
34  #include <memory>
35  #define CLIPSPointer std::shared_ptr
36  #define CLIPSWeakPointer std::weak_ptr
37  #define clips_static_pointer_cast std::static_pointer_cast
38  #define clips_const_pointer_cast std::const_pointer_cast
39  #define clips_dynamic_pointer_cast std::dynamic_pointer_cast
40  #else
41  #include <typeinfo>
42  #include <memory>
43  #include <functional>
44  #include <bits/concurrence.h>
45  #include <ext/mt_allocator.h>
46  #include <tr1/boost_shared_ptr.h>
47  #define CLIPSPointer std::tr1::shared_ptr
48  #define CLIPSWeakPointer std::tr1::weak_ptr
49  #define clips_static_pointer_cast std::tr1::static_pointer_cast
50  #define clips_const_pointer_cast std::tr1::const_pointer_cast
51  #define clips_dynamic_pointer_cast std::tr1::dynamic_pointer_cast
52  #endif
53  #endif
54 
55 #endif

Generated on Thu Sep 27 2012 17:57:05 for clipsmm by doxygen 1.8.1.2