Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74127 - sandbox/mmap/boost/mmap/mapping
From: dsaritz_at_[hidden]
Date: 2011-08-29 10:22:13


Author: psiha
Date: 2011-08-29 10:22:12 EDT (Mon, 29 Aug 2011)
New Revision: 74127
URL: http://svn.boost.org/trac/boost/changeset/74127

Log:
Added the mapping/mapping.inl implementation selecting include file.
Added:
   sandbox/mmap/boost/mmap/mapping/mapping.inl
      - copied, changed from r74116, /sandbox/mmap/boost/mmap/mapping/win32/mapping.inl
Text files modified:
   sandbox/mmap/boost/mmap/mapping/mapping.hpp | 5 ++
   sandbox/mmap/boost/mmap/mapping/mapping.inl | 67 ---------------------------------------
   2 files changed, 6 insertions(+), 66 deletions(-)

Modified: sandbox/mmap/boost/mmap/mapping/mapping.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mapping/mapping.hpp (original)
+++ sandbox/mmap/boost/mmap/mapping/mapping.hpp 2011-08-29 10:22:12 EDT (Mon, 29 Aug 2011)
@@ -36,4 +36,9 @@
 //------------------------------------------------------------------------------
 } // namespace boost
 //------------------------------------------------------------------------------
+
+#ifdef BOOST_MMAP_HEADER_ONLY
+ #include "mapping.inl"
+#endif // BOOST_MMAP_HEADER_ONLY
+
 #endif // mapping_hpp

Copied: sandbox/mmap/boost/mmap/mapping/mapping.inl (from r74116, /sandbox/mmap/boost/mmap/mapping/win32/mapping.inl)
==============================================================================
--- /sandbox/mmap/boost/mmap/mapping/win32/mapping.inl (original)
+++ sandbox/mmap/boost/mmap/mapping/mapping.inl 2011-08-29 10:22:12 EDT (Mon, 29 Aug 2011)
@@ -13,70 +13,5 @@
 ///
 ////////////////////////////////////////////////////////////////////////////////
 //------------------------------------------------------------------------------
-#include "mapping.hpp"
-
-#include "../../detail/windows.hpp"
-//------------------------------------------------------------------------------
-namespace boost
-{
-//------------------------------------------------------------------------------
-namespace mmap
-{
-//------------------------------------------------------------------------------
-
-template <>
-BOOST_IMPL_INLINE
-mapped_view_reference<unsigned char, win32> mapped_view_reference<unsigned char, win32>::map
-(
- mapping<win32> const & source_mapping,
- boost::uint64_t const offset ,
- std ::size_t const desired_size
-)
-{
- // Implementation note:
- // Mapped views hold internal references to the following handles so we do
- // not need to hold/store them ourselves:
- // http://msdn.microsoft.com/en-us/library/aa366537(VS.85).aspx
- // (26.03.2010.) (Domagoj Saric)
-
- typedef mapped_view_reference<unsigned char, win32>::iterator iterator_t;
-
- ULARGE_INTEGER large_integer;
- large_integer.QuadPart = offset;
-
- iterator_t const view_start
- (
- static_cast<iterator_t>
- (
- ::MapViewOfFile
- (
- source_mapping.get(),
- source_mapping.view_mapping_flags,
- large_integer.HighPart,
- large_integer.LowPart,
- desired_size
- )
- )
- );
-
- return mapped_view_reference<unsigned char>
- (
- view_start,
- view_start
- ? view_start + desired_size
- : view_start
- );
-}
-
-
-template <> BOOST_IMPL_INLINE
-void detail::mapped_view_base<unsigned char const, win32>::unmap( detail::mapped_view_base<unsigned char const, win32> const & mapped_range )
-{
- BOOST_VERIFY( ::UnmapViewOfFile( mapped_range.begin() ) || mapped_range.empty() );
-}
-
-//------------------------------------------------------------------------------
-} // mmap
-//------------------------------------------------------------------------------
-} // boost
+#include BOOST_MMAP_IMPL_INCLUDE( BOOST_PP_EMPTY, BOOST_PP_IDENTITY( /mapping.inl ) )
 //------------------------------------------------------------------------------


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk