]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/interprocess/include/boost/interprocess/detail/intermodule_singleton.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / interprocess / include / boost / interprocess / detail / intermodule_singleton.hpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2009-2012. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org/libs/interprocess for documentation.
8 //
9 //////////////////////////////////////////////////////////////////////////////
10
11 #ifndef BOOST_INTERPROCESS_INTERMODULE_SINGLETON_HPP
12 #define BOOST_INTERPROCESS_INTERMODULE_SINGLETON_HPP
13
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
16 #endif
17 #
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
19 #pragma once
20 #endif
21
22 #include <boost/interprocess/detail/config_begin.hpp>
23 #include <boost/interprocess/detail/workaround.hpp>
24
25 #ifdef BOOST_INTERPROCESS_WINDOWS
26 #include <boost/interprocess/detail/windows_intermodule_singleton.hpp>
27 #else
28 #include <boost/interprocess/detail/portable_intermodule_singleton.hpp>
29 #endif
30
31 namespace boost{
32 namespace interprocess{
33 namespace ipcdetail{
34
35 //Now this class is a singleton, initializing the singleton in
36 //the first get() function call if LazyInit is false. If true
37 //then the singleton will be initialized when loading the module.
38 template<typename C, bool LazyInit = true, bool Phoenix = false>
39 class intermodule_singleton
40 #ifdef BOOST_INTERPROCESS_WINDOWS
41 : public windows_intermodule_singleton<C, LazyInit, Phoenix>
42 #else
43 : public portable_intermodule_singleton<C, LazyInit, Phoenix>
44 #endif
45 {};
46
47 } //namespace ipcdetail{
48 } //namespace interprocess{
49 } //namespace boost{
50
51 #include <boost/interprocess/detail/config_end.hpp>
52
53 #endif