]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpl/example/fsm/aux_/base_event.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / mpl / example / fsm / aux_ / base_event.hpp
1
2 #ifndef BOOST_FSM_BASE_EVENT_INCLUDED
3 #define BOOST_FSM_BASE_EVENT_INCLUDED
4
5 // Copyright Aleksey Gurtovoy 2002-2004
6 //
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
10 //
11 // See http://www.boost.org/libs/mpl for documentation.
12
13 // $Id$
14 // $Date$
15 // $Revision$
16
17 #include <memory>
18 #include <boost/config.hpp>
19
20 namespace fsm { namespace aux {
21
22 // represent an abstract base for FSM events
23
24 struct base_event
25 {
26 public:
27 virtual ~base_event() {};
28
29 #if defined(BOOST_NO_CXX11_SMART_PTR)
30
31 std::auto_ptr<base_event> clone() const
32
33 #else
34
35 std::unique_ptr<base_event> clone() const
36
37 #endif
38
39 {
40 return do_clone();
41 }
42
43 private:
44
45 #if defined(BOOST_NO_CXX11_SMART_PTR)
46
47 virtual std::auto_ptr<base_event> do_clone() const = 0;
48
49 #else
50
51 virtual std::unique_ptr<base_event> do_clone() const = 0;
52
53 #endif
54
55 };
56
57 }}
58
59 #endif // BOOST_FSM_BASE_EVENT_INCLUDED