Update of /cvsroot/boost/boost/boost/interprocess/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20029/detail
Modified Files:
algorithms.hpp file_wrapper.hpp
Removed Files:
basic_segment_manager.hpp creation_tags.hpp gcd_lcm.hpp
Log Message:
New Interprocess version
Index: algorithms.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/detail/algorithms.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- algorithms.hpp 12 Jun 2007 17:07:07 -0000 1.1
+++ algorithms.hpp 22 Jul 2007 14:02:18 -0000 1.2
@@ -19,6 +19,7 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
+#include <boost/interprocess/detail/iterators.hpp>
#include <boost/get_pointer.hpp>
#include <boost/detail/no_exceptions_support.hpp>
@@ -105,6 +106,18 @@
return (constructed);
}
+template<class T, class InpIt>
+inline void construct_in_place(T* dest, InpIt source)
+{
+ new(dest)T(*source);
+}
+
+template<class T, class U, class D>
+inline void construct_in_place(T *dest, default_construct_iterator<U, D>)
+{
+ new(dest)T();
+}
+
template<class InIt, class FwdIt> inline
FwdIt uninitialized_copy(InIt first, InIt last, FwdIt dest)
{
@@ -143,7 +156,7 @@
BOOST_TRY{
//Try to build objects
for (; --new_count; ++dest, ++first){
- new(detail::get_pointer(&*dest))value_type(*first);
+ construct_in_place(detail::get_pointer(&*dest), first);
}
}
BOOST_CATCH(...){
Index: file_wrapper.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/detail/file_wrapper.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- file_wrapper.hpp 23 Jun 2007 12:52:18 -0000 1.5
+++ file_wrapper.hpp 22 Jul 2007 14:02:19 -0000 1.6
@@ -14,9 +14,9 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/detail/os_file_functions.hpp>
-#include <boost/interprocess/detail/creation_tags.hpp>
+#include <boost/interprocess/creation_tags.hpp>
#include <boost/interprocess/detail/move.hpp>
-#include <boost/interprocess/detail/creation_tags.hpp>
+#include <boost/interprocess/creation_tags.hpp>
namespace boost {
namespace interprocess {
@@ -31,19 +31,19 @@
/*!Creates a shared memory object with name "name" and mode "mode", with
the access mode "mode"
If the file previously exists, throws an error.*/
- file_wrapper(detail::create_only_t, const char *name, mode_t mode)
- { this->priv_open_or_create(DoCreate, name, mode); }
+ file_wrapper(create_only_t, const char *name, mode_t mode)
+ { this->priv_open_or_create(detail::DoCreate, name, mode); }
/*!Tries to create a file with name "name" and mode "mode", with the
access mode "mode". If the file previously exists, it tries to open it
with mode "mode".
Otherwise throws an error.*/
- file_wrapper(detail::open_or_create_t, const char *name, mode_t mode)
- { this->priv_open_or_create(DoCreateOrOpen, name, mode); }
+ file_wrapper(open_or_create_t, const char *name, mode_t mode)
+ { this->priv_open_or_create(detail::DoCreateOrOpen, name, mode); }
/*!Tries to open a shared memory object with name "name", with the access
mode "mode".
If the file does not previously exist, it throws an error.*/
- file_wrapper(detail::open_only_t, const char *name, mode_t mode)
- { this->priv_open_or_create(DoOpen, name, mode); }
+ file_wrapper(open_only_t, const char *name, mode_t mode)
+ { this->priv_open_or_create(detail::DoOpen, name, mode); }
/*!Moves the ownership of "moved"'s shared memory object to *this.
After the call, "moved" does not represent any shared memory object.
@@ -104,7 +104,7 @@
/*!Closes a previously opened file mapping. Never throws.*/
void priv_close();
/*!Closes a previously opened file mapping. Never throws.*/
- bool priv_open_or_create(create_enum_t type, const char *filename, mode_t
mode);
+ bool priv_open_or_create(detail::create_enum_t type, const char *filename,
mode_t mode);
file_handle_t m_handle;
mode_t m_mode;
@@ -136,7 +136,7 @@
{ return m_mode; }
inline bool file_wrapper::priv_open_or_create
- (create_enum_t type,
+ (detail::create_enum_t type,
const char *filename,
mode_t mode)
{
@@ -149,13 +149,13 @@
//Open file existing native API to obtain the handle
switch(type){
- case DoOpen:
+ case detail::DoOpen:
m_handle = open_existing_file(filename, mode);
break;
- case DoCreate:
+ case detail::DoCreate:
m_handle = create_new_file(filename, mode);
break;
- case DoCreateOrOpen:
+ case detail::DoCreateOrOpen:
m_handle = create_or_open_file(filename, mode);
break;
default:
--- basic_segment_manager.hpp DELETED ---
--- creation_tags.hpp DELETED ---
--- gcd_lcm.hpp DELETED ---
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs