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
17 #include <boost/interprocess/detail/config_begin.hpp>
18 #include <boost/interprocess/detail/workaround.hpp>
20 #include <boost/interprocess/offset_ptr.hpp>
23 //!Describes a null index adaptor, so that if we don't want to construct
24 //!named objects, we can use this null index type to save resources.
27 namespace interprocess {
30 //!used to save compilation time when
31 //!named indexes are not needed.
32 template <class MapConfig>
35 #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
36 typedef typename MapConfig::
37 segment_manager_base segment_manager_base;
38 #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
41 typedef int * iterator;
42 typedef const int * const_iterator;
46 const_iterator begin() const
47 { return const_iterator(0); }
52 { return iterator(0); }
56 const_iterator end() const
57 { return const_iterator(0); }
62 { return iterator(0); }
65 null_index(segment_manager_base *){}
68 }} //namespace boost { namespace interprocess {
70 #include <boost/interprocess/detail/config_end.hpp>
72 #endif //#ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP