Mercurial > hg > vamp-build-and-test
comparison 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 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 ////////////////////////////////////////////////////////////////////////////// | |
2 // | |
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) | |
6 // | |
7 // See http://www.boost.org/libs/interprocess for documentation. | |
8 // | |
9 ////////////////////////////////////////////////////////////////////////////// | |
10 #ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP | |
11 #define BOOST_INTERPROCESS_NULL_INDEX_HPP | |
12 | |
13 #include <boost/interprocess/detail/config_begin.hpp> | |
14 #include <boost/interprocess/detail/workaround.hpp> | |
15 | |
16 #include <boost/interprocess/offset_ptr.hpp> | |
17 | |
18 //!\file | |
19 //!Describes a null index adaptor, so that if we don't want to construct | |
20 //!named objects, we can use this null index type to save resources. | |
21 | |
22 namespace boost { | |
23 namespace interprocess { | |
24 | |
25 //!Null index type | |
26 //!used to save compilation time when | |
27 //!named indexes are not needed. | |
28 template <class MapConfig> | |
29 class null_index | |
30 { | |
31 /// @cond | |
32 typedef typename MapConfig:: | |
33 segment_manager_base segment_manager_base; | |
34 /// @endcond | |
35 | |
36 public: | |
37 typedef void * iterator; | |
38 typedef const void * const_iterator; | |
39 | |
40 //!begin() is equal | |
41 //!to end() | |
42 const_iterator begin() const | |
43 { return const_iterator(0); } | |
44 | |
45 //!begin() is equal | |
46 //!to end() | |
47 iterator begin() | |
48 { return iterator(0); } | |
49 | |
50 //!begin() is equal | |
51 //!to end() | |
52 const_iterator end() const | |
53 { return const_iterator(0); } | |
54 | |
55 //!begin() is equal | |
56 //!to end() | |
57 iterator end() | |
58 { return iterator(0); } | |
59 | |
60 //!Empty constructor | |
61 null_index(segment_manager_base *){} | |
62 }; | |
63 | |
64 }} //namespace boost { namespace interprocess { | |
65 | |
66 #include <boost/interprocess/detail/config_end.hpp> | |
67 | |
68 #endif //#ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP |