annotate DEPENDENCIES/generic/include/boost/interprocess/indexes/null_index.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
rev   line source
Chris@16 1 //////////////////////////////////////////////////////////////////////////////
Chris@16 2 //
Chris@16 3 // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
Chris@16 4 // Software License, Version 1.0. (See accompanying file
Chris@16 5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 6 //
Chris@16 7 // See http://www.boost.org/libs/interprocess for documentation.
Chris@16 8 //
Chris@16 9 //////////////////////////////////////////////////////////////////////////////
Chris@16 10 #ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP
Chris@16 11 #define BOOST_INTERPROCESS_NULL_INDEX_HPP
Chris@16 12
Chris@16 13 #include <boost/interprocess/detail/config_begin.hpp>
Chris@16 14 #include <boost/interprocess/detail/workaround.hpp>
Chris@16 15
Chris@16 16 #include <boost/interprocess/offset_ptr.hpp>
Chris@16 17
Chris@16 18 //!\file
Chris@16 19 //!Describes a null index adaptor, so that if we don't want to construct
Chris@16 20 //!named objects, we can use this null index type to save resources.
Chris@16 21
Chris@16 22 namespace boost {
Chris@16 23 namespace interprocess {
Chris@16 24
Chris@16 25 //!Null index type
Chris@16 26 //!used to save compilation time when
Chris@16 27 //!named indexes are not needed.
Chris@16 28 template <class MapConfig>
Chris@16 29 class null_index
Chris@16 30 {
Chris@16 31 /// @cond
Chris@16 32 typedef typename MapConfig::
Chris@16 33 segment_manager_base segment_manager_base;
Chris@16 34 /// @endcond
Chris@16 35
Chris@16 36 public:
Chris@16 37 typedef void * iterator;
Chris@16 38 typedef const void * const_iterator;
Chris@16 39
Chris@16 40 //!begin() is equal
Chris@16 41 //!to end()
Chris@16 42 const_iterator begin() const
Chris@16 43 { return const_iterator(0); }
Chris@16 44
Chris@16 45 //!begin() is equal
Chris@16 46 //!to end()
Chris@16 47 iterator begin()
Chris@16 48 { return iterator(0); }
Chris@16 49
Chris@16 50 //!begin() is equal
Chris@16 51 //!to end()
Chris@16 52 const_iterator end() const
Chris@16 53 { return const_iterator(0); }
Chris@16 54
Chris@16 55 //!begin() is equal
Chris@16 56 //!to end()
Chris@16 57 iterator end()
Chris@16 58 { return iterator(0); }
Chris@16 59
Chris@16 60 //!Empty constructor
Chris@16 61 null_index(segment_manager_base *){}
Chris@16 62 };
Chris@16 63
Chris@16 64 }} //namespace boost { namespace interprocess {
Chris@16 65
Chris@16 66 #include <boost/interprocess/detail/config_end.hpp>
Chris@16 67
Chris@16 68 #endif //#ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP