Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 08:48:41

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
0004 // Software License, Version 1.0. (See accompanying file
0005 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/interprocess for documentation.
0008 //
0009 //////////////////////////////////////////////////////////////////////////////
0010 #ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP
0011 #define BOOST_INTERPROCESS_NULL_INDEX_HPP
0012 
0013 #ifndef BOOST_CONFIG_HPP
0014 #  include <boost/config.hpp>
0015 #endif
0016 0017 ">#
0018 #if defined(BOOST_HAS_PRAGMA_ONCE)
0019 #  pragma once
0020 #endif
0021 
0022 #include <boost/interprocess/detail/config_begin.hpp>
0023 #include <boost/interprocess/detail/workaround.hpp>
0024 
0025 #include <boost/interprocess/offset_ptr.hpp>
0026 
0027 //!\file
0028 //!Describes a null index adaptor, so that if we don't want to construct
0029 //!named objects, we can use this null index type to save resources.
0030 
0031 namespace boost {
0032 namespace interprocess {
0033 
0034 //!Null index type
0035 //!used to save compilation time when
0036 //!named indexes are not needed.
0037 template <class MapConfig>
0038 class null_index
0039 {
0040    #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
0041    typedef typename MapConfig::
0042       segment_manager_base    segment_manager_base;
0043    #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
0044 
0045    public:
0046    typedef int * iterator;
0047    typedef const int * const_iterator;
0048 
0049    //!begin() is equal
0050    //!to end()
0051    const_iterator begin() const
0052    {  return const_iterator(0);  }
0053 
0054    //!begin() is equal
0055    //!to end()
0056    iterator begin()
0057    {  return iterator(0);  }
0058 
0059    //!begin() is equal
0060    //!to end()
0061    const_iterator end() const
0062    {  return const_iterator(0);  }
0063 
0064    //!begin() is equal
0065    //!to end()
0066    iterator end()
0067    {  return iterator(0);  }
0068 
0069    //!Empty constructor
0070    null_index(segment_manager_base *){}
0071 };
0072 
0073 }}   //namespace boost { namespace interprocess {
0074 
0075 #include <boost/interprocess/detail/config_end.hpp>
0076 
0077 #endif   //#ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP