DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2005-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for documentation. #ifndef BOOST_IOSTREAMS_READ_HPP_INCLUDED #define BOOST_IOSTREAMS_READ_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
// DEDUCED_TYPENAME, MSVC. #include
#include
#include
#include
#include
// streamsize. #include
#include
#include
#include
// Must come last. #include
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------// # include
#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------// namespace boost { namespace iostreams { namespace detail { template
struct read_device_impl; template
struct read_filter_impl; } // End namespace detail. template
typename int_type_of
::type get(T& t) { return detail::read_device_impl
::get(detail::unwrap(t)); } template
inline std::streamsize read(T& t, typename char_type_of
::type* s, std::streamsize n) { return detail::read_device_impl
::read(detail::unwrap(t), s, n); } template
std::streamsize read(T& t, Source& src, typename char_type_of
::type* s, std::streamsize n) { return detail::read_filter_impl
::read(detail::unwrap(t), src, s, n); } template
bool putback(T& t, typename char_type_of
::type c) { return detail::read_device_impl
::putback(detail::unwrap(t), c); } //----------------------------------------------------------------------------// namespace detail { // Helper function for adding -1 as EOF indicator. inline std::streamsize check_eof(std::streamsize n) { return n != 0 ? n : -1; } // Helper templates for reading from streambufs. template
struct true_eof_impl; template<> struct true_eof_impl
{ template
static bool true_eof(T& t) { return t.true_eof(); } }; template<> struct true_eof_impl
{ template
static bool true_eof(T&) { return true; } }; template
inline bool true_eof(T& t) { const bool linked = is_linked
::value; return true_eof_impl
::true_eof(t); } //------------------Definition of read_device_impl----------------------------// template
struct read_device_impl : mpl::if_< detail::is_custom
, operations
, read_device_impl< BOOST_DEDUCED_TYPENAME detail::dispatch< T, istream_tag, streambuf_tag, input >::type > >::type { }; template<> struct read_device_impl
{ template
static typename int_type_of
::type get(T& t) { return t.get(); } template
static std::streamsize read(T& t, typename char_type_of
::type* s, std::streamsize n) { return check_eof(t.rdbuf()->sgetn(s, n)); } template
static bool putback(T& t, typename char_type_of
::type c) { typedef typename char_type_of
::type char_type; typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; return !traits_type::eq_int_type( t.rdbuf()->sputbackc(c), traits_type::eof() ); } }; template<> struct read_device_impl
{ template
static typename int_type_of
::type get(T& t) { // gcc 2.95 needs namespace qualification for char_traits. typedef typename char_type_of
::type char_type; typedef iostreams::char_traits
traits_type; typename int_type_of
::type c; return !traits_type::is_eof(c = t.sbumpc()) || detail::true_eof(t) ? c : traits_type::would_block(); } template
static std::streamsize read(T& t, typename char_type_of
::type* s, std::streamsize n) { std::streamsize amt; return (amt = t.sgetn(s, n)) != 0 ? amt : detail::true_eof(t) ? -1 : 0; } template
static bool putback(T& t, typename char_type_of
::type c) { // gcc 2.95 needs namespace qualification for char_traits. typedef typename char_type_of
::type char_type; typedef iostreams::char_traits
traits_type; return !traits_type::is_eof(t.sputbackc(c)); } }; template<> struct read_device_impl
{ template
static typename int_type_of
::type get(T& t) { // gcc 2.95 needs namespace qualification for char_traits. typedef typename char_type_of
::type char_type; typedef iostreams::char_traits
traits_type; char_type c; std::streamsize amt; return (amt = t.read(&c, 1)) == 1 ? traits_type::to_int_type(c) : amt == -1 ? traits_type::eof() : traits_type::would_block(); } template
static std::streamsize read(T& t, typename char_type_of
::type* s, std::streamsize n) { return t.read(s, n); } template
static bool putback(T& t, typename char_type_of
::type c) { // T must be Peekable. return t.putback(c); } }; //------------------Definition of read_filter_impl----------------------------// template
struct read_filter_impl : mpl::if_< detail::is_custom
, operations
, read_filter_impl< BOOST_DEDUCED_TYPENAME detail::dispatch< T, multichar_tag, any_tag >::type > >::type { }; template<> struct read_filter_impl
{ template
static std::streamsize read (T& t, Source& src, typename char_type_of
::type* s, std::streamsize n) { return t.read(src, s, n); } }; template<> struct read_filter_impl
{ template
static std::streamsize read (T& t, Source& src, typename char_type_of
::type* s, std::streamsize n) { // gcc 2.95 needs namespace qualification for char_traits. typedef typename char_type_of
::type char_type; typedef iostreams::char_traits
traits_type; for (std::streamsize off = 0; off < n; ++off) { typename traits_type::int_type c = t.get(src); if (traits_type::is_eof(c)) return check_eof(off); if (traits_type::would_block(c)) return off; s[off] = traits_type::to_char_type(c); } return n; } }; } // End namespace detail. } } // End namespaces iostreams, boost. #endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------// #include
#endif // #ifndef BOOST_IOSTREAMS_READ_HPP_INCLUDED
read.hpp
Page URL
File URL
Prev
27/37
Next
Download
( 7 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.