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 2003-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_INVERT_HPP_INCLUDED #define BOOST_IOSTREAMS_INVERT_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
// copy, min. #include
#include
// BOOST_DEDUCED_TYPENAME. #include
// default_filter_buffer_size. #include
#include
#include
#include
#include
#include
#include
#include
// clear_flags, call_reset #include
#include
#include
#include
// Must come last. #include
// MSVC. namespace boost { namespace iostreams { // // Template name: inverse. // Template paramters: // Filter - A model of InputFilter or OutputFilter. // Description: Generates an InputFilter from an OutputFilter or // vice versa. // template
class inverse { private: typedef typename category_of
::type base_category; typedef reference_wrapper
filter_ref; public: typedef typename char_type_of
::type char_type; typedef typename int_type_of
::type int_type; typedef char_traits
traits_type; typedef typename mpl::if_< is_convertible< base_category, input >, output, input >::type mode; struct category : mode, filter_tag, multichar_tag, closable_tag { }; explicit inverse( const Filter& filter, std::streamsize buffer_size = default_filter_buffer_size) : pimpl_(new impl(filter, buffer_size)) { } template
std::streamsize read(Source& src, char* s, std::streamsize n) { typedef detail::counted_array_sink
array_sink; typedef composite
filtered_array_sink; assert((flags() & f_write) == 0); if (flags() == 0) { flags() = f_read; buf().set(0, 0); } filtered_array_sink snk(filter(), array_sink(s, n)); int_type status; for ( status = traits_type::good(); snk.second().count() < n && status == traits_type::good(); ) { status = buf().fill(src); buf().flush(snk); } return snk.second().count() == 0 && status == traits_type::eof() ? -1 : snk.second().count(); } template
std::streamsize write(Sink& dest, const char* s, std::streamsize n) { typedef detail::counted_array_source
array_source; typedef composite
filtered_array_source; assert((flags() & f_read) == 0); if (flags() == 0) { flags() = f_write; buf().set(0, 0); } filtered_array_source src(filter(), array_source(s, n)); for (bool good = true; src.second().count() < n && good; ) { buf().fill(src); good = buf().flush(dest); } return src.second().count(); } template
void close(Device& dev) { detail::execute_all( detail::flush_buffer(buf(), dev, (flags() & f_write) != 0), detail::call_close_all(pimpl_->filter_, dev), detail::clear_flags(flags()) ); } private: filter_ref filter() { return boost::ref(pimpl_->filter_); } detail::buffer
& buf() { return pimpl_->buf_; } int& flags() { return pimpl_->flags_; } enum flags_ { f_read = 1, f_write = 2 }; struct impl { impl(const Filter& filter, std::streamsize n) : filter_(filter), buf_(n), flags_(0) { buf_.set(0, 0); } Filter filter_; detail::buffer
buf_; int flags_; }; shared_ptr
pimpl_; }; // // Template name: invert. // Template paramters: // Filter - A model of InputFilter or OutputFilter. // Description: Returns an instance of an appropriate specialization of inverse. // template
inverse
invert(const Filter& f) { return inverse
(f); } //----------------------------------------------------------------------------// } } // End namespaces iostreams, boost. #include
// MSVC. #endif // #ifndef BOOST_IOSTREAMS_INVERT_HPP_INCLUDED
invert.hpp
Page URL
File URL
Prev
18/37
Next
Download
( 5 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.