diff options
Diffstat (limited to 'boost/interprocess/indexes')
-rw-r--r-- | boost/interprocess/indexes/flat_map_index.hpp | 14 | ||||
-rw-r--r-- | boost/interprocess/indexes/iset_index.hpp | 26 | ||||
-rw-r--r-- | boost/interprocess/indexes/iunordered_set_index.hpp | 34 | ||||
-rw-r--r-- | boost/interprocess/indexes/map_index.hpp | 14 | ||||
-rw-r--r-- | boost/interprocess/indexes/null_index.hpp | 14 | ||||
-rw-r--r-- | boost/interprocess/indexes/unordered_map_index.hpp | 18 |
6 files changed, 74 insertions, 46 deletions
diff --git a/boost/interprocess/indexes/flat_map_index.hpp b/boost/interprocess/indexes/flat_map_index.hpp index bac387e268..4307dedb0e 100644 --- a/boost/interprocess/indexes/flat_map_index.hpp +++ b/boost/interprocess/indexes/flat_map_index.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -10,6 +10,10 @@ #ifndef BOOST_INTERPROCESS_FLAT_MAP_INDEX_HPP #define BOOST_INTERPROCESS_FLAT_MAP_INDEX_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> @@ -25,6 +29,8 @@ //[flat_map_index namespace boost { namespace interprocess { +#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED + //!Helper class to define typedefs from IndexTraits template <class MapConfig> struct flat_map_index_aux @@ -41,6 +47,8 @@ struct flat_map_index_aux key_less, allocator_type> index_t; }; +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED + //!Index type based in flat_map. Just derives from flat_map and //!defines the interface needed by managed memory segments. template <class MapConfig> @@ -48,12 +56,12 @@ class flat_map_index //Derive class from flat_map specialization : public flat_map_index_aux<MapConfig>::index_t { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) typedef flat_map_index_aux<MapConfig> index_aux; typedef typename index_aux::index_t base_type; typedef typename index_aux:: segment_manager_base segment_manager_base; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: //!Constructor. Takes a pointer to the segment manager. Can throw diff --git a/boost/interprocess/indexes/iset_index.hpp b/boost/interprocess/indexes/iset_index.hpp index 8fc91466f3..170e5dac1b 100644 --- a/boost/interprocess/indexes/iset_index.hpp +++ b/boost/interprocess/indexes/iset_index.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,6 +11,10 @@ #ifndef BOOST_INTERPROCESS_ISET_INDEX_HPP #define BOOST_INTERPROCESS_ISET_INDEX_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> @@ -28,7 +32,7 @@ namespace boost { namespace interprocess { -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //!Helper class to define typedefs from IndexTraits template <class MapConfig> @@ -52,7 +56,7 @@ struct iset_index_aux , bi::base_hook<derivation_hook> >::type index_t; }; -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED //!Index type based in boost::intrusive::set. //!Just derives from boost::intrusive::set @@ -62,13 +66,13 @@ class iset_index //Derive class from map specialization : public iset_index_aux<MapConfig>::index_t { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) typedef iset_index_aux<MapConfig> index_aux; typedef typename index_aux::index_t index_type; typedef typename MapConfig:: intrusive_compare_key_type intrusive_compare_key_type; typedef typename MapConfig::char_type char_type; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: typedef typename index_type::iterator iterator; @@ -76,13 +80,13 @@ class iset_index typedef typename index_type::insert_commit_data insert_commit_data; typedef typename index_type::value_type value_type; - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: struct intrusive_key_value_less { bool operator()(const intrusive_compare_key_type &i, const value_type &b) const - { + { std::size_t blen = b.name_length(); return (i.m_len < blen) || (i.m_len == blen && @@ -91,7 +95,7 @@ class iset_index } bool operator()(const value_type &b, const intrusive_compare_key_type &i) const - { + { std::size_t blen = b.name_length(); return (blen < i.m_len) || (blen == i.m_len && @@ -100,7 +104,7 @@ class iset_index } }; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: @@ -130,7 +134,7 @@ class iset_index { return index_type::insert_check(key, intrusive_key_value_less(), commit_data); } }; -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //!Trait class to detect if an index is an intrusive //!index. @@ -140,7 +144,7 @@ struct is_intrusive_index { static const bool value = true; }; -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED } //namespace interprocess { } //namespace boost diff --git a/boost/interprocess/indexes/iunordered_set_index.hpp b/boost/interprocess/indexes/iunordered_set_index.hpp index 3c5f85526c..c85c557c25 100644 --- a/boost/interprocess/indexes/iunordered_set_index.hpp +++ b/boost/interprocess/indexes/iunordered_set_index.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,6 +11,10 @@ #ifndef BOOST_INTERPROCESS_IUNORDERED_SET_INDEX_HPP #define BOOST_INTERPROCESS_IUNORDERED_SET_INDEX_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> @@ -28,7 +32,7 @@ namespace boost { namespace interprocess { -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //!Helper class to define typedefs //!from IndexTraits @@ -58,21 +62,21 @@ struct iunordered_set_index_aux struct equal_function { bool operator()(const intrusive_compare_key_type &i, const value_type &b) const - { + { return (i.m_len == b.name_length()) && (std::char_traits<char_type>::compare (i.mp_str, b.name(), i.m_len) == 0); } bool operator()(const value_type &b, const intrusive_compare_key_type &i) const - { + { return (i.m_len == b.name_length()) && (std::char_traits<char_type>::compare (i.mp_str, b.name(), i.m_len) == 0); } bool operator()(const value_type &b1, const value_type &b2) const - { + { return (b1.name_length() == b2.name_length()) && (std::char_traits<char_type>::compare (b1.name(), b2.name(), b1.name_length()) == 0); @@ -116,7 +120,7 @@ struct iunordered_set_index_aux bucket_type init_bucket; }; }; -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED //!Index type based in boost::intrusive::set. //!Just derives from boost::intrusive::set @@ -127,7 +131,7 @@ class iunordered_set_index : private iunordered_set_index_aux<MapConfig>::allocator_holder , public iunordered_set_index_aux<MapConfig>::index_t { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) typedef iunordered_set_index_aux<MapConfig> index_aux; typedef typename index_aux::index_t index_type; typedef typename MapConfig:: @@ -139,7 +143,7 @@ class iunordered_set_index iunordered_set_index_aux<MapConfig>::allocator_type allocator_type; typedef typename iunordered_set_index_aux<MapConfig>::allocator_holder allocator_holder; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: typedef typename index_type::iterator iterator; @@ -151,7 +155,7 @@ class iunordered_set_index typedef typename index_type::bucket_traits bucket_traits; typedef typename index_type::size_type size_type; - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: typedef typename index_aux:: segment_manager_base segment_manager_base; @@ -190,7 +194,7 @@ class iunordered_set_index bucket_ptr shunk_p = alloc.allocation_command (boost::interprocess::shrink_in_place | boost::interprocess::nothrow_allocation, received_size, received_size, received_size, buckets).first; - BOOST_ASSERT(buckets == shunk_p); + BOOST_ASSERT(buckets == shunk_p); (void)shunk_p; bucket_ptr buckets_init = buckets + received_size; for(size_type i = 0; i < (old_size - received_size); ++i){ @@ -236,7 +240,7 @@ class iunordered_set_index iunordered_set_index<MapConfig>* get_this_pointer() { return this; } - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: //!Constructor. Takes a pointer to the @@ -290,7 +294,7 @@ class iunordered_set_index size_type cur_size = this->size(); size_type cur_count = this->bucket_count(); bucket_ptr old_p = this->bucket_pointer(); - + if(!this->size() && old_p != bucket_ptr(&this->init_bucket)){ this->rehash(bucket_traits(bucket_ptr(&this->init_bucket), 1)); destroy_buckets(this->alloc, old_p, cur_count); @@ -337,7 +341,7 @@ class iunordered_set_index //Strong guarantee: if something goes wrong //we should remove the insertion. // - //We can use the iterator because the hash function + //We can use the iterator because the hash function //can't throw and this means that "reserve" will //throw only because of the memory allocation: //the iterator has not been invalidated. @@ -349,7 +353,7 @@ class iunordered_set_index } }; -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //!Trait class to detect if an index is an intrusive //!index @@ -359,7 +363,7 @@ struct is_intrusive_index { static const bool value = true; }; -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED }} //namespace boost { namespace interprocess { diff --git a/boost/interprocess/indexes/map_index.hpp b/boost/interprocess/indexes/map_index.hpp index 1bfc7ce310..a744e9000e 100644 --- a/boost/interprocess/indexes/map_index.hpp +++ b/boost/interprocess/indexes/map_index.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,6 +11,10 @@ #ifndef BOOST_INTERPROCESS_MAP_INDEX_HPP #define BOOST_INTERPROCESS_MAP_INDEX_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> @@ -55,12 +59,12 @@ class map_index //Derive class from map specialization : public ipcdetail::map_index_aux<MapConfig>::index_t { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) typedef ipcdetail::map_index_aux<MapConfig> index_aux; typedef typename index_aux::index_t base_type; typedef typename MapConfig:: segment_manager_base segment_manager_base; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: //!Constructor. Takes a pointer to the @@ -80,7 +84,7 @@ class map_index { base_type::get_stored_allocator().deallocate_free_blocks(); } }; -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //!Trait class to detect if an index is a node //!index. This allows more efficient operations @@ -91,7 +95,7 @@ struct is_node_index { static const bool value = true; }; -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED }} //namespace boost { namespace interprocess { diff --git a/boost/interprocess/indexes/null_index.hpp b/boost/interprocess/indexes/null_index.hpp index a0353b101c..d0e026b896 100644 --- a/boost/interprocess/indexes/null_index.hpp +++ b/boost/interprocess/indexes/null_index.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -10,6 +10,10 @@ #ifndef BOOST_INTERPROCESS_NULL_INDEX_HPP #define BOOST_INTERPROCESS_NULL_INDEX_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> @@ -28,14 +32,14 @@ namespace interprocess { template <class MapConfig> class null_index { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) typedef typename MapConfig:: segment_manager_base segment_manager_base; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: - typedef void * iterator; - typedef const void * const_iterator; + typedef int * iterator; + typedef const int * const_iterator; //!begin() is equal //!to end() diff --git a/boost/interprocess/indexes/unordered_map_index.hpp b/boost/interprocess/indexes/unordered_map_index.hpp index 7cf4b85e65..f40d970819 100644 --- a/boost/interprocess/indexes/unordered_map_index.hpp +++ b/boost/interprocess/indexes/unordered_map_index.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,6 +11,10 @@ #ifndef BOOST_INTERPROCESS_UNORDERED_MAP_INDEX_HPP #define BOOST_INTERPROCESS_UNORDERED_MAP_INDEX_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> @@ -27,7 +31,7 @@ namespace boost { namespace interprocess { -///@cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //!Helper class to define typedefs from //!IndexTraits @@ -57,7 +61,7 @@ struct unordered_map_index_aux key_equal, allocator_type> index_t; }; -///@endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED //!Index type based in unordered_map. Just derives from unordered_map and //!defines the interface needed by managed memory segments @@ -66,12 +70,12 @@ class unordered_map_index //Derive class from unordered_map specialization : public unordered_map_index_aux<MapConfig>::index_t { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) typedef unordered_map_index_aux<MapConfig> index_aux; typedef typename index_aux::index_t base_type; typedef typename MapConfig::segment_manager_base segment_manager_base; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: //!Constructor. Takes a pointer to the @@ -93,7 +97,7 @@ class unordered_map_index { base_type::rehash(base_type::size()); } }; -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //!Trait class to detect if an index is a node //!index. This allows more efficient operations @@ -104,7 +108,7 @@ struct is_node_index { static const bool value = true; }; -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED }} //namespace boost { namespace interprocess { |