Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: // Chris@16: // (C) Copyright Ion Gaztanaga 2009-2012. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/interprocess for documentation. Chris@16: // Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: #ifndef BOOST_INTERPROCESS_INTERMODULE_SINGLETON_HPP Chris@16: #define BOOST_INTERPROCESS_INTERMODULE_SINGLETON_HPP Chris@16: Chris@101: #ifndef BOOST_CONFIG_HPP Chris@101: # include Chris@101: #endif Chris@101: # Chris@101: #if defined(BOOST_HAS_PRAGMA_ONCE) Chris@16: #pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #ifdef BOOST_INTERPROCESS_WINDOWS Chris@16: #include Chris@101: #else Chris@101: #include Chris@16: #endif Chris@16: Chris@16: namespace boost{ Chris@16: namespace interprocess{ Chris@16: namespace ipcdetail{ Chris@16: Chris@16: //Now this class is a singleton, initializing the singleton in Chris@16: //the first get() function call if LazyInit is false. If true Chris@16: //then the singleton will be initialized when loading the module. Chris@101: template Chris@16: class intermodule_singleton Chris@16: #ifdef BOOST_INTERPROCESS_WINDOWS Chris@16: : public windows_intermodule_singleton Chris@16: #else Chris@16: : public portable_intermodule_singleton Chris@16: #endif Chris@16: {}; Chris@16: Chris@16: } //namespace ipcdetail{ Chris@16: } //namespace interprocess{ Chris@16: } //namespace boost{ Chris@16: Chris@16: #include Chris@16: Chris@16: #endif