1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2005-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)
7 // See http://www.boost.org/libs/interprocess for documentation.
9 //////////////////////////////////////////////////////////////////////////////
10 #ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP
11 #define BOOST_INTERPROCESS_NULL_INDEX_HPP
13 #ifndef BOOST_CONFIG_HPP
14 # include <boost/config.hpp>
17 #if defined(BOOST_HAS_PRAGMA_ONCE)
21 #include <boost/interprocess/detail/config_begin.hpp>
22 #include <boost/interprocess/detail/workaround.hpp>
24 #include <boost/interprocess/offset_ptr.hpp>
27 //!Describes a null index adaptor, so that if we don't want to construct
28 //!named objects, we can use this null index type to save resources.
31 namespace interprocess {
34 //!used to save compilation time when
35 //!named indexes are not needed.
36 template <class MapConfig>
39 #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
40 typedef typename MapConfig::
41 segment_manager_base segment_manager_base;
42 #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
45 typedef int * iterator;
46 typedef const int * const_iterator;
50 const_iterator begin() const
51 { return const_iterator(0); }
56 { return iterator(0); }
60 const_iterator end() const
61 { return const_iterator(0); }
66 { return iterator(0); }
69 null_index(segment_manager_base *){}
72 }} //namespace boost { namespace interprocess {
74 #include <boost/interprocess/detail/config_end.hpp>
76 #endif //#ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP