escript Revision_
Pointers.h
Go to the documentation of this file.
1
2/*****************************************************************************
3*
4* Copyright (c) 2003-2020 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-2017 by Centre for Geoscience Computing (GeoComp)
14* Development from 2019 by School of Earth and Environmental Sciences
15**
16*****************************************************************************/
17
18#ifndef POINTERS_H_2008
19#define POINTERS_H_2008
20
25// The idea is that we should be able to easily switch between shared_ptr
26// and intrusive_ptr if required
27
28// Where to find the base class which supplies refcounting
29#define REFCOUNT_BASE_FILE <boost/enable_shared_from_this.hpp>
30// The name of the class to extend
31#define REFCOUNT_BASE_CLASS(x) boost::enable_shared_from_this<x>
32
33#define POINTER_WRAPPER_CLASS(x) boost::shared_ptr<x>
34
35#define REFCOUNTNS boost
36
37#include REFCOUNT_BASE_FILE
38
39#endif
40