Update of /cvsroot/boost/boost/boost/interprocess
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29834
Modified Files:
offset_ptr.hpp segment_manager.hpp shared_memory_object.hpp
Log Message:
no message
Index: offset_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/offset_ptr.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- offset_ptr.hpp 12 Jun 2007 17:07:09 -0000 1.7
+++ offset_ptr.hpp 23 Jun 2007 12:53:00 -0000 1.8
@@ -21,8 +21,9 @@
#include <boost/interprocess/interprocess_fwd.hpp>
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/interprocess/detail/cast_tags.hpp>
-#include <boost/interprocess/detail/generic_cast.hpp>
+#include <boost/interprocess/detail/mpl.hpp>
#include <boost/assert.hpp>
+#include <iterator>
/*!\file
Describes a smart pointer that stores the offset between this pointer and
@@ -49,10 +50,10 @@
class offset_ptr
{
/// @cond
- typedef boost::interprocess::workaround::random_it<PointedType> random_it_t;
- typedef offset_ptr<PointedType> self_t;
- typedef typename random_it_t::const_pointer const_pointer_t;
- typedef typename random_it_t::const_reference const_reference_t;
+ typedef offset_ptr<PointedType> self_t;
+ typedef const PointedType * const_pointer_t;
+ typedef typename detail::add_reference
+ <const PointedType>::type const_reference_t;
void unspecified_bool_type_func() const {}
typedef void (self_t::*unspecified_bool_type)() const;
@@ -88,11 +89,12 @@
/// @endcond
public:
- typedef typename random_it_t::pointer pointer;
- typedef typename random_it_t::reference reference;
- typedef typename random_it_t::value_type value_type;
- typedef typename random_it_t::difference_type difference_type;
- typedef typename random_it_t::iterator_category iterator_category;
+ typedef PointedType * pointer;
+ typedef typename detail::
+ add_reference<PointedType>::type reference;
+ typedef PointedType value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::random_access_iterator_tag iterator_category;
public: //Public Functions
@@ -283,7 +285,8 @@
pt2 = ptr;
}
-/*!Simulation of static_cast between pointers. Never throws.*/
+/*
+//!Simulation of static_cast between pointers. Never throws.
template<class T, class U>
inline boost::interprocess::offset_ptr<T>
static_pointer_cast(boost::interprocess::offset_ptr<U> const & r)
@@ -292,7 +295,7 @@
(r, boost::interprocess::detail::static_cast_tag());
}
-/*!Simulation of const_cast between pointers. Never throws.*/
+//!Simulation of const_cast between pointers. Never throws.
template<class T, class U>
inline boost::interprocess::offset_ptr<T>
const_pointer_cast(boost::interprocess::offset_ptr<U> const & r)
@@ -301,7 +304,7 @@
(r, boost::interprocess::detail::const_cast_tag());
}
-/*!Simulation of dynamic_cast between pointers. Never throws.*/
+//!Simulation of dynamic_cast between pointers. Never throws.
template<class T, class U>
inline boost::interprocess::offset_ptr<T>
dynamic_pointer_cast(boost::interprocess::offset_ptr<U> const & r)
@@ -310,7 +313,7 @@
(r, boost::interprocess::detail::dynamic_cast_tag());
}
-/*!Simulation of reinterpret_cast between pointers. Never throws.*/
+//!Simulation of reinterpret_cast between pointers. Never throws.
template<class T, class U>
inline boost::interprocess::offset_ptr<T>
reinterpret_pointer_cast(boost::interprocess::offset_ptr<U> const & r)
@@ -318,21 +321,23 @@
return boost::interprocess::offset_ptr<T>
(r, boost::interprocess::detail::reinterpret_cast_tag());
}
-
+*/
} //namespace interprocess {
/// @cond
//!has_trivial_constructor<> == true_type specialization for optimizations
template <class T>
struct has_trivial_constructor< boost::interprocess::offset_ptr<T> >
- : public true_type
-{};
+{
+ enum { value = true };
+};
///has_trivial_destructor<> == true_type specialization for optimizations
template <class T>
struct has_trivial_destructor< boost::interprocess::offset_ptr<T> >
- : public true_type
-{};
+{
+ enum { value = true };
+};
//#if !defined(_MSC_VER) || (_MSC_VER >= 1400)
namespace interprocess {
@@ -350,32 +355,8 @@
} //namespace boost {
/// @cond
-namespace boost{
-namespace interprocess{
-
-/*!Simulation of cast operators between pointers.*/
-template<class T>
-class cast_to< offset_ptr<T> >
-{
- public:
- template<class S>
- static offset_ptr<T> using_static_cast(const offset_ptr<S> &s)
- { return offset_ptr<T>(s, detail::static_cast_tag()); }
- template<class S>
- static offset_ptr<T> using_reinterpret_cast(const offset_ptr<S> &s)
- { return offset_ptr<T>(s, detail::reinterpret_cast_tag()); }
-
- template<class S>
- static offset_ptr<T> using_const_cast(const offset_ptr<S> &s)
- { return offset_ptr<T>(s, detail::const_cast_tag()); }
-
- template<class S>
- static offset_ptr<T> using_dynamic_cast(const offset_ptr<S> &s)
- { return offset_ptr<T>(s, detail::dynamic_cast_tag()); }
-};
-
-} //namespace interprocess{
+namespace boost{
//This is to support embedding a bit in the pointer
//for intrusive containers, saving space
Index: segment_manager.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/segment_manager.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- segment_manager.hpp 12 Jun 2007 17:07:09 -0000 1.7
+++ segment_manager.hpp 23 Jun 2007 12:53:00 -0000 1.8
@@ -19,8 +19,9 @@
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/iterator/transform_iterator.hpp>
+#include <boost/interprocess/detail/type_traits.hpp>
+
+#include <boost/interprocess/detail/iterators.hpp>
#include <boost/interprocess/detail/mpl.hpp>
#include <boost/interprocess/detail/basic_segment_manager.hpp>
@@ -37,14 +38,16 @@
#include <exception>
#endif
-/*!\file
- Describes the object placed in a memory segment that provides
- named object allocation capabilities for single-segment and
- multi-segment allocations.
-*/
+//!\file
+//!Describes the object placed in a memory segment that provides
+//!named object allocation capabilities for single-segment and
+//!multi-segment allocations.
namespace boost{
namespace interprocess{
+
+/// @cond
+
namespace detail{
//Anti-exception node eraser
@@ -115,7 +118,7 @@
intrusive_value_type_impl(){}
- enum { BlockHdrAlignment = boost::alignment_of<block_header>::value };
+ enum { BlockHdrAlignment = detail::alignment_of<block_header>::value };
block_header *get_block_header() const
{
@@ -363,8 +366,8 @@
typedef detail::index_config<CharType, MemoryAlgorithm> index_config_named;
typedef detail::index_config<char, MemoryAlgorithm>
index_config_unique;
typedef IndexType<index_config_named> index_type;
- typedef bool_<is_intrusive_index<index_type>::value > is_intrusive_t;
- typedef bool_<is_node_index<index_type>::value> is_node_index_t;
+ typedef detail::bool_<is_intrusive_index<index_type>::value >
is_intrusive_t;
+ typedef detail::bool_<is_node_index<index_type>::value>
is_node_index_t;
public:
typedef IndexType<index_config_named> named_index_t;
@@ -381,19 +384,11 @@
typedef typename Base::mutex_family mutex_family;
-
- typedef boost::transform_iterator
- <named_transform
- ,typename named_index_t::const_iterator> const_named_iterator;
- typedef boost::transform_iterator
- <unique_transform
- ,typename unique_index_t::const_iterator> const_unique_iterator;
-/*
- typedef typename
- named_index_t::const_iterator const_named_iterator;
- typedef typename
- unique_index_t::const_iterator const_unique_iterator;
-*/
+ typedef transform_iterator
+ <typename named_index_t::const_iterator, named_transform>
const_named_iterator;
+ typedef transform_iterator
+ <typename unique_index_t::const_iterator, unique_transform>
const_unique_iterator;
+
//!Constructor proxy object definition helper class
template<class T>
struct construct_proxy
@@ -669,31 +664,40 @@
void zero_free_memory()
{ Base::zero_free_memory(); }
+ //!Returns a constant iterator to the beginning of the information about
+ //the named allocations performed in this segment manager
const_named_iterator named_begin() const
{
- return boost::make_transform_iterator
+ return make_transform_iterator
(m_header.m_named_index.begin(), named_transform());
}
+ //!Returns a constant iterator to the end of the information about
+ //the named allocations performed in this segment manager
const_named_iterator named_end() const
{
- return boost::make_transform_iterator
+ return make_transform_iterator
(m_header.m_named_index.end(), named_transform());
}
+ //!Returns a constant iterator to the beginning of the information about
+ //the unique allocations performed in this segment manager
const_unique_iterator unique_begin() const
{
- return boost::make_transform_iterator
+ return make_transform_iterator
(m_header.m_unique_index.begin(), unique_transform());
}
+ //!Returns a constant iterator to the end of the information about
+ //the unique allocations performed in this segment manager
const_unique_iterator unique_end() const
{
- return boost::make_transform_iterator
+ return make_transform_iterator
(m_header.m_unique_index.end(), unique_transform());
}
/// @cond
+
//!Generic named/anonymous new function. Offers all the possibilities,
//!such as throwing, search before creating, and the constructor is
//!encapsulated in an object function.
@@ -778,7 +782,7 @@
IndexType<detail::index_config<CharT, MemoryAlgorithm> > &index,
detail::in_place_interface &table,
std::size_t &length,
- true_ is_intrusive)
+ detail::true_ is_intrusive)
{
(void)is_intrusive;
typedef IndexType<detail::index_config<CharT, MemoryAlgorithm> >
index_type;
@@ -817,7 +821,7 @@
IndexType<detail::index_config<CharT, MemoryAlgorithm> > &index,
detail::in_place_interface &table,
std::size_t &length,
- false_ is_intrusive)
+ detail::false_ is_intrusive)
{
(void)is_intrusive;
typedef IndexType<detail::index_config<CharT, MemoryAlgorithm> >
index_type;
@@ -854,7 +858,7 @@
(block_header_t *block_header,
IndexType<detail::index_config<CharT, MemoryAlgorithm> > &index,
detail::in_place_interface &table,
- true_ is_node_index)
+ detail::true_ is_node_index)
{
(void)is_node_index;
typedef typename IndexType<detail::index_config<CharT, MemoryAlgorithm>
>::iterator index_it;
@@ -868,7 +872,7 @@
(block_header_t *block_header,
IndexType<detail::index_config<CharT, MemoryAlgorithm> > &index,
detail::in_place_interface &table,
- false_ is_node_index)
+ detail::false_ is_node_index)
{
(void)is_node_index;
CharT *name = static_cast<CharT*>(block_header->template name<CharT>());
@@ -879,7 +883,7 @@
bool priv_generic_named_destroy(const CharT *name,
IndexType<detail::index_config<CharT,
MemoryAlgorithm> > &index,
detail::in_place_interface &table,
- true_ is_intrusive_index)
+ detail::true_ is_intrusive_index)
{
(void)is_intrusive_index;
typedef IndexType<detail::index_config<CharT, MemoryAlgorithm> >
index_type;
@@ -930,7 +934,7 @@
bool priv_generic_named_destroy(const CharT *name,
IndexType<detail::index_config<CharT,
MemoryAlgorithm> > &index,
detail::in_place_interface &table,
- false_ is_intrusive_index)
+ detail::false_ is_intrusive_index)
{
(void)is_intrusive_index;
typedef IndexType<detail::index_config<CharT, MemoryAlgorithm> >
index_type;
@@ -1010,7 +1014,7 @@
bool dothrow,
detail::in_place_interface &table,
IndexType<detail::index_config<CharT,
MemoryAlgorithm> > &index,
- true_ is_intrusive)
+ detail::true_ is_intrusive)
{
(void)is_intrusive;
std::size_t namelen = std::char_traits<CharT>::length(name);
@@ -1132,7 +1136,7 @@
bool dothrow,
detail::in_place_interface &table,
IndexType<detail::index_config<CharT,
MemoryAlgorithm> > &index,
- false_ is_intrusive)
+ detail::false_ is_intrusive)
{
(void)is_intrusive;
std::size_t namelen = std::char_traits<CharT>::length(name);
Index: shared_memory_object.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/shared_memory_object.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- shared_memory_object.hpp 12 Jun 2007 17:07:09 -0000 1.4
+++ shared_memory_object.hpp 23 Jun 2007 12:53:00 -0000 1.5
@@ -15,8 +15,8 @@
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/detail/creation_tags.hpp>
#include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/detail/utilities.hpp>
-#include <boost/detail/workaround.hpp>
+//#include <boost/interprocess/detail/utilities.hpp>
+#include <boost/interprocess/detail/move.hpp>
#include <boost/interprocess/interprocess_fwd.hpp>
#include <boost/interprocess/exceptions.hpp>
#include <boost/interprocess/detail/os_file_functions.hpp>
@@ -129,6 +129,7 @@
/// @cond
private:
+
//!Closes a previously opened file mapping. Never throws.
void priv_close();
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs