Escript  Revision_4320
Pointers.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 #ifndef POINTERS_H_2008
17 #define POINTERS_H_2008
18 
23 // The idea is that we should be able to easily switch between shared_ptr and intrusive_ptr if required
24 
25 // Where to find the base class which supplies refcounting
26 #define REFCOUNT_BASE_FILE <boost/enable_shared_from_this.hpp>
27 // The name of the class to extend
28 #define REFCOUNT_BASE_CLASS(x) boost::enable_shared_from_this<x>
29 
30 
31 #define POINTER_WRAPPER_CLASS(x) boost::shared_ptr<x>
32 
33 
34 #include REFCOUNT_BASE_FILE
35 
36 
37 #endif