Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:35:40

0001 /* Copyright 2006-2011 Joaquin M Lopez Munoz.
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * http://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * See http://www.boost.org/libs/flyweight for library home page.
0007  */
0008 
0009 #ifndef BOOST_FLYWEIGHT_INTERMODULE_HOLDER_HPP
0010 #define BOOST_FLYWEIGHT_INTERMODULE_HOLDER_HPP
0011 
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015 
0016 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
0017 #include <boost/flyweight/holder_tag.hpp>
0018 #include <boost/flyweight/intermodule_holder_fwd.hpp>
0019 #include <boost/interprocess/detail/intermodule_singleton.hpp>
0020 #include <boost/mpl/aux_/lambda_support.hpp>
0021 
0022 /* intermodule_holder_class guarantees a unique instance across all dynamic
0023  * modules of a program.
0024  */
0025 
0026 namespace boost{
0027 
0028 namespace flyweights{
0029 
0030 template<typename C>
0031 struct intermodule_holder_class:
0032   interprocess::ipcdetail::intermodule_singleton<C,true>,
0033   holder_marker
0034 {
0035   typedef intermodule_holder_class type;
0036   BOOST_MPL_AUX_LAMBDA_SUPPORT(1,intermodule_holder_class,(C))
0037 };
0038 
0039 /* intermodule_holder_class specifier */
0040 
0041 struct intermodule_holder:holder_marker
0042 {
0043   template<typename C>
0044   struct apply
0045   {
0046     typedef intermodule_holder_class<C> type;
0047   };
0048 };
0049 
0050 } /* namespace flyweights */
0051 
0052 } /* namespace boost */
0053 
0054 #endif