Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:28

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 #if defined(BOOST_HAS_PRAGMA_ONCE)
0018 #  pragma once
0019 #endif
0020 
0021 #include <boost/interprocess/detail/config_begin.hpp>
0022 #include <boost/interprocess/detail/workaround.hpp>
0023 
0024 #include <boost/interprocess/offset_ptr.hpp>
0025 
0026 //!\file
0027 //!Describes a null index adaptor, so that if we don't want to construct
0028 //!named objects, we can use this null index type to save resources.
0029 
0030 namespace boost {
0031 namespace interprocess {
0032 
0033 //!Null index type
0034 //!used to save compilation time when
0035 //!named indexes are not needed.
0036 template <class MapConfig>
0037 class null_index
0038 {
0039    #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
0040    typedef typename MapConfig::
0041       segment_manager_base    segment_manager_base;
0042    #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
0043 
0044    public:
0045    typedef int * iterator;
0046    typedef const int * const_iterator;
0047 
0048    //!begin() is equal
0049    //!to end()
0050    const_iterator begin() const
0051    {  return const_iterator(0);  }
0052 
0053    //!begin() is equal
0054    //!to end()
0055    iterator begin()
0056    {  return iterator(0);  }
0057 
0058    //!begin() is equal
0059    //!to end()
0060    const_iterator end() const
0061    {  return const_iterator(0);  }
0062 
0063    //!begin() is equal
0064    //!to end()
0065    iterator end()
0066    {  return iterator(0);  }
0067 
0068    //!Empty constructor
0069    null_index(segment_manager_base *){}
0070 };
0071 
0072 }}   //namespace boost { namespace interprocess {
0073 
0074 #include <boost/interprocess/detail/config_end.hpp>
0075 
0076 #endif   //#ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP