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