Boost logo

Boost-Commit :

From: dlwalker_at_[hidden]
Date: 2007-07-12 00:01:57


Author: dlwalker
Date: 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
New Revision: 7410
URL: http://svn.boost.org/trac/boost/changeset/7410

Log:
Moved all my old projects to a (shared) separate subdirectory. TODO: make distinct subdirectories for each project.

Added:
   sandbox/old_dlwalker_stuff/
   sandbox/old_dlwalker_stuff/boost/
   sandbox/old_dlwalker_stuff/boost/bit_reference.hpp
      - copied unchanged from r7409, /sandbox/boost/bit_reference.hpp
   sandbox/old_dlwalker_stuff/boost/bit_vector.hpp
      - copied unchanged from r7409, /sandbox/boost/bit_vector.hpp
   sandbox/old_dlwalker_stuff/boost/io/
   sandbox/old_dlwalker_stuff/boost/io/array_stream.hpp
      - copied unchanged from r7409, /sandbox/boost/io/array_stream.hpp
   sandbox/old_dlwalker_stuff/boost/io/cstdio/
      - copied from r7409, /sandbox/boost/io/cstdio/
   sandbox/old_dlwalker_stuff/boost/io/cstdio.hpp
      - copied unchanged from r7409, /sandbox/boost/io/cstdio.hpp
   sandbox/old_dlwalker_stuff/boost/io/iomanip.hpp
      - copied unchanged from r7409, /sandbox/boost/io/iomanip.hpp
   sandbox/old_dlwalker_stuff/boost/io/iomanip_expect.hpp
      - copied unchanged from r7409, /sandbox/boost/io/iomanip_expect.hpp
   sandbox/old_dlwalker_stuff/boost/io/iomanip_form.hpp
      - copied unchanged from r7409, /sandbox/boost/io/iomanip_form.hpp
   sandbox/old_dlwalker_stuff/boost/io/iomanip_general.hpp
      - copied unchanged from r7409, /sandbox/boost/io/iomanip_general.hpp
   sandbox/old_dlwalker_stuff/boost/io/iomanip_in.hpp
      - copied unchanged from r7409, /sandbox/boost/io/iomanip_in.hpp
   sandbox/old_dlwalker_stuff/boost/io/iomanip_out.hpp
      - copied unchanged from r7409, /sandbox/boost/io/iomanip_out.hpp
   sandbox/old_dlwalker_stuff/boost/io/iomanip_repeat.hpp
      - copied unchanged from r7409, /sandbox/boost/io/iomanip_repeat.hpp
   sandbox/old_dlwalker_stuff/boost/io/null_stream.hpp
      - copied unchanged from r7409, /sandbox/boost/io/null_stream.hpp
   sandbox/old_dlwalker_stuff/boost/io/pointer_stream.hpp
      - copied unchanged from r7409, /sandbox/boost/io/pointer_stream.hpp
   sandbox/old_dlwalker_stuff/boost/io/streambuf_wrapping.hpp
      - copied unchanged from r7409, /sandbox/boost/io/streambuf_wrapping.hpp
   sandbox/old_dlwalker_stuff/boost/io/value_stream.hpp
      - copied unchanged from r7409, /sandbox/boost/io/value_stream.hpp
   sandbox/old_dlwalker_stuff/boost/math/
      - copied from r7409, /sandbox/boost/math/
   sandbox/old_dlwalker_stuff/boost/memory/
      - copied from r7409, /sandbox/boost/memory/
   sandbox/old_dlwalker_stuff/boost/memory_fwd.hpp
      - copied unchanged from r7409, /sandbox/boost/memory_fwd.hpp
   sandbox/old_dlwalker_stuff/libs/
   sandbox/old_dlwalker_stuff/libs/io/
   sandbox/old_dlwalker_stuff/libs/io/doc/
      - copied from r7409, /sandbox/libs/io/doc/
   sandbox/old_dlwalker_stuff/libs/io/test/
      - copied from r7409, /sandbox/libs/io/test/
   sandbox/old_dlwalker_stuff/libs/math/
      - copied from r7409, /sandbox/libs/math/
   sandbox/old_dlwalker_stuff/libs/memory/
      - copied from r7409, /sandbox/libs/memory/
Removed:
   sandbox/boost/bit_reference.hpp
   sandbox/boost/bit_vector.hpp
   sandbox/boost/io/array_stream.hpp
   sandbox/boost/io/cstdio/
   sandbox/boost/io/cstdio.hpp
   sandbox/boost/io/iomanip.hpp
   sandbox/boost/io/iomanip_expect.hpp
   sandbox/boost/io/iomanip_form.hpp
   sandbox/boost/io/iomanip_general.hpp
   sandbox/boost/io/iomanip_in.hpp
   sandbox/boost/io/iomanip_out.hpp
   sandbox/boost/io/iomanip_repeat.hpp
   sandbox/boost/io/null_stream.hpp
   sandbox/boost/io/pointer_stream.hpp
   sandbox/boost/io/streambuf_wrapping.hpp
   sandbox/boost/io/value_stream.hpp
   sandbox/boost/math/
   sandbox/boost/memory/
   sandbox/boost/memory_fwd.hpp
   sandbox/libs/io/doc/
   sandbox/libs/io/test/
   sandbox/libs/math/
   sandbox/libs/memory/

Deleted: sandbox/boost/bit_reference.hpp
==============================================================================
--- sandbox/boost/bit_reference.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,220 +0,0 @@
-// Boost bit reference library header file ---------------------------------//
-
-// (C) Copyright Daryle Walker 2002. Permission to copy, use, modify, sell and
-// distribute this software is granted provided this copyright notice appears
-// in all copies. This software is provided "as is" without express or
-// implied warranty, and with no claim as to its suitability for any purpose.
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#ifndef BOOST_BIT_REFERENCE_HPP
-#define BOOST_BIT_REFERENCE_HPP
-
-#include <boost/limits.hpp> // for std::numeric_limits
-#include <boost/static_assert.hpp> // for BOOST_STATIC_ASSERT
-
-#include <cstddef> // for std::size_t
-
-
-
-namespace boost
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename BitBucket >
- class const_bit_reference;
-
-template < typename BitBucket >
- class bit_reference;
-
-
-// Constant bit reference class declaration --------------------------------//
-
-template < typename BitBucket >
-class const_bit_reference
-{
- typedef std::numeric_limits<BitBucket> limits_type;
-
- BOOST_STATIC_ASSERT( limits_type::is_specialized && !limits_type::is_signed
- && limits_type::is_integer && (limits_type::radix == 2) );
-
-public:
- typedef BitBucket block_type;
-
- const_bit_reference( block_type const &ref, std::size_t bit_pos );
-
- operator bool() const;
-
- bool operator !() const;
-
-private:
- const_bit_reference( block_type const &ref, block_type const &mask );
-
- block_type const & ref_;
- block_type const mask_;
-
- friend class bit_reference<BitBucket>;
-
-}; // boost::const_bit_reference
-
-
-// Bit reference class declaration -----------------------------------------//
-
-template < typename BitBucket >
-class bit_reference
-{
- typedef bit_reference<BitBucket> self_type;
- typedef const_bit_reference<BitBucket> const_reference_type;
-
-public:
- typedef BitBucket block_type;
-
- bit_reference( block_type &ref, std::size_t bit_pos );
-
- operator bool() const;
- operator const_reference_type() const;
-
- bool operator !() const;
-
- self_type & operator =( const_reference_type const &ref );
- self_type & operator =( self_type const &ref );
- self_type & operator =( bool val );
-
- void flip();
-
-private:
- block_type & ref_;
- block_type const mask_;
-
-}; // boost::bit_reference
-
-
-// Constant bit reference class function definitions -----------------------//
-
-template < typename BitBucket >
-const_bit_reference<BitBucket>::const_bit_reference
-(
- block_type const & ref,
- block_type const & mask
-)
- : ref_( ref ), mask_( mask )
-{
-}
-
-template < typename BitBucket >
-const_bit_reference<BitBucket>::const_bit_reference
-(
- block_type const & ref,
- std::size_t bit_pos
-)
- : ref_( ref ), mask_( static_cast<block_type>(1u) << bit_pos )
-{
-}
-
-template < typename BitBucket >
-const_bit_reference<BitBucket>::operator bool
-(
-) const
-{
- return ref_ & mask_;
-}
-
-template < typename BitBucket >
-bool
-const_bit_reference<BitBucket>::operator !
-(
-) const
-{
- return !this->operator bool();
-}
-
-
-// Bit reference class function definitions --------------------------------//
-
-template < typename BitBucket >
-bit_reference<BitBucket>::bit_reference
-(
- block_type & ref,
- std::size_t bit_pos
-)
- : ref_( ref ), mask_( static_cast<block_type>(1u) << bit_pos )
-{
-}
-
-template < typename BitBucket >
-bit_reference<BitBucket>::operator bool
-(
-) const
-{
- return ref_ & mask_;
-}
-
-template < typename BitBucket >
-bit_reference<BitBucket>::operator const_bit_reference<BitBucket>
-(
-) const
-{
- return const_reference_type( ref_, mask_ );
-}
-
-template < typename BitBucket >
-bool
-bit_reference<BitBucket>::operator !
-(
-) const
-{
- return !this->operator bool();
-}
-
-template < typename BitBucket >
-bit_reference<BitBucket> &
-bit_reference<BitBucket>::operator =
-(
- const_bit_reference<BitBucket> const & ref
-)
-{
- if ( !ref != !(*this) )
- this->flip();
- return *this;
-}
-
-template < typename BitBucket >
-bit_reference<BitBucket> &
-bit_reference<BitBucket>::operator =
-(
- bit_reference<BitBucket> const & ref
-)
-{
- if ( !ref != !(*this) )
- this->flip();
- return *this;
-}
-
-template < typename BitBucket >
-bit_reference<BitBucket> &
-bit_reference<BitBucket>::operator =
-(
- bool val
-)
-{
- if ( !val != !(*this) )
- this->flip();
- return *this;
-}
-
-template < typename BitBucket >
-void
-bit_reference<BitBucket>::flip
-(
-)
-{
- ref_ ^= mask_;
-}
-
-
-} // namespace boost
-
-
-#endif // BOOST_BIT_REFERENCE_HPP

Deleted: sandbox/boost/bit_vector.hpp
==============================================================================
--- sandbox/boost/bit_vector.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,941 +0,0 @@
-// Boost bit-vector library header file ------------------------------------//
-
-// (C) Copyright Daryle Walker 2002. Permission to copy, use, modify, sell and
-// distribute this software is granted provided this copyright notice appears
-// in all copies. This software is provided "as is" without express or
-// implied warranty, and with no claim as to its suitability for any purpose.
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#ifndef BOOST_BIT_VECTOR_HPP
-#define BOOST_BIT_VECTOR_HPP
-
-#include <boost/bit_reference.hpp> // for boost::bit_reference, etc.
-#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT, etc.
-#include <boost/cstdint.hpp> // for boost::uintmax_t
-#include <boost/limits.hpp> // for std::numeric_limits
-#include <boost/operators.hpp> // for boost::unit_steppable, etc.
-
-#include <algorithm> // for std::swap, etc.
-#include <bitset> // for std::bitset
-#include <cstddef> // for std::size_t, NULL
-#include <iterator> // for std::reverse_iterator, etc.
-#include <memory> // for std::allocator
-#include <stdexcept> // for std::out_of_range
-#include <utility> // for std::pair
-#include <vector> // for std::vector
-
-
-namespace boost
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename BlockType = uintmax_t, class Allocator
- = std::allocator<BlockType> >
- class bit_vector;
-
-typedef bit_vector<> std_bit_vector;
-
-template < typename BlockType, class Allocator >
- void swap( bit_vector<BlockType, Allocator> &a, bit_vector<BlockType,
- Allocator> &b );
-
-
-// Forward declarations for implementation detail stuff --------------------//
-// (Just for the stuff that will be needed for the next section)
-
-namespace detail
-{
-
-template < typename BlockType, class Allocator >
- class const_bit_vector_iterator;
-
-template < typename BlockType, class Allocator >
- class bit_vector_iterator;
-
-} // namespace detail
-
-
-// Bit-vector (and set) class declaration ----------------------------------//
-
-template < typename BlockType, class Allocator >
-class bit_vector
- : public ordered_euclidian_ring_operators1< bit_vector<BlockType, Allocator>
- , bitwise1< bit_vector<BlockType, Allocator>
- , unit_steppable< bit_vector<BlockType, Allocator>
- , shiftable2< bit_vector<BlockType, Allocator>, typename Allocator::size_type
- > > > >
-{
- friend class detail::const_bit_vector_iterator<BlockType, Allocator>;
- friend class detail::bit_vector_iterator<BlockType, Allocator>;
-
- typedef std::vector<BlockType, Allocator> vector_type;
- typedef std::numeric_limits<BlockType> limits_type;
- typedef bit_vector<BlockType, Allocator> self_type;
-
- BOOST_STATIC_CONSTANT( int, block_size = limits_type::digits );
-
-public:
- // Types
- typedef bool value_type;
-
- typedef bit_reference<BlockType> reference;
- typedef const_bit_reference<BlockType> const_reference;
-
- typedef detail::bit_vector_iterator<BlockType, Allocator> iterator;
-
- typedef detail::const_bit_vector_iterator<BlockType, Allocator>
- const_iterator;
-
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
- typedef typename Allocator::size_type size_type;
- typedef typename Allocator::difference_type difference_type;
-
- typedef BlockType block_type;
- typedef Allocator allocator_type;
-
- typedef self_type & (self_type::* bool_type )();
-
- // Class-static functions
- static std::pair<self_type, self_type> div( self_type const &dividend,
- self_type const &divisor );//not implemented
-
- static self_type from_ulong( unsigned long val );
-
- // Structors (use automatic copy ctr. and dtr.)
- explicit bit_vector( allocator_type const &a = allocator_type() );
- explicit bit_vector( size_type n, bool value = false,
- allocator_type const &a = allocator_type() );
-
- #ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- template < typename InputIterator >
- bit_vector( InputIterator beg, InputIterator end,
- allocator_type const &a = allocator_type() );//not implemented
- #endif
-
- #ifndef BOOST_NO_MEMBER_TEMPLATES
- template < class Allocator2 >
- explicit bit_vector( std::vector<bool, Allocator2> const &v,
- allocator_type const &a = allocator_type() );//not implemented
-
- template < std::size_t N >
- explicit bit_vector( std::bitset<N> const &b,
- allocator_type const &a = allocator_type() );//not implemented
- #endif
-
- // Size operations
- size_type size() const;
- bool empty() const;
- size_type max_size() const;
-
- // Capacity operations
- size_type capacity() const;
- void reserve( size_type n );
-
- // Comparison operations
- bool operator ==( self_type const &x ) const;//not implemented
- bool operator <( self_type const &x ) const;//not implemented
-
- // Condition checking
- size_type count() const;//not implemented
- bool any() const;
- bool none() const;
-
- // Assignments (use automatic regular-assignment operator)
- void assign( size_type n, bool value );//not implemented
-
- #ifndef BOOST_NO_MEMBER_TEMPLATES
- template < typename InputIterator >
- void assign( InputIterator beg, InputIterator end );//not implemented
- #endif
-
- void swap( self_type &c );
-
- self_type & operator ^=( self_type const &c );//not implemented
- self_type & operator |=( self_type const &c );//not implemented
- self_type & operator &=( self_type const &c );//not implemented
- self_type & operator <<=( size_type s );//not implemented
- self_type & operator >>=( size_type s );//not implemented
-
- self_type & operator +=( self_type const &c );//not implemented
- self_type & operator -=( self_type const &c );//not implemented
- self_type & operator *=( self_type const &c );//not implemented
- self_type & operator /=( self_type const &c );
- self_type & operator %=( self_type const &c );
-
- // Direct element access
- reference at( size_type i );
- const_reference at( size_type i ) const;
-
- reference operator []( size_type i );
- const_reference operator []( size_type i ) const;
-
- reference front();
- const_reference front() const;
-
- reference back();
- const_reference back() const;
-
- // Other element access
- bool test( size_type i ) const;
-
- self_type & set();
- self_type & set( size_type i, bool value = true );
-
- self_type & reset();
- self_type & reset( size_type i );
-
- self_type & flip();//not implemented
- self_type & flip( size_type i );
-
- // Iterator generation
- iterator begin();
- const_iterator begin() const;
-
- iterator end();
- const_iterator end() const;
-
- reverse_iterator rbegin();
- const_reverse_iterator rbegin() const;
-
- reverse_iterator rend();
- const_reverse_iterator rend() const;
-
- // Element insertion and removal
- iterator insert( iterator p, bool value );//not implemented
- void insert( iterator p, size_type n, bool value );//not implemented
-
- #ifndef BOOST_NO_MEMBER_TEMPLATES
- template < typename InputIterator >
- void insert( iterator p, InputIterator beg, InputIterator end );//not implemented
- #endif
-
- void push_back( bool value );
- void pop_back();
-
- iterator erase( iterator p );//not implemented
- iterator erase( iterator beg, iterator end );//not implemented
-
- void resize( size_type n, bool value = false );//not implemented
- void clear();//not implemented
-
- // More operations
- bool operator !() const;
- self_type operator ~() const;
- self_type operator -() const;//not implemented
- self_type operator +() const;
-
- self_type & operator --() const;//not implemented
- self_type & operator ++() const;//not implemented
-
- operator bool_type() const;
-
- uintmax_t to_uintmax_t() const;//not implemented
-
- // Allocator support
- allocator_type get_allocator() const;
-
-private:
- // Helper functions
- static size_type whole_blocks_for_bit_count( size_type c );
- static size_type extra_bits_for_bit_count( size_type c );
- static size_type blocks_for_bit_count( size_type c );
- static size_type max_bits_for_block_count( size_type c );
-
- static block_type empty_block();
- static block_type full_block();
-
- void cleanup();
-
- // Data members
- vector_type v_;
- int next_pos_;
-
-}; // boost::bit_vector
-
-
-// Implementation detail stuff ---------------------------------------------//
-
-namespace detail
-{
-
-template < typename BlockType, class Allocator >
-class const_bit_vector_iterator
- : public bidirectional_iterator_helper< const_bit_vector_iterator<BlockType
- , Allocator>
- , bool
- , typename Allocator::difference_type
- , typename Allocator::pointer
- , const_bit_reference<BlockType>
- >
-{
- friend class bit_vector_iterator<BlockType, Allocator>;
- friend class bit_vector<BlockType, Allocator>;
-
- typedef const_bit_vector_iterator<BlockType, Allocator> self_type;
-
- typedef bit_vector<BlockType, Allocator> container_type;
- typedef typename container_type::vector_type vector_type;
- typedef typename vector_type::const_iterator const_iterator;
- typedef typename container_type::size_type size_type;
-
- const_iterator vi_;
- size_type pos_;
-
- const_bit_vector_iterator( const_iterator vi, size_type pos )
- : vi_( vi ), pos_( pos )
- {}
-
-public:
- // Types
- typedef const_bit_reference<BlockType> reference;
-
- // Operations
- reference operator *() const
- { return reference( &*vi_, pos_ ); }
-
- self_type & operator ++()
- { if ( ++pos_ >= container_type::block_size ) { ++vi_; pos_ = 0; } return *this; }
-
- self_type & operator --()
- { if ( pos_-- <= 0 ) { --vi_; pos_ = container_type::block_size - 1; } return *this; }
-
- bool operator ==( self_type const &c ) const
- { return ( vi_ == c.vi_ ) && ( pos_ == c.pos_ ); }
-
-};
-
-template < typename BlockType, class Allocator >
-class bit_vector_iterator
- : public bidirectional_iterator_helper< bit_vector_iterator<BlockType
- , Allocator>
- , bool
- , typename Allocator::difference_type
- , typename Allocator::pointer
- , bit_reference<BlockType>
- >
-{
- friend class bit_vector<BlockType, Allocator>;
-
- typedef bit_vector_iterator<BlockType, Allocator> self_type;
-
- typedef bit_vector<BlockType, Allocator> container_type;
- typedef typename container_type::vector_type vector_type;
- typedef typename vector_type::iterator iterator;
- typedef typename container_type::size_type size_type;
-
- typedef const_bit_vector_iterator<BlockType, Allocator>
- const_iterator_type;
-
- iterator vi_;
- size_type pos_;
-
- bit_vector_iterator( iterator vi, size_type pos )
- : vi_( vi ), pos_( pos )
- {}
-
-public:
- // Types
- typedef bit_reference<BlockType> reference;
-
- // Operations
- operator const_iterator_type() const
- { return const_iterator_type( vi_, pos_ ); }
-
- reference operator *() const
- { return reference( &*vi_, pos_ ); }
-
- self_type & operator ++()
- { if ( ++pos_ >= container_type::block_size ) { ++vi_; pos_ = 0; } return *this; }
-
- self_type & operator --()
- { if ( pos_-- <= 0 ) { --vi_; pos_ = container_type::block_size - 1; } return *this; }
-
- bool operator ==( self_type const &c ) const
- { return ( vi_ == c.vi_ ) && ( pos_ == c.pos_ ); }
-
-};
-
-} // namespace detail
-
-
-// Bit-vector (and set) class function definitions -------------------------//
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator>
-bit_vector<BlockType, Allocator>::from_ulong
-(
- unsigned long val
-)
-{
- return self_type( std::bitset<std::numeric_limits<unsigned
- long>::digits>(val) );
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator>::bit_vector
-(
- allocator_type const & a // = allocator_type()
-)
- : v_( a )
- , next_pos_( 0 )
-{
- this->cleanup();
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator>::bit_vector
-(
- size_type n,
- bool value, // = false
- allocator_type const & a // = allocator_type()
-)
- : v_( self_type::blocks_for_bit_count(n), value ? self_type::full_block()
- : self_type::empty_block(), a )
- , next_pos_( self_type::extra_bits_for_bit_count(n) )
-
-{
- this->cleanup();
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::size_type
-bit_vector<BlockType, Allocator>::size
-(
-) const
-{
- return this->v_.size() * self_type::block_size
- - ( self_type::block_size - this->next_pos_ ) % self_type::block_size;
-}
-
-template < typename BlockType, class Allocator >
-inline
-bool
-bit_vector<BlockType, Allocator>::empty
-(
-) const
-{
- return this->v_.empty(); // this->next_pos_ had better be zero!
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::size_type
-bit_vector<BlockType, Allocator>::max_size
-(
-) const
-{
- return self_type::max_bits_for_block_count( this->v_.max_size() );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::size_type
-bit_vector<BlockType, Allocator>::capacity
-(
-) const
-{
- return self_type::max_bits_for_block_count( this->v_.capacity() );
-}
-
-template < typename BlockType, class Allocator >
-inline
-void
-bit_vector<BlockType, Allocator>::reserve( size_type n )
-{
- this->v_.reserve( self_type::blocks_for_bit_count(n) );
-}
-
-template < typename BlockType, class Allocator >
-inline
-bool
-bit_vector<BlockType, Allocator>::any
-(
-) const
-{
- return std::find( this->begin(), this->end(), true ) != this->end();
-}
-
-template < typename BlockType, class Allocator >
-inline
-bool
-bit_vector<BlockType, Allocator>::none
-(
-) const
-{
- return !this->any();
-}
-
-template < typename BlockType, class Allocator >
-inline
-void
-bit_vector<BlockType, Allocator>::swap
-(
- self_type & c
-)
-{
- this->v_.swap( c.v_ );
- std::swap( this->last_pos_, c.last_pos_ );
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator> &
-bit_vector<BlockType, Allocator>::operator /=
-(
- self_type const & c
-)
-{
- return (*this) = self_type::div( (*this), c ).first;
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator> &
-bit_vector<BlockType, Allocator>::operator %=
-(
- self_type const & c
-)
-{
- return (*this) = self_type::div( (*this), c ).second;
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::reference
-bit_vector<BlockType, Allocator>::at
-(
- size_type i
-)
-{
- if ( (i < 0) || (i >= this->size()) )
- {
- throw std::out_of_range( "index out of range" );
- }
-
- return this->operator []( i );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_reference
-bit_vector<BlockType, Allocator>::at
-(
- size_type i
-) const
-{
- if ( (i < 0) || (i >= this->size()) )
- {
- throw std::out_of_range( "index out of range" );
- }
-
- return this->operator []( i );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::reference
-bit_vector<BlockType, Allocator>::operator []
-(
- size_type i
-)
-{
- size_type const block_i = i / self_type::block_size;
- size_type const mask_i = i % self_type::block_size;
-
- return self_type::reference( this->v_[block_i], mask_i );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_reference
-bit_vector<BlockType, Allocator>::operator []
-(
- size_type i
-) const
-{
- size_type const block_i = i / self_type::block_size;
- size_type const mask_i = i % self_type::block_size;
-
- return self_type::const_reference( this->v_[block_i], mask_i );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::reference
-bit_vector<BlockType, Allocator>::front
-(
-)
-{
- return *this->begin();
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_reference
-bit_vector<BlockType, Allocator>::front
-(
-) const
-{
- return *this->begin();
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::reference
-bit_vector<BlockType, Allocator>::back
-(
-)
-{
- return *this->rbegin();
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_reference
-bit_vector<BlockType, Allocator>::back
-(
-) const
-{
- return *this->rbegin();
-}
-
-template < typename BlockType, class Allocator >
-inline
-bool
-bit_vector<BlockType, Allocator>::test
-(
- size_type i
-) const
-{
- return this->at( i );
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator> &
-bit_vector<BlockType, Allocator>::set
-(
-)
-{
- this->assign( this->size(), true );
- return *this;
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator> &
-bit_vector<BlockType, Allocator>::set
-(
- size_type i,
- bool value // = true
-)
-{
- this->at( i ) = value;
- return *this;
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator> &
-bit_vector<BlockType, Allocator>::reset
-(
-)
-{
- this->assign( this->size(), false );
- return *this;
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator> &
-bit_vector<BlockType, Allocator>::reset
-(
- size_type i
-)
-{
- return this->set( i, false );
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator> &
-bit_vector<BlockType, Allocator>::flip
-(
- size_type i
-)
-{
- ( this->at(i) ).flip();
- return *this;
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::iterator
-bit_vector<BlockType, Allocator>::begin
-(
-)
-{
- return iterator( this->v_.begin(), 0u );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_iterator
-bit_vector<BlockType, Allocator>::begin
-(
-) const
-{
- return const_iterator( this->v_.begin(), 0u );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::iterator
-bit_vector<BlockType, Allocator>::end
-(
-)
-{
- return iterator( this->v_.end() - static_cast<size_type>(this->next_pos_ != 0),
- this->next_pos_ );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_iterator
-bit_vector<BlockType, Allocator>::end
-(
-) const
-{
- return const_iterator( this->v_.end() - static_cast<size_type>(this->next_pos_
- != 0), this->next_pos_ );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::reverse_iterator
-bit_vector<BlockType, Allocator>::rbegin
-(
-)
-{
- return reverse_iterator( this->end() );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_reverse_iterator
-bit_vector<BlockType, Allocator>::rbegin
-(
-) const
-{
- return const_reverse_iterator( this->end() );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::reverse_iterator
-bit_vector<BlockType, Allocator>::rend
-(
-)
-{
- return reverse_iterator( this->begin() );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::const_reverse_iterator
-bit_vector<BlockType, Allocator>::rend
-(
-) const
-{
- return const_reverse_iterator( this->begin() );
-}
-
-template < typename BlockType, class Allocator >
-inline
-void
-bit_vector<BlockType, Allocator>::push_back
-(
- bool value
-)
-{
- if ( this->next_pos_++ == 0 )
- this->v_.push_back( static_cast<block_type>(value) );
- this->next_pos_ %= self_type::block_size;
- this->back() = value;
- this->cleanup();
-}
-
-template < typename BlockType, class Allocator >
-inline
-void
-bit_vector<BlockType, Allocator>::pop_back
-(
-)
-{
- if ( this->next_pos_-- == 0 )
- this->v_.pop_back();
- while ( this->next_pos < 0 )
- this->next_pos_ += self_type::block_size;
- this->cleanup();
-}
-
-template < typename BlockType, class Allocator >
-inline
-bool
-bit_vector<BlockType, Allocator>::operator !
-(
-) const
-{
- return this->none();
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator>
-bit_vector<BlockType, Allocator>::operator ~
-(
-) const
-{
- self_type temp = (*this);
- temp.flip();
- return temp;
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator>
-bit_vector<BlockType, Allocator>::operator +
-(
-) const
-{
- return *this;
-}
-
-template < typename BlockType, class Allocator >
-inline
-bit_vector<BlockType, Allocator>::operator bool_type
-(
-) const
-{
- return this->any() ? &self_type::set : NULL;
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::allocator_type
-bit_vector<BlockType, Allocator>::get_allocator
-(
-) const
-{
- return this->v_.get_allocator();
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::size_type
-bit_vector<BlockType, Allocator>::whole_blocks_for_bit_count
-(
- size_type c
-)
-{
- return c / self_type::block_size;
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::size_type
-bit_vector<BlockType, Allocator>::extra_bits_for_bit_count
-(
- size_type c
-)
-{
- return c % self_type::block_size;
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::size_type
-bit_vector<BlockType, Allocator>::blocks_for_bit_count
-(
- size_type c
-)
-{
- return self_type::whole_blocks_for_bit_count( c )
- + static_cast<size_type>( self_type::extra_bits_for_bit_count(c) != 0 );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::size_type
-bit_vector<BlockType, Allocator>::max_bits_for_block_count
-(
- size_type c
-)
-{
- return c * self_type::block_size;
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::block_type
-bit_vector<BlockType, Allocator>::empty_block
-(
-)
-{
- return static_cast<Block>( 0u );
-}
-
-template < typename BlockType, class Allocator >
-inline
-typename bit_vector<BlockType, Allocator>::block_type
-bit_vector<BlockType, Allocator>::full_block
-(
-)
-{
- return ~self_type::empty_block();
-}
-
-template < typename BlockType, class Allocator >
-void
-bit_vector<BlockType, Allocator>::cleanup
-(
-)
-{
- if ( this->next_pos_ != 0 )
- {
- self_type::block_type const mask = self_type::full_block()
- << this->next_pos_;
-
- this->v_.back() &= ~mask;
- }
-}
-
-
-// Bit-vector/set support function definitions -----------------------------//
-
-template < typename BlockType, class Allocator >
-inline
-void
-swap
-(
- bit_vector<BlockType, Allocator> & a,
- bit_vector<BlockType, Allocator> & b
-)
-{
- a.swap( b );
-}
-
-
-} // namespace boost
-
-
-#endif // BOOST_BIT_VECTOR_HPP

Deleted: sandbox/boost/io/array_stream.hpp
==============================================================================
--- sandbox/boost/io/array_stream.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,405 +0,0 @@
-// Boost io/array_stream.hpp header file -----------------------------------//
-
-// Copyright 2003 Daryle Walker. Use, modification, and distribution are
-// subject to the Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_ARRAY_STREAM_HPP
-#define BOOST_IO_ARRAY_STREAM_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT
-#include <boost/io/streambuf_wrapping.hpp> // for basic_wrapping_istream, etc.
-#include <boost/noncopyable.hpp> // for boost::noncopyable
-
-#include <cstddef> // for std::size_t, NULL
-#include <ios> // for std::streamsize, std::ios_base
-#include <streambuf> // for std::basic_streambuf
-#include <string> // for std::char_traits
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < std::size_t N, typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_array_streambuf;
-
-template < std::size_t N, typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_array_istream;
-template < std::size_t N, typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_array_ostream;
-template < std::size_t N, typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_array_stream;
-
-
-// Array-using streambuf class template declaration ------------------------//
-
-template < std::size_t N, typename Ch, class Tr >
-class basic_array_streambuf
- : public std::basic_streambuf<Ch, Tr>
- , private boost::noncopyable
-{
- typedef std::basic_streambuf<Ch, Tr> base_type;
- typedef basic_array_streambuf self_type;
-
-public:
- // Template arguments
- BOOST_STATIC_CONSTANT( std::size_t, array_size = N );
-
- typedef Ch char_type;
- typedef Tr traits_type;
-
- // Other types
- typedef typename Tr::int_type int_type;
- typedef typename Tr::pos_type pos_type;
- typedef typename Tr::off_type off_type;
-
- // Constructors
- explicit basic_array_streambuf( std::ios_base::openmode which
- = std::ios_base::in | std::ios_base::out );
-
- basic_array_streambuf( char_type const *b, char_type const *e,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
- template < typename InputIterator >
- basic_array_streambuf
- (
- InputIterator b,
- InputIterator e,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out
- )
- {
- for ( std::size_t i = 0 ; (i < self_type::array_size) && (b != e)
- ; ++i, ++b )
- {
- traits_type::assign( this->array_[i], *b );
- }
- this->setup_buffers( which );
- }
-
- // Accessors
- char_type * array_begin();
- char_type * array_end();
-
- char_type const * array_begin() const;
- char_type const * array_end() const;
-
- std::streamsize characters_written() const;
- std::streamsize characters_read() const;
-
- std::ios_base::openmode open_mode() const;
-
-protected:
- // Overriden virtual functions
- virtual pos_type seekoff( off_type off, std::ios_base::seekdir way,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
- virtual pos_type seekpos( pos_type sp,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
-private:
- // Helpers
- void setup_buffers( std::ios_base::openmode which );
-
- // Member data
- char_type array_[ array_size ];
-
-}; // boost::io::basic_array_streambuf
-
-
-// Array-using stream class template declarations --------------------------//
-
-// Macro to template the templates!
-#define BOOST_PRIVATE_WRAPPER( SuffixF, SuffixB, ModeC, ModeM ) \
- template < std::size_t N, typename Ch, class Tr > \
- class basic_array_##SuffixF \
- : public basic_wrapping_##SuffixB< basic_array_streambuf<N, Ch, Tr> > \
- { \
- typedef basic_array_streambuf<N, Ch, Tr> streambuf_type; \
- typedef basic_wrapping_##SuffixB<streambuf_type> base_type; \
- typedef std::ios_base::openmode openmode; \
- public: \
- BOOST_STATIC_CONSTANT( std::size_t, array_size = N ); \
- typedef Ch char_type; \
- typedef Tr traits_type; \
- typedef typename Tr::int_type int_type; \
- typedef typename Tr::pos_type pos_type; \
- typedef typename Tr::off_type off_type; \
- explicit basic_array_##SuffixF( openmode which = ModeC ) \
- : base_type( which | ModeM ) {} \
- basic_array_##SuffixF( char_type const *b, char_type const *e, \
- openmode which = ModeC ) : base_type( b, e, which | ModeM ) {} \
- template < typename InputIterator > \
- basic_array_##SuffixF( InputIterator b, InputIterator e, \
- openmode which = ModeC ) : base_type( b, e, which | ModeM ) {} \
- char_type * array_begin() \
- { return this->rdbuf()->array_begin(); } \
- char_type * array_end() \
- { return this->rdbuf()->array_end(); } \
- char_type const * array_begin() const \
- { return this->rdbuf()->array_begin(); } \
- char_type const * array_end() const \
- { return this->rdbuf()->array_end(); } \
- }
-
-BOOST_PRIVATE_WRAPPER( istream, istream, std::ios_base::in, std::ios_base::in );
-BOOST_PRIVATE_WRAPPER( ostream, ostream, std::ios_base::out,
- std::ios_base::out );
-BOOST_PRIVATE_WRAPPER( stream, iostream, (std::ios_base::in
- | std::ios_base::out), openmode(0) );
-
-#undef BOOST_PRIVATE_WRAPPER
-
-
-// Array-using streambuf class template member function definitions --------//
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-basic_array_streambuf<N, Ch, Tr>::basic_array_streambuf
-(
- std::ios_base::openmode which // = std::ios_base::in | std::ios_base::out
-)
-{
- traits_type::assign( this->array_, self_type::array_size, char_type() );
- this->setup_buffers( which );
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-basic_array_streambuf<N, Ch, Tr>::basic_array_streambuf
-(
- typename basic_array_streambuf<N, Ch, Tr>::char_type const * b,
- typename basic_array_streambuf<N, Ch, Tr>::char_type const * e,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- traits_type::copy( this->array_, b, (e - b) );
- this->setup_buffers( which );
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-typename basic_array_streambuf<N, Ch, Tr>::char_type *
-basic_array_streambuf<N, Ch, Tr>::array_begin
-(
-)
-{
- return this->array_;
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-typename basic_array_streambuf<N, Ch, Tr>::char_type *
-basic_array_streambuf<N, Ch, Tr>::array_end
-(
-)
-{
- return this->array_ + self_type::array_size;
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-typename basic_array_streambuf<N, Ch, Tr>::char_type const *
-basic_array_streambuf<N, Ch, Tr>::array_begin
-(
-) const
-{
- return this->array_;
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-typename basic_array_streambuf<N, Ch, Tr>::char_type const *
-basic_array_streambuf<N, Ch, Tr>::array_end
-(
-) const
-{
- return this->array_ + self_type::array_size;
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-std::streamsize
-basic_array_streambuf<N, Ch, Tr>::characters_written
-(
-) const
-{
- return this->pptr() ? ( this->pptr() - this->pbase() ) : 0;
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-std::streamsize
-basic_array_streambuf<N, Ch, Tr>::characters_read
-(
-) const
-{
- return this->gptr() ? ( this->gptr() - this->eback() ) : 0;
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-std::ios_base::openmode
-basic_array_streambuf<N, Ch, Tr>::open_mode
-(
-) const
-{
- using std::ios_base;
-
- ios_base::openmode const zero = static_cast<ios_base::openmode>( 0 );
-
- return ( this->gptr() ? ios_base::in : zero ) | ( this->pptr()
- ? ios_base::out : zero );
-}
-
-template < std::size_t N, typename Ch, class Tr >
-typename basic_array_streambuf<N, Ch, Tr>::pos_type
-basic_array_streambuf<N, Ch, Tr>::seekoff
-(
- typename basic_array_streambuf<N, Ch, Tr>::off_type off,
- std::ios_base::seekdir way,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- using std::ios_base;
-
- char * const old_gptr = this->gptr();
- char * const old_pptr = this->pptr();
- bool const do_input = ( (which & ios_base::in) != 0 );
- bool const do_output = ( (which & ios_base::out) != 0 );
- pos_type const invalid( static_cast<off_type>(-1) );
-
- pos_type answer = invalid;
-
- if ( do_input )
- {
- off_type newoff, newindex;
-
- if ( NULL == old_gptr ) goto bail;
-
- switch ( way )
- {
- case ios_base::beg :
- newoff = 0;
- break;
- case ios_base::end :
- newoff = this->egptr() - this->eback();
- break;
- case ios_base::cur :
- newoff = this->gptr() - this->eback();
- break;
- default :
- goto bail;
- }
- newindex = newoff + off;
-
- if ( newindex < off_type(0) ) goto bail;
- if ( newindex > off_type(self_type::array_size) ) goto bail;
-
- this->gbump( newindex - off_type(this->characters_read()) );
- answer = pos_type( newindex );
- }
-
- if ( do_output )
- {
- off_type newoff, newindex;
-
- if ( NULL == old_pptr ) goto bail;
-
- switch ( way )
- {
- case ios_base::beg :
- newoff = 0;
- break;
- case ios_base::end :
- newoff = this->epptr() - this->pbase();
- break;
- case ios_base::cur :
- newoff = this->pptr() - this->pbase();
- if ( !do_input ) break; // can't do both areas with "cur"!
- default :
- goto bail;
- }
- newindex = newoff + off;
-
- if ( newindex < off_type(0) ) goto bail;
- if ( newindex > off_type(self_type::array_size) ) goto bail;
-
- // make sure answers are consistent with both areas if neccessary
- if ( do_input && (pos_type( newindex ) != answer) ) goto bail;
-
- this->pbump( newindex - off_type(this->characters_written()) );
- answer = pos_type( newindex );
- }
-
- // At this point, either sole area successfully changed, both areas
- // successfully changed to the same position, or neither area changed.
- return answer;
-
-bail:
- if ( old_gptr )
- {
- this->setg( this->array_, old_gptr, this->array_
- + self_type::array_size );
- }
-
- if ( old_pptr )
- {
- this->setp( this->array_, this->array_ + self_type::array_size );
- this->pbump( old_pptr - this->array_ );
- }
-
- return invalid;
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-typename basic_array_streambuf<N, Ch, Tr>::pos_type
-basic_array_streambuf<N, Ch, Tr>::seekpos
-(
- typename basic_array_streambuf<N, Ch, Tr>::pos_type sp,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- return this->self_type::seekoff( off_type(sp), std::ios_base::beg, which );
-}
-
-template < std::size_t N, typename Ch, class Tr >
-inline
-void
-basic_array_streambuf<N, Ch, Tr>::setup_buffers
-(
- std::ios_base::openmode which
-)
-{
- using std::ios_base;
-
- if ( (which & ios_base::in) != 0 )
- {
- this->setg( this->array_, this->array_, this->array_
- + self_type::array_size );
- }
-
- if ( (which & ios_base::out) != 0 )
- {
- this->setp( this->array_, this->array_ + self_type::array_size );
- }
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_ARRAY_STREAM_HPP

Deleted: sandbox/boost/io/cstdio.hpp
==============================================================================
--- sandbox/boost/io/cstdio.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,97 +0,0 @@
-// Boost io/cstdio.hpp header file -----------------------------------------//
-
-// Copyright 2005 Daryle Walker. Use, modification, and distribution are
-// subject to the Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-/** \file
- \brief C and C++ I/O facilities in terms of the other
-
- Express the C library's facilities for I/O in terms of C++ concepts.
- Adapt the C++ standard I/O facilities into functions like the C library.
- */
-
-/** \dir cstdio
- \brief Components for \<boost/io/cstdio.hpp\>
-
- The header files within this directory section the various facilities
- into separate closures. Items within those header files are in the
- namespace <code>boost::io::cstdio</code>. The grouping header file
- \<boost/io/cstdio.hpp\> places the item names within namespace
- <code>boost::io</code> with <code>using</code> directives.
- */
-
-#ifndef BOOST_IO_CSTDIO_HPP
-#define BOOST_IO_CSTDIO_HPP
-
-// Group #includes
-#include <boost/io/cstdio/simple_output.hpp>
-#include <boost/io/cstdio/string_output.hpp>
-#include <boost/io/cstdio/simple_input.hpp>
-#include <boost/io/cstdio/string_input.hpp>
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// types and macros (constants and variables)
-// FILE, fpos_t, _IOFBF, _IOLBF, _IONBF, BUFSIZ, EOF, FOPEN_MAX, FILENAME_MAX,
-// L_tmpnam, SEEK_CUR, SEEK_END, SEEK_SET, TMP_MAX, stderr, stdin, stdout
-
-// wide character input functions
-// fwscanf, wscanf, vfwscanf, vwscanf
-
-// wide character output functions
-// _removed_, fwprintf, wprintf, vfwprintf, vwprintf
-
-// wide character input/output functions
-// _removed_, wide character input functions, wide character output functions
-
-// byte input/output functions
-// fprintf, fread, fscanf, fwrite, printf, scanf, vfprintf, vfscanf, vprintf,
-// vscanf, _removed_
-
-// operations on files
-// remove, rename, tmpfile, tmpnam
-
-// file access functions
-// fclose, fflush, fopen, freopen, setbuf, setvbuf
-
-// formatted input/output functions
-// fprintf, fscanf, printf, scanf, snprintf, sprintf, sscanf, vfprintf,
-// vfscanf, vprintf, vscanf, vsnprintf, vsprintf, vsscanf
-
-// FINISHED: character input/output functions
-
-// direct input/output functions
-// fread, fwrite
-
-// file positioning functions
-// fgetpos, fseek, fsetpos, ftell, rewind
-
-// error handling functions
-// clearerr, feof, ferror, perror
-
-
-// Re-declarations of #included items into a higher namespace --------------//
-
-// simple_output.hpp and string_output.hpp
-using cstdio::iputc;
-using cstdio::iputs;
-
-// simple_input.hpp and string_input.hpp
-using cstdio::igetc;
-using cstdio::iungetc;
-using cstdio::igets;
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_CSTDIO_HPP

Deleted: sandbox/boost/io/iomanip.hpp
==============================================================================
--- sandbox/boost/io/iomanip.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,14 +0,0 @@
-// Boost io/iomanip.hpp header file ----------------------------------------//
-
-// Copyright 2004 Daryle Walker. Distributed under the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or a copy at
-// <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#include <boost/io/iomanip_expect.hpp>
-#include <boost/io/iomanip_form.hpp>
-#include <boost/io/iomanip_general.hpp>
-#include <boost/io/iomanip_in.hpp>
-#include <boost/io/iomanip_out.hpp>
-#include <boost/io/iomanip_repeat.hpp>

Deleted: sandbox/boost/io/iomanip_expect.hpp
==============================================================================
--- sandbox/boost/io/iomanip_expect.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,673 +0,0 @@
-// Boost io/iomanip_expect.hpp header file ---------------------------------//
-
-// Copyright 2004 Daryle Walker. Distributed under the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or a copy at
-// <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_IOMANIP_EXPECT_HPP
-#define BOOST_IO_IOMANIP_EXPECT_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <ios> // for std::streamsize and std::ios_base
-#include <istream> // for std::basic_istream
-#include <locale> // for std::locale, std::ctype, and std::use_facet
-#include <string> // for std::basic_string
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename Ch >
- class expect_cstr;
-
-template < >
- class expect_cstr< char >;
-
-template < typename Ch >
- class expect_ch;
-
-template < >
- class expect_ch< char >;
-
-template < typename Ch, class Tr, class Al >
- class expect_str;
-
-typedef expect_ch<char> expect_char;
-
-template < typename Ch >
- expect_cstr<Ch>
- expect( Ch const *s );
-
-template < typename Ch >
- expect_ch<Ch>
- expect( Ch c, std::streamsize count = 1 );
-
-template < typename Ch, class Tr, class Al >
- expect_str<Ch, Tr, Al>
- expect( std::basic_string<Ch, Tr, Al> const &s );
-
-template < typename Ch, class Tr >
- std::basic_istream<Ch, Tr> &
- operator >>( std::basic_istream<Ch, Tr> &s, expect_cstr<Ch> const &e );
-
-template < typename Ch, class Tr >
- std::basic_istream<Ch, Tr> &
- operator >>( std::basic_istream<Ch, Tr> &s, expect_cstr<char> const &e );
-
-template < class Tr >
- std::basic_istream<char, Tr> &
- operator >>( std::basic_istream<char, Tr> &s, expect_cstr<char> const &e );
-
-template < typename Ch, class Tr >
- std::basic_istream<Ch, Tr> &
- operator >>( std::basic_istream<Ch, Tr> &s, expect_ch<Ch> const &e );
-
-template < typename Ch, class Tr >
- std::basic_istream<Ch, Tr> &
- operator >>( std::basic_istream<Ch, Tr> &s, expect_ch<char> const &e );
-
-template < class Tr >
- std::basic_istream<char, Tr> &
- operator >>( std::basic_istream<char, Tr> &s, expect_ch<char> const &e );
-
-template < typename Ch, class Tr, class Al >
- std::basic_istream<Ch, Tr> &
- operator >>( std::basic_istream<Ch, Tr> &s, expect_str<Ch, Tr, Al> const
- &e );
-
-
-// Implementation detail stuff ---------------------------------------------//
-
-namespace detail
-{
-
-template < typename Ch, class Tr >
-struct cstr_element_generator
-{
- Ch const * s_;
-
- explicit cstr_element_generator( Ch const *s ) : s_( s ) {}
-
- operator bool() const
- { return this->s_ && !Tr::eq( Ch(), *this->s_ ); }
-
- Ch operator ()()
- { return static_cast<bool>( *this ) ? *this->s_++ : Ch(); }
-
-}; // boost::io::detail::cstr_element_generator
-
-template < class Tr, typename Ch >
-cstr_element_generator<Ch, Tr> make_ceg( Ch const *s )
-{
- return cstr_element_generator<Ch, Tr>( s );
-}
-
-template < typename Ch >
-struct cs_element_generator
-{
- char const * s_;
- std::ctype<Ch> const & f_;
-
- cs_element_generator( char const *s, std::locale const &l )
- : s_( s ), f_( std::use_facet< std::ctype<Ch> >(l) )
- {}
-
- operator bool() const
- { return this->s_ && *this->s_; }
-
- Ch operator ()()
- { return static_cast<bool>( *this ) ? f_.widen( *this->s_++ ) : Ch(); }
-
-}; // boost::io::detail::cs_element_generator
-
-template < typename Ch >
-cs_element_generator<Ch> make_ceg2( char const *s, std::locale const &l )
-{
- return cs_element_generator<Ch>( s, l );
-}
-
-template < typename Ch >
-struct char_repeat_generator
-{
- Ch c_;
- std::streamsize n_;
-
- char_repeat_generator( Ch c, std::streamsize n ) : c_( c ), n_( n ) {}
-
- operator bool() const { return 0 < this->n_; }
- Ch operator ()() { return --this->n_, this->c_; }
-
-}; // boost::io::detail::char_repeat_generator
-
-template < typename Ch >
-char_repeat_generator<Ch> make_crg( Ch c, std::streamsize n )
-{
- return char_repeat_generator<Ch>( c, n );
-}
-
-template < class Iter, typename Ch >
-struct iter_element_generator
-{
- Iter b_, e_;
-
- iter_element_generator( Iter b, Iter e ) : b_( b ), e_( e ) {}
-
- operator bool() const
- { return this->b_ != this->e_; }
-
- Ch operator ()()
- { return static_cast<bool>( *this ) ? *this->b_++ : Ch(); }
-
-}; // boost::io::detail::iter_element_generator
-
-template < typename Ch, class Iter >
-iter_element_generator<Iter, Ch> make_ieg( Iter b, Iter e )
-{
- return iter_element_generator<Iter, Ch>( b, e );
-}
-
-template < typename Ch, class Tr, class Gen >
-void do_expect_core( std::basic_istream<Ch, Tr> &is, Gen g )
-{
- while ( is && g )
- {
- typename Tr::int_type const i1 = is.peek();
-
- if ( !Tr::eq_int_type(Tr::eof(), i1) )
- {
- Ch const c1 = Tr::to_char_type( i1 );
- Ch const c2 = g();
-
- if ( Tr::eq(c1, c2) )
- {
- is.ignore();
- continue;
- }
- }
-
- is.setstate( std::ios_base::failbit );
- break;
- }
-}
-
-template < typename Ch >
-class expect_cstr_base
-{
-public:
- // Template argument
- typedef Ch char_type;
-
- // Accessor
- char_type const * expected_string() const { return this->s_; }
-
- // Operator
- template < class Tr >
- void operator ()( std::basic_istream<char_type, Tr> &is ) const
- { do_expect_core( is, make_ceg<Tr>(this->expected_string()) ); }
-
-protected:
- // Lifetime management
- explicit expect_cstr_base( char_type const *s ) : s_( s ) {}
-
-private:
- // Member datum
- char_type const * s_;
-
-}; // boost::io::detail::expect_cstr_base
-
-template < typename Ch >
-class expect_ch_base
-{
-public:
- // Template argument
- typedef Ch char_type;
-
- // Accessors
- char_type expected_character() const { return this->c_; }
- std::streamsize expected_occurances() const { return this->n_; }
-
- // Operator
- template < class Tr >
- void operator ()( std::basic_istream<char_type, Tr> &is ) const
- {
- do_expect_core( is, make_crg(this->expected_character(),
- this->expected_occurances()) );
- }
-
-protected:
- // Lifetime management
- expect_ch_base( char_type c, std::streamsize count )
- : c_( c ), n_( count )
- {}
-
-private:
- // Member data
- char_type c_;
- std::streamsize n_;
-
-}; // boost::io::detail::expect_ch_base
-
-} // namespace detail
-
-
-// Expected-string (C) I/O manipulator class template declarations ---------//
-
-template < typename Ch >
-class expect_cstr
- : private detail::expect_cstr_base< Ch >
-{
- typedef detail::expect_cstr_base<Ch> base_type;
-
-public:
- // Template argument
- typedef Ch char_type;
-
- // Lifetime management
- explicit expect_cstr( char_type const *s );
-
- // Accessor
- using base_type::expected_string;
-
- // Operator
- template < class Tr >
- void operator ()( std::basic_istream<char_type, Tr> &is ) const;
-
-}; // boost::io::expect_cstr
-
-template < >
-class expect_cstr< char >
- : private detail::expect_cstr_base< char >
-{
- typedef detail::expect_cstr_base<char> base_type;
-
-public:
- // Template argument
- typedef char char_type;
-
- // Lifetime management
- explicit expect_cstr( char_type const *s );
-
- // Accessor
- using base_type::expected_string;
-
- // Operators
- template < class Tr >
- void operator ()( std::basic_istream<char_type, Tr> &is ) const;
-
- template < typename Ch, class Tr >
- void operator ()( std::basic_istream<Ch, Tr> &is ) const;
-
-}; // boost::io::expect_cstr<char>
-
-
-// Expected-character I/O manipulator class template declarations ----------//
-
-template < typename Ch >
-class expect_ch
- : private detail::expect_ch_base< Ch >
-{
- typedef detail::expect_ch_base<Ch> base_type;
-
-public:
- // Template argument
- typedef Ch char_type;
-
- // Lifetime management
- expect_ch( char_type c, std::streamsize count );
-
- // Accessors
- using base_type::expected_character;
- using base_type::expected_occurances;
-
- // Operator
- template < class Tr >
- void operator ()( std::basic_istream<char_type, Tr> &is ) const;
-
-}; // boost::io::expect_ch
-
-template < >
-class expect_ch< char >
- : private detail::expect_ch_base< char >
-{
- typedef detail::expect_ch_base<char> base_type;
-
-public:
- // Template argument
- typedef char char_type;
-
- // Lifetime management
- expect_ch( char_type c, std::streamsize count );
-
- // Accessors
- using base_type::expected_character;
- using base_type::expected_occurances;
-
- // Operators
- template < class Tr >
- void operator ()( std::basic_istream<char_type, Tr> &is ) const;
-
- template < typename Ch, class Tr >
- void operator ()( std::basic_istream<Ch, Tr> &is ) const;
-
-}; // boost::io::expect_ch<char>
-
-
-// Expected-string (C++) I/O manipulator class template declaration --------//
-
-template < typename Ch, class Tr, class Al >
-class expect_str
-{
-public:
- // Template arguments
- typedef Ch char_type;
- typedef Tr traits_type;
- typedef Al allocator_type;
-
- // Other types
- typedef std::basic_string<Ch, Tr, Al> string_type;
- typedef std::basic_istream<Ch, Tr> istream_type;
-
- // Lifetime management
- explicit expect_str( string_type const &s );
-
- // Accessor
- string_type expected_string() const;
-
- // Operator
- void operator ()( istream_type &is ) const;
-
-private:
- // Member datum
- string_type s_;
-
-}; // boost::io::expect_str
-
-
-// Expected-string (C) I/O manipulator member function definitions ---------//
-
-template < typename Ch >
-inline
-expect_cstr<Ch>::expect_cstr
-(
- char_type const * s
-)
- : base_type( s )
-{
-}
-
-template < typename Ch >
-template < class Tr >
-inline
-void
-expect_cstr<Ch>::operator ()
-(
- std::basic_istream<Ch, Tr> & is
-) const
-{
- this->base_type::operator ()( is );
-}
-
-inline
-expect_cstr<char>::expect_cstr
-(
- char_type const * s
-)
- : base_type( s )
-{
-}
-
-template < class Tr >
-inline
-void
-expect_cstr<char>::operator ()
-(
- std::basic_istream<char, Tr> & is
-) const
-{
- this->base_type::operator ()( is );
-}
-
-template < typename Ch, class Tr >
-inline
-void
-expect_cstr<char>::operator ()
-(
- std::basic_istream<Ch, Tr> & is
-) const
-{
- detail::do_expect_core( is, detail::make_ceg2<Ch>(this->expected_string(),
- is.getloc()) );
-}
-
-
-// Expected-character I/O manipulator member function definitions ----------//
-
-template < typename Ch >
-inline
-expect_ch<Ch>::expect_ch
-(
- char_type c,
- std::streamsize count
-)
- : base_type( c, count )
-{
-}
-
-template < typename Ch >
-template < class Tr >
-inline
-void
-expect_ch<Ch>::operator ()
-(
- std::basic_istream<Ch, Tr> & is
-) const
-{
- this->base_type::operator ()( is );
-}
-
-inline
-expect_ch<char>::expect_ch
-(
- char_type c,
- std::streamsize count
-)
- : base_type( c, count )
-{
-}
-
-template < class Tr >
-inline
-void
-expect_ch<char>::operator ()
-(
- std::basic_istream<char, Tr> & is
-) const
-{
- this->base_type::operator ()( is );
-}
-
-template < typename Ch, class Tr >
-inline
-void
-expect_ch<char>::operator ()
-(
- std::basic_istream<Ch, Tr> & is
-) const
-{
- detail::do_expect_core( is, detail::make_crg(is.widen(
- this->expected_character() ), this->expected_occurances()) );
-}
-
-
-// Expected-string (C++) I/O manipulator member function definitions -------//
-
-template < typename Ch, class Tr, class Al >
-inline
-expect_str<Ch, Tr, Al>::expect_str
-(
- string_type const & s
-)
- : s_( s )
-{
-}
-
-template < typename Ch, class Tr, class Al >
-inline
-typename expect_str<Ch, Tr, Al>::string_type
-expect_str<Ch, Tr, Al>::expected_string
-(
-) const
-{
- return s_;
-}
-
-template < typename Ch, class Tr, class Al >
-inline
-void
-expect_str<Ch, Tr, Al>::operator ()
-(
- istream_type & is
-) const
-{
- detail::do_expect_core( is, detail::make_ieg<char_type>(this->s_.begin(),
- this->s_.end()) );
-}
-
-
-// I/O-manipulator function (template) definitions -------------------------//
-
-template < typename Ch >
-inline
-expect_cstr<Ch>
-expect
-(
- Ch const * s
-)
-{
- return expect_cstr<Ch>( s );
-}
-
-template < typename Ch >
-inline
-expect_ch<Ch>
-expect
-(
- Ch c,
- std::streamsize count // = 1
-)
-{
- return expect_ch<Ch>( c, count );
-}
-
-template < typename Ch, class Tr, class Al >
-inline
-expect_str<Ch, Tr, Al>
-expect
-(
- std::basic_string<Ch, Tr, Al> const & s
-)
-{
- return expect_str<Ch, Tr, Al>( s );
-}
-
-
-// I/O-manipulator operator function definitions ---------------------------//
-
-template < typename Ch, class Tr >
-inline
-std::basic_istream<Ch, Tr> &
-operator >>
-(
- std::basic_istream<Ch, Tr> & s,
- expect_cstr<Ch> const & e
-)
-{
- return e( s ), s;
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_istream<Ch, Tr> &
-operator >>
-(
- std::basic_istream<Ch, Tr> & s,
- expect_cstr<char> const & e
-)
-{
- return e( s ), s;
-}
-
-template < class Tr >
-inline
-std::basic_istream<char, Tr> &
-operator >>
-(
- std::basic_istream<char, Tr> & s,
- expect_cstr<char> const & e
-)
-{
- return e( s ), s;
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_istream<Ch, Tr> &
-operator >>
-(
- std::basic_istream<Ch, Tr> & s,
- expect_ch<Ch> const & e
-)
-{
- return e( s ), s;
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_istream<Ch, Tr> &
-operator >>
-(
- std::basic_istream<Ch, Tr> & s,
- expect_ch<char> const & e
-)
-{
- return e( s ), s;
-}
-
-template < class Tr >
-inline
-std::basic_istream<char, Tr> &
-operator >>
-(
- std::basic_istream<char, Tr> & s,
- expect_ch<char> const & e
-)
-{
- return e( s ), s;
-}
-
-template < typename Ch, class Tr, class Al >
-inline
-std::basic_istream<Ch, Tr> &
-operator >>
-(
- std::basic_istream<Ch, Tr> & s,
- expect_str<Ch, Tr, Al> const & e
-)
-{
- return e( s ), s;
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_IOMANIP_EXPECT_HPP

Deleted: sandbox/boost/io/iomanip_form.hpp
==============================================================================
--- sandbox/boost/io/iomanip_form.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,756 +0,0 @@
-// Boost io/iomanip_form.hpp header file -----------------------------------//
-
-// Copyright 2004 Daryle Walker. Distributed under the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or a copy at
-// <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_IOMANIP_FORM_HPP
-#define BOOST_IO_IOMANIP_FORM_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/io/ios_state.hpp> // for boost::io::ios_flags_saver, etc.
-
-#include <ios> // for std::streamsize, std::basic_ios, std::ios_base
-#include <istream> // for std::basic_istream
-#include <ostream> // for std::basic_ostream
-#include <string> // for std::char_traits
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_ios_form;
-
-typedef basic_ios_form<char> ios_form;
-typedef basic_ios_form<wchar_t> wios_form;
-
-
-// Form-based I/O manipulator class template and operator declarations -----//
-
-template < typename Ch, class Tr >
-class basic_ios_form
-{
- typedef basic_ios_form<Ch, Tr> self_type;
-
- template < typename Obj > struct binder_out;
- template < typename Obj > struct binder_inout;
-
-public:
- // Template arguments
- typedef Ch char_type;
- typedef Tr traits_type;
-
- // Lifetime management (use automatic destructor and copy constructor)
- basic_ios_form();
- explicit basic_ios_form( ::std::basic_ios<Ch, Tr> const &i );
-
- // Accessors
- bool override_fill() const;
- bool override_precision() const;
- bool override_width() const;
-
- ::std::ios_base::fmtflags overridden_flags() const;
- bool override_flags() const;
-
- bool override_adjustfield() const;
- bool override_basefield() const;
- bool override_floatfield() const;
-
- bool override_boolalpha() const;
- bool override_showbase() const;
- bool override_showpoint() const;
- bool override_showpos() const;
- bool override_skipws() const;
- bool override_unitbuf() const;
- bool override_uppercase() const;
-
- char_type fill() const;
- ::std::streamsize precision() const;
- ::std::streamsize width() const;
- ::std::ios_base::fmtflags flags() const;
-
- // Mutators
- self_type & fill( char_type const &c );
-
- self_type & precision( ::std::streamsize s );
- self_type & width( ::std::streamsize s );
-
- self_type & flag( ::std::ios_base::fmtflags f );
- self_type & unflag( ::std::ios_base::fmtflags f );
- self_type & flags( ::std::ios_base::fmtflags f,
- ::std::ios_base::fmtflags mask );
-
- self_type & boolalpha();
- self_type & noboolalpha();
-
- self_type & showbase();
- self_type & noshowbase();
-
- self_type & showpoint();
- self_type & noshowpoint();
-
- self_type & showpos();
- self_type & noshowpos();
-
- self_type & skipws();
- self_type & noskipws();
-
- self_type & unitbuf();
- self_type & nounitbuf();
-
- self_type & uppercase();
- self_type & nouppercase();
-
- self_type & internal();
- self_type & left();
- self_type & right();
-
- self_type & dec();
- self_type & hex();
- self_type & oct();
-
- self_type & fixed();
- self_type & scientific();
-
- // Operators
- template < typename Obj >
- binder_out<Obj> operator ()( Obj const &o ) const
- { return binder_out<Obj>( *this, o ); }
-
- template < typename Obj >
- binder_inout<Obj> operator ()( Obj &o ) const
- { return binder_inout<Obj>( *this, o ); }
-
-private:
- // Member templates
- template < typename Obj >
- struct binder_out
- {
- self_type const & f_;
- Obj const & o_;
-
- binder_out( self_type const &f, Obj const &o )
- : f_( f ), o_( o )
- {}
-
- friend
- ::std::basic_ostream<Ch, Tr> &
- operator <<( ::std::basic_ostream<Ch, Tr> &os, binder_out const &b )
- {
- ios_flags_saver fs( os, b.f_.override_flags() ? (( b.f_.flags()
- & b.f_.overridden_flags() ) | ( os.flags()
- & ~b.f_.overridden_flags() )) : os.flags() );
- ios_precision_saver ps( os, b.f_.override_precision()
- ? b.f_.precision() : os.precision() );
- ios_width_saver ws( os, b.f_.override_width() ? b.f_.width()
- : os.width() );
-
- basic_ios_fill_saver<Ch, Tr> bfs( os, b.f_.override_fill()
- ? b.f_.fill() : os.fill() );
-
- return os << b.o_;
- }
-
- }; // boost::io::basic_ios_form::binder_out
-
- template < typename Obj >
- struct binder_inout
- {
- self_type const & f_;
- Obj & o_;
-
- binder_inout( self_type const &f, Obj &o )
- : f_( f ), o_( o )
- {}
-
- friend
- ::std::basic_ostream<Ch, Tr> &
- operator <<( ::std::basic_ostream<Ch, Tr> &os, binder_inout const &b )
- {
- ios_flags_saver fs( os, b.f_.override_flags() ? (( b.f_.flags()
- & b.f_.overridden_flags() ) | ( os.flags()
- & ~b.f_.overridden_flags() )) : os.flags() );
- ios_precision_saver ps( os, b.f_.override_precision()
- ? b.f_.precision() : os.precision() );
- ios_width_saver ws( os, b.f_.override_width() ? b.f_.width()
- : os.width() );
-
- basic_ios_fill_saver<Ch, Tr> bfs( os, b.f_.override_fill()
- ? b.f_.fill() : os.fill() );
-
- return os << b.o_;
- }
-
- friend
- ::std::basic_istream<Ch, Tr> &
- operator >>( ::std::basic_istream<Ch, Tr> &is, binder_inout const &b )
- {
- ios_flags_saver fs( is, b.f_.override_flags() ? (( b.f_.flags()
- & b.f_.overridden_flags() ) | ( is.flags()
- & ~b.f_.overridden_flags() )) : is.flags() );
- ios_precision_saver ps( is, b.f_.override_precision()
- ? b.f_.precision() : is.precision() );
- ios_width_saver ws( is, b.f_.override_width() ? b.f_.width()
- : is.width() );
-
- basic_ios_fill_saver<Ch, Tr> bfs( is, b.f_.override_fill()
- ? b.f_.fill() : is.fill() );
-
- return is >> b.o_;
- }
-
- }; // boost::io::basic_ios_form::binder_inout
-
- // Member data
- char_type fill_;
- ::std::streamsize precision_, width_;
- ::std::ios_base::fmtflags flags_;
-
- bool use_fill_, use_precision_, use_width_;
- ::std::ios_base::fmtflags used_flags_;
-
-}; // boost::io::basic_ios_form
-
-
-// Form-based I/O manipulator class template and operator definitions ------//
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr>::basic_ios_form
-(
-)
- : fill_(), precision_( 6 ), width_( 0 )
- , flags_( ::std::ios_base::skipws | ::std::ios_base::dec )
- , use_fill_( false ), use_precision_( false ), use_width_( false )
- , used_flags_( ::std::ios_base::fmtflags() )
-{
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr>::basic_ios_form
-(
- ::std::basic_ios<Ch, Tr> const & i
-)
- : fill_( i.fill() ), precision_( i.precision() ), width_( i.width() )
- , flags_( i.flags() )
- , use_fill_( true ), use_precision_( true ), use_width_( true )
- , used_flags_( ~ ::std::ios_base::fmtflags() )
-{
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_fill
-(
-) const
-{
- return this->use_fill_;
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_precision
-(
-) const
-{
- return this->use_precision_;
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_width
-(
-) const
-{
- return this->use_width_;
-}
-
-template < typename Ch, class Tr >
-inline
-::std::ios_base::fmtflags
-basic_ios_form<Ch, Tr>::overridden_flags
-(
-) const
-{
- return this->used_flags_;
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_flags
-(
-) const
-{
- return ::std::ios_base::fmtflags() != this->used_flags_;
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_adjustfield
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::adjustfield );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_basefield
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::basefield );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_floatfield
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::floatfield );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_boolalpha
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::boolalpha );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_showbase
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::showbase );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_showpoint
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::showpoint );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_showpos
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::showpos );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_skipws
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::skipws );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_unitbuf
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::unitbuf );
-}
-
-template < typename Ch, class Tr >
-inline
-bool
-basic_ios_form<Ch, Tr>::override_uppercase
-(
-) const
-{
- return ::std::ios_base::fmtflags() != ( this->used_flags_
- & ::std::ios_base::uppercase );
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_ios_form<Ch, Tr>::char_type
-basic_ios_form<Ch, Tr>::fill
-(
-) const
-{
- return this->fill_;
-}
-
-template < typename Ch, class Tr >
-inline
-::std::streamsize
-basic_ios_form<Ch, Tr>::precision
-(
-) const
-{
- return this->precision_;
-}
-
-template < typename Ch, class Tr >
-inline
-::std::streamsize
-basic_ios_form<Ch, Tr>::width
-(
-) const
-{
- return this->width_;
-}
-
-template < typename Ch, class Tr >
-inline
-::std::ios_base::fmtflags
-basic_ios_form<Ch, Tr>::flags
-(
-) const
-{
- return this->flags_;
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::fill
-(
- typename basic_ios_form<Ch, Tr>::char_type const & c
-)
-{
- traits_type::assign( this->fill_, c );
- this->use_fill_ = true;
- return *this;
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::precision
-(
- ::std::streamsize s
-)
-{
- this->precision_ = s;
- this->use_precision_ = true;
- return *this;
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::width
-(
- ::std::streamsize s
-)
-{
- this->width_ = s;
- this->use_width_ = true;
- return *this;
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::flag
-(
- ::std::ios_base::fmtflags f
-)
-{
- this->flags_ |= f;
- this->used_flags_ |= f;
- return *this;
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::unflag
-(
- ::std::ios_base::fmtflags f
-)
-{
- this->flags_ &= ~f;
- this->used_flags_ |= f;
- return *this;
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::flags
-(
- ::std::ios_base::fmtflags f,
- ::std::ios_base::fmtflags mask
-)
-{
- this->flags_ &= ~mask;
- this->flags_ |= ( f & mask );
- this->used_flags_ |= mask;
- return *this;
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::boolalpha
-(
-)
-{
- return this->flag( ::std::ios_base::boolalpha );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::noboolalpha
-(
-)
-{
- return this->unflag( ::std::ios_base::boolalpha );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::showbase
-(
-)
-{
- return this->flag( ::std::ios_base::showbase );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::noshowbase
-(
-)
-{
- return this->unflag( ::std::ios_base::showbase );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::showpoint
-(
-)
-{
- return this->flag( ::std::ios_base::showpoint );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::noshowpoint
-(
-)
-{
- return this->unflag( ::std::ios_base::showpoint );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::showpos
-(
-)
-{
- return this->flag( ::std::ios_base::showpos );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::noshowpos
-(
-)
-{
- return this->unflag( ::std::ios_base::showpos );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::skipws
-(
-)
-{
- return this->flag( ::std::ios_base::skipws );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::noskipws
-(
-)
-{
- return this->unflag( ::std::ios_base::skipws );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::unitbuf
-(
-)
-{
- return this->flag( ::std::ios_base::unitbuf );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::nounitbuf
-(
-)
-{
- return this->unflag( ::std::ios_base::unitbuf );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::uppercase
-(
-)
-{
- return this->flag( ::std::ios_base::uppercase );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::nouppercase
-(
-)
-{
- return this->unflag( ::std::ios_base::uppercase );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::internal
-(
-)
-{
- return this->flags( ::std::ios_base::internal, ::std::ios_base::adjustfield );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::left
-(
-)
-{
- return this->flags( ::std::ios_base::left, ::std::ios_base::adjustfield );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::right
-(
-)
-{
- return this->flags( ::std::ios_base::right, ::std::ios_base::adjustfield );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::dec
-(
-)
-{
- return this->flags( ::std::ios_base::dec, ::std::ios_base::basefield );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::hex
-(
-)
-{
- return this->flags( ::std::ios_base::hex, ::std::ios_base::basefield );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::oct
-(
-)
-{
- return this->flags( ::std::ios_base::oct, ::std::ios_base::basefield );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::fixed
-(
-)
-{
- return this->flags( ::std::ios_base::fixed, ::std::ios_base::floatfield );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_ios_form<Ch, Tr> &
-basic_ios_form<Ch, Tr>::scientific
-(
-)
-{
- return this->flags( ::std::ios_base::scientific, ::std::ios_base::floatfield );
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_IOMANIP_FORM_HPP

Deleted: sandbox/boost/io/iomanip_general.hpp
==============================================================================
--- sandbox/boost/io/iomanip_general.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,52 +0,0 @@
-// Boost io/iomanip_general.hpp header file --------------------------------//
-
-// Copyright 2004 Daryle Walker. Distributed under the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or a copy at
-// <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_IOMANIP_GENERAL_HPP
-#define BOOST_IO_IOMANIP_GENERAL_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <ios> // for std::basic_ios and std::ios_base
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// I/O-manipulator function template declaration ---------------------------//
-
-template < typename Ch, class Tr >
- std::basic_ios<Ch, Tr> & resetios( std::basic_ios<Ch, Tr> &s );
-
-
-// I/O-manipulator function template definition ----------------------------//
-
-template < typename Ch, class Tr >
-inline
-std::basic_ios<Ch, Tr> &
-resetios
-(
- std::basic_ios<Ch, Tr> & s
-)
-{
- s.fill( s.widen(' ') );
- s.precision( 6 );
- s.width( 0 );
- s.flags( std::ios_base::skipws | std::ios_base::dec );
-
- return s;
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_IOMANIP_GENERAL_HPP

Deleted: sandbox/boost/io/iomanip_in.hpp
==============================================================================
--- sandbox/boost/io/iomanip_in.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,63 +0,0 @@
-// Boost io/iomanip_in.hpp header file -------------------------------------//
-
-// Copyright 2004 Daryle Walker. Distributed under the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or a copy at
-// <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_IOMANIP_IN_HPP
-#define BOOST_IO_IOMANIP_IN_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/io/iomanip_repeat.hpp> // for boost:io:repeat_ch, repeat_char
-
-#include <ios> // for std::streamsize
-#include <istream> // for std::basic_istream
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-repeat_char skip_lines( std::streamsize count, bool final_sync = false );
-
-template < typename Ch, class Tr >
- std::basic_istream<Ch, Tr> & skipl( std::basic_istream<Ch, Tr> &is );
-
-
-// I/O-manipulator function (template) definitions -------------------------//
-
-inline
-repeat_char
-skip_lines
-(
- std::streamsize count,
- bool final_sync // = false
-)
-{
- return repeat_char( '\n', count, final_sync );
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_istream<Ch, Tr> &
-skipl
-(
- std::basic_istream<Ch, Tr> & is
-)
-{
- return is >> skip_lines( 1 );
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_IOMANIP_IN_HPP

Deleted: sandbox/boost/io/iomanip_out.hpp
==============================================================================
--- sandbox/boost/io/iomanip_out.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,63 +0,0 @@
-// Boost io/iomanip_out.hpp header file ------------------------------------//
-
-// Copyright 2004 Daryle Walker. Distributed under the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or a copy at
-// <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_IOMANIP_OUT_HPP
-#define BOOST_IO_IOMANIP_OUT_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/io/iomanip_repeat.hpp> // for boost:io:repeat_ch, repeat_char
-
-#include <ios> // for std::streamsize
-#include <ostream> // for std::basic_ostream
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-repeat_char new_lines( std::streamsize count, bool final_flush = false );
-
-template < typename Ch, class Tr >
- std::basic_ostream<Ch, Tr> & newl( std::basic_ostream<Ch, Tr> &os );
-
-
-// I/O-manipulator function (template) definitions -------------------------//
-
-inline
-repeat_char
-new_lines
-(
- std::streamsize count,
- bool final_flush // = false
-)
-{
- return repeat_char( '\n', count, final_flush );
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_ostream<Ch, Tr> &
-newl
-(
- std::basic_ostream<Ch, Tr> & os
-)
-{
- return os << new_lines( 1 );
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_IOMANIP_OUT_HPP

Deleted: sandbox/boost/io/iomanip_repeat.hpp
==============================================================================
--- sandbox/boost/io/iomanip_repeat.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,298 +0,0 @@
-// Boost io/iomanip_repeat.hpp header file ---------------------------------//
-
-// Copyright 2004 Daryle Walker. Distributed under the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or a copy at
-// <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_IOMANIP_REPEAT_HPP
-#define BOOST_IO_IOMANIP_REPEAT_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/limits.hpp> // for std::numeric_limits
-
-#include <ios> // for std::streamsize
-#include <istream> // for std::basic_istream
-#include <ostream> // for std::basic_ostream
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename Ch >
- class repeat_ch;
-
-template < typename Ch, class Tr >
- std::basic_istream<Ch, Tr> & operator >>( std::basic_istream<Ch, Tr> &s,
- repeat_ch<Ch> const &r );
-
-template < typename Ch, class Tr >
- std::basic_ostream<Ch, Tr> & operator <<( std::basic_ostream<Ch, Tr> &s,
- repeat_ch<Ch> const &r );
-
-class repeat_char;
-
-template < typename Ch, class Tr >
- std::basic_istream<Ch, Tr> & operator >>( std::basic_istream<Ch, Tr> &s,
- repeat_char const &r );
-
-template < typename Ch, class Tr >
- std::basic_ostream<Ch, Tr> & operator <<( std::basic_ostream<Ch, Tr> &s,
- repeat_char const &r );
-
-
-// Implementation detail stuff ---------------------------------------------//
-
-namespace detail
-{
-
-template < typename Ch >
-class repeat_char_base
-{
-public:
- // Template argument
- typedef Ch char_type;
-
- // Accessors
- char_type repeated_char() const { return this->c_; }
- ::std::streamsize repeat_count() const { return this->count_; }
-
- bool will_synchronize_afterwards() const { return this->sync_; }
-
-protected:
- // Lifetime management
- repeat_char_base( char_type c, ::std::streamsize count,
- bool synchronize_afterwards )
- : c_( c ), count_( count ), sync_( synchronize_afterwards )
- {}
-
-private:
- // Member data
- char_type c_;
- ::std::streamsize count_;
- bool sync_;
-
-}; // boost::io::detail::repeat_char_base
-
-} // namespace detail
-
-
-// Repeated-character I/O manipulator class template declaration -----------//
-
-template < typename Ch >
-class repeat_ch
- : private detail::repeat_char_base< Ch >
-{
- typedef detail::repeat_char_base<Ch> base_type;
-
-public:
- // Template argument
- typedef Ch char_type;
-
- // Lifetime management
- repeat_ch( char_type c, ::std::streamsize count,
- bool synchronize_afterwards = false );
-
- // Accessors
- using base_type::repeated_char;
- using base_type::repeat_count;
- using base_type::will_synchronize_afterwards;
-
- // Operators
- template < class Tr >
- void operator ()( ::std::basic_istream<Ch, Tr> &is ) const;
-
- template < class Tr >
- void operator ()( ::std::basic_ostream<Ch, Tr> &os ) const;
-
-}; // boost::io::repeat_ch
-
-
-// Specific repeated-character I/O manipulator class declaration -----------//
-
-class repeat_char
- : private detail::repeat_char_base< char >
-{
- typedef detail::repeat_char_base<char> base_type;
-
-public:
- // Types
- typedef char char_type;
-
- // Lifetime management
- repeat_char( char_type c, ::std::streamsize count,
- bool synchronize_afterwards = false );
-
- // Accessors
- using base_type::repeated_char;
- using base_type::repeat_count;
- using base_type::will_synchronize_afterwards;
-
- // Operators
- template < typename Ch, class Tr >
- void operator ()( ::std::basic_istream<Ch, Tr> &is ) const;
-
- template < typename Ch, class Tr >
- void operator ()( ::std::basic_ostream<Ch, Tr> &os ) const;
-
-}; // boost::io::repeat_char
-
-
-// Repeated-character I/O-manipulator member function definitions ----------//
-
-template < typename Ch >
-inline
-repeat_ch<Ch>::repeat_ch
-(
- char_type c,
- ::std::streamsize count,
- bool synchronize_afterwards // = false
-)
- : base_type( c, count, synchronize_afterwards )
-{
-}
-
-template < typename Ch >
-template < class Tr >
-void
-repeat_ch<Ch>::operator ()
-(
- ::std::basic_istream<Ch, Tr> & is
-) const
-{
- typename Tr::int_type const ci = Tr::to_int_type( this->repeated_char() );
-
- for ( std::streamsize i = this->repeat_count() ; (i > 0) && is ; --i )
- {
- is.ignore( std::numeric_limits<std::streamsize>::max(), ci );
- }
-
- if ( this->will_synchronize_afterwards() && is )
- {
- is.sync();
- }
-}
-
-template < typename Ch >
-template < class Tr >
-void
-repeat_ch<Ch>::operator ()
-(
- ::std::basic_ostream<Ch, Tr> & os
-) const
-{
- char_type const cc = this->repeated_char();
-
- for ( std::streamsize i = this->repeat_count() ; (i > 0) && os ; --i )
- {
- os.put( cc );
- }
-
- if ( this->will_synchronize_afterwards() && os )
- {
- os.flush();
- }
-}
-
-
-// Specific repeated-character I/O-manipulator member function definitions -//
-
-inline
-repeat_char::repeat_char
-(
- char_type c,
- ::std::streamsize count,
- bool synchronize_afterwards // = false
-)
- : base_type( c, count, synchronize_afterwards )
-{
-}
-
-template < typename Ch, class Tr >
-inline
-void
-repeat_char::operator ()
-(
- ::std::basic_istream<Ch, Tr> & is
-) const
-{
- is >> repeat_ch<Ch>( is.widen(this->repeated_char()), this->repeat_count(),
- this->will_synchronize_afterwards() );
-}
-
-template < typename Ch, class Tr >
-inline
-void
-repeat_char::operator ()
-(
- ::std::basic_ostream<Ch, Tr> & os
-) const
-{
- os << repeat_ch<Ch>( os.widen(this->repeated_char()), this->repeat_count(),
- this->will_synchronize_afterwards() );
-}
-
-
-// I/O-manipulator operator function definitions ---------------------------//
-
-template < typename Ch, class Tr >
-inline
-std::basic_istream<Ch, Tr> &
-operator >>
-(
- std::basic_istream<Ch, Tr> & s,
- repeat_ch<Ch> const & r
-)
-{
- return r( s ), s;
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_ostream<Ch, Tr> &
-operator <<
-(
- std::basic_ostream<Ch, Tr> & s,
- repeat_ch<Ch> const & r
-)
-{
- return r( s ), s;
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_istream<Ch, Tr> &
-operator >>
-(
- std::basic_istream<Ch, Tr> & s,
- repeat_char const & r
-)
-{
- return r( s ), s;
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_ostream<Ch, Tr> &
-operator <<
-(
- std::basic_ostream<Ch, Tr> & s,
- repeat_char const & r
-)
-{
- return r( s ), s;
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_IOMANIP_REPEAT_HPP

Deleted: sandbox/boost/io/null_stream.hpp
==============================================================================
--- sandbox/boost/io/null_stream.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,163 +0,0 @@
-// Boost io/null_stream.hpp header file ------------------------------------//
-
-// Copyright 2003 Daryle Walker. Use, modification, and distribution are
-// subject to the Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_NULL_STREAM_HPP
-#define BOOST_IO_NULL_STREAM_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/io/streambuf_wrapping.hpp> // for basic_wrapping_ostream, etc.
-
-#include <ios> // for std::streamsize
-#include <streambuf> // for std::basic_streambuf
-#include <string> // for std::char_traits
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_nullbuf;
-
-typedef basic_nullbuf<char> nullbuf;
-typedef basic_nullbuf<wchar_t> wnullbuf;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_onullstream;
-
-typedef basic_onullstream<char> onullstream;
-typedef basic_onullstream<wchar_t> wonullstream;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_inullstream;
-
-typedef basic_inullstream<char> inullstream;
-typedef basic_inullstream<wchar_t> winullstream;
-
-
-// Voided stream-buffer class template declaration -------------------------//
-
-template < typename Ch, class Tr >
-class basic_nullbuf
- : public std::basic_streambuf<Ch, Tr>
-{
- typedef std::basic_streambuf<Ch, Tr> base_type;
- typedef basic_nullbuf self_type;
-
-public:
- // Template arguments
- typedef Ch char_type;
- typedef Tr traits_type;
-
- // Other types
- typedef typename Tr::int_type int_type;
- typedef typename Tr::pos_type pos_type;
- typedef typename Tr::off_type off_type;
-
- // Constructor (use automatically-defined destructor)
- basic_nullbuf();
-
- // Accessors
- std::streamsize pcount() const;
-
-protected:
- // Overriden virtual functions
- virtual std::streamsize xsputn( char_type const *s, std::streamsize n );
- virtual int_type overflow( int_type c = traits_type::eof() );
-
-private:
- // Member data
- std::streamsize count_;
-
-}; // boost::io::basic_nullbuf
-
-
-// Voided stream class template declarations -------------------------------//
-
-// Macro to template the templates!
-#define BOOST_PRIVATE_WRAPPER( SuffixF, SuffixB ) \
- template < typename Ch, class Tr > \
- class basic_##SuffixF \
- : public basic_wrapping_##SuffixB< basic_nullbuf<Ch, Tr> > \
- { \
- typedef basic_nullbuf<Ch, Tr> streambuf_type; \
- typedef basic_wrapping_##SuffixB<streambuf_type> base_type; \
- public: \
- typedef Ch char_type; \
- typedef Tr traits_type; \
- typedef typename Tr::int_type int_type; \
- typedef typename Tr::pos_type pos_type; \
- typedef typename Tr::off_type off_type; \
- }
-
-BOOST_PRIVATE_WRAPPER( onullstream, ostream );
-BOOST_PRIVATE_WRAPPER( inullstream, istream );
-
-#undef BOOST_PRIVATE_WRAPPER
-
-
-// Voided stream-buffer class template member function definitions ---------//
-
-template < typename Ch, class Tr >
-inline
-basic_nullbuf<Ch, Tr>::basic_nullbuf
-(
-)
- : count_( 0 )
-{
-}
-
-template < typename Ch, class Tr >
-inline
-std::streamsize
-basic_nullbuf<Ch, Tr>::pcount
-(
-) const
-{
- return this->count_;
-}
-
-template < typename Ch, class Tr >
-inline
-std::streamsize
-basic_nullbuf<Ch, Tr>::xsputn
-(
- typename basic_nullbuf<Ch, Tr>::char_type const * s,
- std::streamsize n
-)
-{
- return ( s && (n >= 0) ) ? ( (this->count_ += n), n ) : 0;
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_nullbuf<Ch, Tr>::int_type
-basic_nullbuf<Ch, Tr>::overflow
-(
- typename basic_nullbuf<Ch, Tr>::int_type c // = traits_type::eof()
-)
-{
- if ( !traits_type::eq_int_type(c, traits_type::eof()) )
- {
- ++this->count_;
- }
-
- return traits_type::not_eof( c );
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_NULL_STREAM_HPP

Deleted: sandbox/boost/io/pointer_stream.hpp
==============================================================================
--- sandbox/boost/io/pointer_stream.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,592 +0,0 @@
-// Boost io/pointer_stream.hpp header file ---------------------------------//
-
-// Copyright 2003-2004 Daryle Walker. Use, modification, and distribution are
-// subject to the Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_POINTER_STREAM_HPP
-#define BOOST_IO_POINTER_STREAM_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/io/streambuf_wrapping.hpp> // for basic_wrapping_istream, etc.
-
-#include <cstddef> // for NULL
-#include <ios> // for std::streamsize, std::ios_base
-#include <streambuf> // for std::basic_streambuf
-#include <string> // for std::char_traits
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_pointerbuf;
-
-typedef basic_pointerbuf<char> pointerbuf;
-typedef basic_pointerbuf<wchar_t> wpointerbuf;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_constpointerbuf;
-
-typedef basic_constpointerbuf<char> constpointerbuf;
-typedef basic_constpointerbuf<wchar_t> wconstpointerbuf;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_ipointerstream;
-
-typedef basic_ipointerstream<char> ipointerstream;
-typedef basic_ipointerstream<wchar_t> wipointerstream;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_opointerstream;
-
-typedef basic_opointerstream<char> opointerstream;
-typedef basic_opointerstream<wchar_t> wopointerstream;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_pointerstream;
-
-typedef basic_pointerstream<char> pointerstream;
-typedef basic_pointerstream<wchar_t> wpointerstream;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_iconstpointerstream;
-
-typedef basic_iconstpointerstream<char> iconstpointerstream;
-typedef basic_iconstpointerstream<wchar_t> wiconstpointerstream;
-
-
-// Pointer-using stream-buffer class template declarations -----------------//
-
-template < typename Ch, class Tr >
-class basic_pointerbuf
- : public std::basic_streambuf<Ch, Tr>
-{
- typedef std::basic_streambuf<Ch, Tr> base_type;
- typedef basic_pointerbuf self_type;
-
-public:
- // Template arguments
- typedef Ch char_type;
- typedef Tr traits_type;
-
- // Other types
- typedef typename Tr::int_type int_type;
- typedef typename Tr::pos_type pos_type;
- typedef typename Tr::off_type off_type;
-
- // Lifetime management (use automatically-defined destructor)
- basic_pointerbuf( char_type *b, char_type *e,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
- // Accessors
- char_type * begin_pointer() const;
- char_type * end_pointer() const;
-
- std::streamsize pcount() const;
- std::streamsize gcount() const;
-
- std::ios_base::openmode open_mode() const;
-
-protected:
- // Overriden virtual functions
- virtual base_type * setbuf( char_type *s, std::streamsize n );
-
- virtual pos_type seekoff( off_type off, std::ios_base::seekdir way,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
- virtual pos_type seekpos( pos_type sp,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
- virtual int_type pbackfail( int_type c = traits_type::eof() );
-
-}; // boost::io::basic_pointerbuf
-
-template < typename Ch, class Tr >
-class basic_constpointerbuf
- : public std::basic_streambuf<Ch, Tr>
-{
- typedef std::basic_streambuf<Ch, Tr> base_type;
- typedef basic_constpointerbuf self_type;
-
-public:
- // Template arguments
- typedef Ch char_type;
- typedef Tr traits_type;
-
- // Other types
- typedef typename Tr::int_type int_type;
- typedef typename Tr::pos_type pos_type;
- typedef typename Tr::off_type off_type;
-
- // Lifetime management (use automatically-defined destructor)
- basic_constpointerbuf( char_type const *b, char_type const *e );
-
- // Extra buffer management
- self_type * pubsetbuf( char_type const *s, std::streamsize n );
-
- // Accessors
- char_type const * begin_pointer() const;
- char_type const * end_pointer() const;
-
- std::streamsize gcount() const;
-
-protected:
- // Overriden virtual functions
- virtual base_type * setbuf( char_type *s, std::streamsize n );
-
- virtual pos_type seekoff( off_type off, std::ios_base::seekdir way,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
- virtual pos_type seekpos( pos_type sp,
- std::ios_base::openmode which = std::ios_base::in | std::ios_base::out );
-
-}; // boost::io::basic_constpointerbuf
-
-
-// Pointer-using stream class template declarations ------------------------//
-
-// Macro to template the templates!
-#define BOOST_PRIVATE_WRAPPER( SuffixF, SuffixB, ModeC, ModeM ) \
- template < typename Ch, class Tr > \
- class basic_##SuffixF \
- : public basic_wrapping_##SuffixB< basic_pointerbuf<Ch, Tr> > \
- { \
- typedef basic_pointerbuf<Ch, Tr> streambuf_type; \
- typedef basic_wrapping_##SuffixB<streambuf_type> base_type; \
- typedef std::ios_base::openmode openmode; \
- public: \
- typedef Ch char_type; \
- typedef Tr traits_type; \
- typedef typename Tr::int_type int_type; \
- typedef typename Tr::pos_type pos_type; \
- typedef typename Tr::off_type off_type; \
- basic_##SuffixF( char_type *b, char_type *e, \
- openmode which = ModeC ) : base_type( b, e, which | ModeM ) {} \
- char_type * begin_pointer() const \
- { return this->rdbuf()->begin_pointer(); } \
- char_type * end_pointer() const \
- { return this->rdbuf()->end_pointer(); } \
- }
-
-BOOST_PRIVATE_WRAPPER( ipointerstream, istream, std::ios_base::in,
- std::ios_base::in );
-BOOST_PRIVATE_WRAPPER( opointerstream, ostream, std::ios_base::out,
- std::ios_base::out );
-BOOST_PRIVATE_WRAPPER( pointerstream, iostream, (std::ios_base::in
- | std::ios_base::out), openmode(0) );
-
-#undef BOOST_PRIVATE_WRAPPER
-
-template < typename Ch, class Tr >
-class basic_iconstpointerstream
- : public basic_wrapping_istream< basic_constpointerbuf<Ch, Tr> >
-{
- typedef basic_constpointerbuf<Ch, Tr> streambuf_type;
- typedef basic_wrapping_istream<streambuf_type> base_type;
-
-public:
- // Template arguments
- typedef Ch char_type;
- typedef Tr traits_type;
-
- // Other types
- typedef typename Tr::int_type int_type;
- typedef typename Tr::pos_type pos_type;
- typedef typename Tr::off_type off_type;
-
- // Lifetime management (use automatically-defined destructor)
- basic_iconstpointerstream( char_type const *b, char_type const *e )
- : base_type( b, e )
- {
- }
-
- // Accessors
- char_type const * begin_pointer() const
- {
- return this->rdbuf()->begin_pointer();
- }
-
- char_type const * end_pointer() const
- {
- return this->rdbuf()->end_pointer();
- }
-
-}; // boost::io::basic_iconstpointerstream
-
-
-// Pointer-using stream-buffer class template member function definitions --//
-
-template < typename Ch, class Tr >
-inline
-basic_pointerbuf<Ch, Tr>::basic_pointerbuf
-(
- typename basic_pointerbuf<Ch, Tr>::char_type * b,
- typename basic_pointerbuf<Ch, Tr>::char_type * e,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- using std::ios_base;
-
- if ( (which & ios_base::in) != 0 )
- {
- this->setg( b, b, e );
- }
-
- if ( (which & ios_base::out) != 0 )
- {
- this->setp( b, e );
- }
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_pointerbuf<Ch, Tr>::char_type *
-basic_pointerbuf<Ch, Tr>::begin_pointer
-(
-) const
-{
- return this->gptr() ? this->eback() : this->pbase();
-}
-
-template <typename Ch, class Tr >
-inline
-typename basic_pointerbuf<Ch, Tr>::char_type *
-basic_pointerbuf<Ch, Tr>::end_pointer
-(
-) const
-{
- return this->pptr() ? this->epptr() : this->egptr();
-}
-
-template < typename Ch, class Tr >
-inline
-std::streamsize
-basic_pointerbuf<Ch, Tr>::pcount
-(
-) const
-{
- return this->pptr() ? ( this->pptr() - this->pbase() ) : 0;
-}
-
-template < typename Ch, class Tr >
-inline
-std::streamsize
-basic_pointerbuf<Ch, Tr>::gcount
-(
-) const
-{
- return this->gptr() ? ( this->gptr() - this->eback() ) : 0;
-}
-
-template < typename Ch, class Tr >
-inline
-std::ios_base::openmode
-basic_pointerbuf<Ch, Tr>::open_mode
-(
-) const
-{
- using std::ios_base;
-
- ios_base::openmode const zero = static_cast<ios_base::openmode>( 0 );
-
- return ( this->gptr() ? ios_base::in : zero ) | ( this->pptr()
- ? ios_base::out : zero );
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_streambuf<Ch, Tr> *
-basic_pointerbuf<Ch, Tr>::setbuf
-(
- typename basic_pointerbuf<Ch, Tr>::char_type * s,
- std::streamsize n
-)
-{
- if ( this->gptr() )
- {
- this->setg( s, s, s + n );
- }
-
- if ( this->pptr() )
- {
- this->setp( s, s + n );
- }
-
- return this;
-}
-
-template < typename Ch, class Tr >
-typename basic_pointerbuf<Ch, Tr>::pos_type
-basic_pointerbuf<Ch, Tr>::seekoff
-(
- typename basic_pointerbuf<Ch, Tr>::off_type off,
- std::ios_base::seekdir way,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- using std::ios_base;
-
- char_type * const old_begin = this->begin_pointer();
- char_type * const old_end = this->end_pointer();
- char_type * const old_gptr = this->gptr();
- char_type * const old_pptr = this->pptr();
- bool const do_input = ( (which & ios_base::in) != 0 );
- bool const do_output = ( (which & ios_base::out) != 0 );
- pos_type const invalid( static_cast<off_type>(-1) );
-
- pos_type answer = invalid;
-
- if ( do_input )
- {
- off_type newoff, newindex;
-
- if ( NULL == old_gptr ) goto bail;
-
- switch ( way )
- {
- case ios_base::beg :
- newoff = 0;
- break;
- case ios_base::end :
- newoff = this->egptr() - this->eback();
- break;
- case ios_base::cur :
- newoff = this->gptr() - this->eback();
- break;
- default :
- goto bail;
- }
- newindex = newoff + off;
-
- if ( newindex < off_type(0) ) goto bail;
- if ( newindex > off_type(old_end - old_begin) ) goto bail;
-
- this->gbump( newindex - off_type(this->gcount()) );
- answer = pos_type( newindex );
- }
-
- if ( do_output )
- {
- off_type newoff, newindex;
-
- if ( NULL == old_pptr ) goto bail;
-
- switch ( way )
- {
- case ios_base::beg :
- newoff = 0;
- break;
- case ios_base::end :
- newoff = this->epptr() - this->pbase();
- break;
- case ios_base::cur :
- newoff = this->pptr() - this->pbase();
- if ( !do_input ) break; // can't do both areas with "cur"!
- // Possible FALL-THROUGH
- default :
- goto bail;
- }
- newindex = newoff + off;
-
- if ( newindex < off_type(0) ) goto bail;
- if ( newindex > off_type(old_end - old_begin) ) goto bail;
-
- // make sure answers are consistent with both areas if neccessary
- if ( do_input && (pos_type( newindex ) != answer) ) goto bail;
-
- this->pbump( newindex - off_type(this->pcount()) );
- answer = pos_type( newindex );
- }
-
- // At this point, either the sole area successfully changed, both areas
- // successfully changed to the same position, or neither area changed.
- return answer;
-
-bail:
- if ( old_gptr )
- {
- this->setg( old_begin, old_gptr, old_end );
- }
-
- if ( old_pptr )
- {
- this->setp( old_begin, old_end );
- this->pbump( old_pptr - old_begin );
- }
-
- return invalid;
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_pointerbuf<Ch, Tr>::pos_type
-basic_pointerbuf<Ch, Tr>::seekpos
-(
- typename basic_pointerbuf<Ch, Tr>::pos_type sp,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- return this->self_type::seekoff( off_type(sp), std::ios_base::beg, which );
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_pointerbuf<Ch, Tr>::int_type
-basic_pointerbuf<Ch, Tr>::pbackfail
-(
- typename basic_pointerbuf<Ch, Tr>::int_type c // = traits_type::eof()
-)
-{
- if ( this->gptr() > this->eback() ) // also covers no-get-area case
- {
- this->gbump( -1 );
-
- if ( !traits_type::eq_int_type(c, traits_type::eof()) )
- {
- traits_type::assign( *this->gptr(), traits_type::to_char_type(c) );
- }
-
- return traits_type::to_int_type( *this->gptr() );
- }
-
- return traits_type::eof();
-}
-
-template < typename Ch, class Tr >
-inline
-basic_constpointerbuf<Ch, Tr>::basic_constpointerbuf
-(
- typename basic_constpointerbuf<Ch, Tr>::char_type const * b,
- typename basic_constpointerbuf<Ch, Tr>::char_type const * e
-)
-{
- char_type * const mb = const_cast<char_type *>( b );
-
- this->setg( mb, mb, const_cast<char_type *>(e) );
-}
-
-template < typename Ch, class Tr >
-inline
-basic_constpointerbuf<Ch, Tr> *
-basic_constpointerbuf<Ch, Tr>::pubsetbuf
-(
- typename basic_constpointerbuf<Ch, Tr>::char_type const * s,
- std::streamsize n
-)
-{
- return static_cast<self_type *>(
- this->base_type::pubsetbuf(const_cast<char_type *>( s ), n) );
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_constpointerbuf<Ch, Tr>::char_type const *
-basic_constpointerbuf<Ch, Tr>::begin_pointer
-(
-) const
-{
- return const_cast<char_type const *>( this->eback() );
-}
-
-template <typename Ch, class Tr >
-inline
-typename basic_constpointerbuf<Ch, Tr>::char_type const *
-basic_constpointerbuf<Ch, Tr>::end_pointer
-(
-) const
-{
- return const_cast<char_type const *>( this->egptr() );
-}
-
-template < typename Ch, class Tr >
-inline
-std::streamsize
-basic_constpointerbuf<Ch, Tr>::gcount
-(
-) const
-{
- return static_cast<std::streamsize>( this->gptr() - this->eback() );
-}
-
-template < typename Ch, class Tr >
-inline
-std::basic_streambuf<Ch, Tr> *
-basic_constpointerbuf<Ch, Tr>::setbuf
-(
- typename basic_constpointerbuf<Ch, Tr>::char_type * s,
- std::streamsize n
-)
-{
- this->setg( s, s, s + n );
- return this;
-}
-
-template < typename Ch, class Tr >
-typename basic_constpointerbuf<Ch, Tr>::pos_type
-basic_constpointerbuf<Ch, Tr>::seekoff
-(
- typename basic_constpointerbuf<Ch, Tr>::off_type off,
- std::ios_base::seekdir way,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- using std::ios_base;
-
- char_type * const begin_ptr = this->eback();
- char_type * const end_ptr = this->egptr();
- char_type * const cur_ptr = this->gptr();
- pos_type const invalid( static_cast<off_type>(-1) );
- pos_type answer = invalid;
-
- if ( char_type * const base_ptr = (ios_base::beg == way) ? begin_ptr
- : (ios_base::end == way) ? end_ptr : (ios_base::cur == way) ? cur_ptr
- : NULL )
- {
- if ( (which & ios_base::in) != 0 )
- {
- off_type const new_index = off_type( base_ptr - begin_ptr ) + off;
-
- if ( (new_index >= off_type( 0 )) && (new_index <= off_type( end_ptr
- - begin_ptr )) )
- {
- this->gbump( new_index - off_type(cur_ptr - begin_ptr) );
- answer = pos_type( new_index );
- }
- }
- }
-
- return answer;
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_constpointerbuf<Ch, Tr>::pos_type
-basic_constpointerbuf<Ch, Tr>::seekpos
-(
- typename basic_constpointerbuf<Ch, Tr>::pos_type sp,
- std::ios_base::openmode which
- // = std::ios_base::in | std::ios_base::out
-)
-{
- return this->self_type::seekoff( off_type(sp), std::ios_base::beg, which );
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_POINTER_STREAM_HPP

Deleted: sandbox/boost/io/streambuf_wrapping.hpp
==============================================================================
--- sandbox/boost/io/streambuf_wrapping.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,160 +0,0 @@
-// Boost io/streambuf_wrapping.hpp header file -----------------------------//
-
-// Copyright 2003 Daryle Walker. Use, modification, and distribution are
-// subject to the Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_STREAMBUF_WRAPPING_HPP
-#define BOOST_IO_STREAMBUF_WRAPPING_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/utility/base_from_member.hpp> // for boost::base_from_member
-
-#include <ios> // for std::basic_ios
-#include <istream> // for std::basic_istream and std::basic_iostream
-#include <ostream> // for std::basic_ostream
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < class StreamBuf >
- class basic_wrapping_istream;
-
-template < class StreamBuf >
- class basic_wrapping_ostream;
-
-template < class StreamBuf >
- class basic_wrapping_iostream;
-
-
-// Implementation detail stuff ---------------------------------------------//
-
-namespace detail
-{
-
- // Base class (template) for common member functions and data
- template < class StreamBuf >
- class basic_wrapping_ios
- : private ::boost::base_from_member< StreamBuf >
- , public virtual ::std::basic_ios< typename StreamBuf::char_type,
- typename StreamBuf::traits_type >
- {
- typedef ::boost::base_from_member< StreamBuf > pbase_type;
-
- typedef ::std::basic_ios< typename StreamBuf::char_type,
- typename StreamBuf::traits_type > vbase_type;
-
- public:
- typedef StreamBuf streambuf_type;
-
- typedef typename StreamBuf::char_type char_type;
- typedef typename StreamBuf::int_type int_type;
-
- typedef typename StreamBuf::pos_type pos_type;
- typedef typename StreamBuf::off_type off_type;
- typedef typename StreamBuf::traits_type traits_type;
-
- streambuf_type * rdbuf()
- { return &this->pbase_type::member; }
-
- streambuf_type const * rdbuf() const
- { return &this->pbase_type::member; }
-
- bool is_using_internal_streambuf() const
- { return this->rdbuf() == this->vbase_type::rdbuf(); }
-
- protected:
- explicit basic_wrapping_ios( streambuf_type const &s )
- : pbase_type( s )
- { this->vbase_type::init( &this->pbase_type::member ); }
-
- basic_wrapping_ios()
- : pbase_type()
- { this->vbase_type::init( &this->pbase_type::member ); }
-
- template < typename T1 >
- explicit basic_wrapping_ios( T1 x1 )
- : pbase_type( x1 )
- { this->vbase_type::init( &this->pbase_type::member ); }
-
- template < typename T1, typename T2 >
- basic_wrapping_ios( T1 x1, T2 x2 )
- : pbase_type( x1, x2 )
- { this->vbase_type::init( &this->pbase_type::member ); }
-
- template < typename T1, typename T2, typename T3 >
- basic_wrapping_ios( T1 x1, T2 x2, T3 x3 )
- : pbase_type( x1, x2, x3 )
- { this->vbase_type::init( &this->pbase_type::member ); }
-
- }; // boost::io::detail::basic_wrapping_ios
-
-} // namespace detail
-
-
-// Streambuf-wrapping stream class template declarations -------------------//
-
-// Use a macro to template the templates!
-#define BOOST_PRIVATE_WRAPPER( Stream ) \
- template < class StreamBuf > \
- class basic_wrapping_##Stream \
- : public detail::basic_wrapping_ios< StreamBuf > \
- , public ::std::basic_##Stream < typename StreamBuf::char_type, \
- typename StreamBuf::traits_type > \
- { \
- typedef detail::basic_wrapping_ios< StreamBuf > pbase_type; \
- typedef ::std::basic_##Stream< typename StreamBuf::char_type, \
- typename StreamBuf::traits_type > base_type; \
- public: \
- typedef StreamBuf streambuf_type; \
- typedef typename StreamBuf::char_type char_type; \
- typedef typename StreamBuf::int_type int_type; \
- typedef typename StreamBuf::pos_type pos_type; \
- typedef typename StreamBuf::off_type off_type; \
- typedef typename StreamBuf::traits_type traits_type; \
- using pbase_type::rdbuf; \
- protected: \
- explicit basic_wrapping_##Stream ( streambuf_type const &s ) \
- : pbase_type( s ), base_type( this->pbase_type::rdbuf() ) \
- {} \
- basic_wrapping_##Stream () \
- : pbase_type(), base_type( this->pbase_type::rdbuf() ) \
- {} \
- template < typename T1 > \
- explicit basic_wrapping_##Stream ( T1 x1 ) \
- : pbase_type( x1 ), base_type( this->pbase_type::rdbuf() ) \
- {} \
- template < typename T1, typename T2 > \
- basic_wrapping_##Stream ( T1 x1, T2 x2 ) \
- : pbase_type( x1, x2 ), base_type( this->pbase_type::rdbuf() ) \
- {} \
- template < typename T1, typename T2, typename T3 > \
- basic_wrapping_##Stream ( T1 x1, T2 x2, T3 x3 ) \
- : pbase_type( x1, x2, x3 ), base_type( this->pbase_type::rdbuf() ) \
- {} \
- }
-
-
-BOOST_PRIVATE_WRAPPER( istream );
-BOOST_PRIVATE_WRAPPER( ostream );
-BOOST_PRIVATE_WRAPPER( iostream );
-
-
-// Undo any private macros
-#undef BOOST_PRIVATE_WRAPPER
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_STREAMBUF_WRAPPING_HPP

Deleted: sandbox/boost/io/value_stream.hpp
==============================================================================
--- sandbox/boost/io/value_stream.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,226 +0,0 @@
-// Boost io/value_stream.hpp header file -----------------------------------//
-
-// Copyright 2003 Daryle Walker. Use, modification, and distribution are
-// subject to the Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/io/> for the library's home page.
-
-#ifndef BOOST_IO_VALUE_STREAM_HPP
-#define BOOST_IO_VALUE_STREAM_HPP
-
-#include <boost/io_fwd.hpp> // self include
-
-#include <boost/io/streambuf_wrapping.hpp> // for basic_wrapping_istream, etc.
-#include <boost/limits.hpp> // for std::numeric_limits
-
-#include <ios> // for std::streamsize
-#include <streambuf> // for std::basic_streambuf
-#include <string> // for std::char_traits
-
-
-namespace boost
-{
-namespace io
-{
-
-
-// Forward declarations ----------------------------------------------------//
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_valuebuf;
-
-typedef basic_valuebuf<char> valuebuf;
-typedef basic_valuebuf<wchar_t> wvaluebuf;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_ivaluestream;
-
-typedef basic_ivaluestream<char> ivaluestream;
-typedef basic_ivaluestream<wchar_t> wivaluestream;
-
-template < typename Ch, class Tr = ::std::char_traits<Ch> >
- class basic_ovaluestream;
-
-typedef basic_ovaluestream<char> ovaluestream;
-typedef basic_ovaluestream<wchar_t> wovaluestream;
-
-
-// Constant-value stream-buffer class template declaration -----------------//
-
-template < typename Ch, class Tr >
-class basic_valuebuf
- : public std::basic_streambuf<Ch, Tr>
-{
- typedef std::basic_streambuf<Ch, Tr> base_type;
- typedef basic_valuebuf self_type;
-
-public:
- // Template arguments
- typedef Ch char_type;
- typedef Tr traits_type;
-
- // Other types
- typedef typename Tr::int_type int_type;
- typedef typename Tr::pos_type pos_type;
- typedef typename Tr::off_type off_type;
-
- // Constructor (use automatically-defined destructor)
- explicit basic_valuebuf( char_type const &value = char_type() );
-
- // Accessors
- std::streamsize gcount() const;
-
- char_type gvalue() const;
-
-protected:
- // Overriden virtual functions
- virtual std::streamsize showmanyc();
- virtual std::streamsize xsgetn( char_type *s, std::streamsize n );
- virtual int_type underflow();
- virtual int_type uflow();
- virtual int_type pbackfail( int_type c = traits_type::eof() );
-
-private:
- // Member data
- std::streamsize count_;
- int_type ci_;
-
-}; // boost::io::basic_valuebuf
-
-
-// Constant-value stream class template declarations -----------------------//
-
-// Macro to template the templates!
-#define BOOST_PRIVATE_WRAPPER( SuffixF, SuffixB ) \
- template < typename Ch, class Tr > \
- class basic_##SuffixF \
- : public basic_wrapping_##SuffixB< basic_valuebuf<Ch, Tr> > \
- { \
- typedef basic_valuebuf<Ch, Tr> streambuf_type; \
- typedef basic_wrapping_##SuffixB<streambuf_type> base_type; \
- public: \
- typedef Ch char_type; \
- typedef Tr traits_type; \
- typedef typename Tr::int_type int_type; \
- typedef typename Tr::pos_type pos_type; \
- typedef typename Tr::off_type off_type; \
- explicit basic_##SuffixF( char_type const &value = char_type() ) \
- : base_type( value ) \
- {} \
- char_type gvalue() const \
- { return this->rdbuf()->gvalue(); } \
- }
-
-BOOST_PRIVATE_WRAPPER( ivaluestream, istream );
-BOOST_PRIVATE_WRAPPER( ovaluestream, ostream );
-
-#undef BOOST_PRIVATE_WRAPPER
-
-
-// Constant-value stream-buffer class template member function definitions -//
-
-template < typename Ch, class Tr >
-inline
-basic_valuebuf<Ch, Tr>::basic_valuebuf
-(
- typename basic_valuebuf<Ch, Tr>::char_type const & value // = char_type()
-)
- : count_( 0 ), ci_( traits_type::to_int_type(value) )
-{
-}
-
-template < typename Ch, class Tr >
-inline
-std::streamsize
-basic_valuebuf<Ch, Tr>::gcount
-(
-) const
-{
- return this->count_;
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_valuebuf<Ch, Tr>::char_type
-basic_valuebuf<Ch, Tr>::gvalue
-(
-) const
-{
- return traits_type::to_char_type( this->ci_ );
-}
-
-template < typename Ch, class Tr >
-inline
-std::streamsize
-basic_valuebuf<Ch, Tr>::showmanyc
-(
-)
-{
- return std::numeric_limits<std::streamsize>::max();
-}
-
-template < typename Ch, class Tr >
-std::streamsize
-basic_valuebuf<Ch, Tr>::xsgetn
-(
- typename basic_valuebuf<Ch, Tr>::char_type * s,
- std::streamsize n
-)
-{
- if ( s && (n >= 0) )
- {
- traits_type::assign( s, n, this->gvalue() );
- this->count_ += n;
- return n;
- }
- else
- {
- return 0;
- }
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_valuebuf<Ch, Tr>::int_type
-basic_valuebuf<Ch, Tr>::underflow
-(
-)
-{
- return this->ci_;
-}
-
-template < typename Ch, class Tr >
-inline
-typename basic_valuebuf<Ch, Tr>::int_type
-basic_valuebuf<Ch, Tr>::uflow
-(
-)
-{
- return ++this->count_, this->ci_;
-}
-
-template < typename Ch, class Tr >
-typename basic_valuebuf<Ch, Tr>::int_type
-basic_valuebuf<Ch, Tr>::pbackfail
-(
- typename basic_valuebuf<Ch, Tr>::int_type c // = traits_type::eof()
-)
-{
- if ( traits_type::eq_int_type(c, traits_type::eof())
- || traits_type::eq_int_type(c, this->ci_) )
- {
- return --this->count_, this->ci_;
- }
- else
- {
- return traits_type::eof();
- }
-}
-
-
-} // namespace io
-} // namespace boost
-
-
-#endif // BOOST_IO_VALUE_STREAM_HPP

Deleted: sandbox/boost/memory_fwd.hpp
==============================================================================
--- sandbox/boost/memory_fwd.hpp 2007-07-12 00:01:54 EDT (Thu, 12 Jul 2007)
+++ (empty file)
@@ -1,35 +0,0 @@
-// Boost memory_fwd.hpp header file ----------------------------------------//
-
-// Copyright 2003 Boost.org. Use, modification, and distribution are subject
-// to the Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-// See <http://www.boost.org/libs/memory/> for the library's home page.
-
-#ifndef BOOST_MEMORY_FWD_HPP
-#define BOOST_MEMORY_FWD_HPP
-
-
-namespace boost
-{
-namespace memory
-{
-
-
-// From <boost/memory/auto_array.hpp> --------------------------------------//
-
-template < typename T >
- class auto_array;
-
-
-// From <boost/memory/auto_temp_buf.hpp> -----------------------------------//
-
-template < typename T >
- class auto_temp_buf;
-
-
-} // namespace memory
-} // namespace boost
-
-
-#endif // BOOST_MEMORY_FWD_HPP


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