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_TEE_HPP_INCLUDED #define BOOST_IOSTREAMS_TEE_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
#include
// BOOST_DEDUCE_TYPENAME. #include
#include
#include
#include
#include
#include
// call_close_all #include
#include
#include
#include
#include
#include
namespace boost { namespace iostreams { // // Template name: tee_filter. // Template paramters: // Device - A blocking Sink. // template
class tee_filter : public detail::filter_adapter
{ public: typedef typename detail::param_type
::type param_type; typedef typename char_type_of
::type char_type; struct category : multichar_output_filter_tag, closable_tag, flushable_tag, localizable_tag, optimally_buffered_tag { }; BOOST_STATIC_ASSERT(( is_convertible< // Using mode_of causes failures on VC6-7.0. BOOST_DEDUCED_TYPENAME iostreams::category_of
::type, output >::value )); explicit tee_filter(param_type dev) : detail::filter_adapter
(dev) { } template
std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) { std::streamsize result = iostreams::write(snk, s, n); std::streamsize result2 = iostreams::write(this->component(), s, result); (void) result2; // Suppress 'unused variable' warning. assert(result == result2); return result; } template
void close(Next&) { detail::close_all(this->component()); } template
bool flush(Sink& snk) { bool r1 = iostreams::flush(snk); bool r2 = iostreams::flush(this->component()); return r1 && r2; } }; BOOST_IOSTREAMS_PIPABLE(tee_filter, 1) // // Template name: tee_device. // Template paramters: // Sink1 - A blocking Sink. // Sink2 - A blocking Sink. // template
class tee_device { public: typedef typename detail::param_type
::type param_type1; typedef typename detail::param_type
::type param_type2; typedef typename detail::value_type
::type value_type1; typedef typename detail::value_type
::type value_type2; typedef typename char_type_of
::type char_type; BOOST_STATIC_ASSERT(( is_same< char_type, BOOST_DEDUCED_TYPENAME char_type_of
::type >::value )); BOOST_STATIC_ASSERT(( is_convertible< // Using mode_of causes failures on VC6-7.0. BOOST_DEDUCED_TYPENAME iostreams::category_of
::type, output >::value )); BOOST_STATIC_ASSERT(( is_convertible< // Using mode_of causes failures on VC6-7.0. BOOST_DEDUCED_TYPENAME iostreams::category_of
::type, output >::value )); struct category : output, device_tag, closable_tag, flushable_tag, localizable_tag, optimally_buffered_tag { }; tee_device(param_type1 sink1, param_type2 sink2) : sink1_(sink1), sink2_(sink2) { } std::streamsize write(const char_type* s, std::streamsize n) { std::streamsize result1 = iostreams::write(sink1_, s, n); std::streamsize result2 = iostreams::write(sink2_, s, n); (void) result1; // Suppress 'unused variable' warning. (void) result2; assert(result1 == n && result2 == n); return n; } void close() { detail::execute_all( detail::call_close_all(sink1_), detail::call_close_all(sink2_) ); } bool flush() { bool r1 = iostreams::flush(sink1_); bool r2 = iostreams::flush(sink2_); return r1 && r2; } template
void imbue(const Locale& loc) { iostreams::imbue(sink1_, loc); iostreams::imbue(sink2_, loc); } std::streamsize optimal_buffer_size() const { return (std::max) ( iostreams::optimal_buffer_size(sink1_), iostreams::optimal_buffer_size(sink2_) ); } private: value_type1 sink1_; value_type2 sink2_; }; template
tee_filter
tee(const Sink& snk) { return tee_filter
(snk); } template
tee_device
tee(const Sink1& sink1, const Sink2& sink2) { return tee_device
(sink1, sink2); } } } // End namespaces iostreams, boost. #endif // #ifndef BOOST_IOSTREAMS_TEE_HPP_INCLUDED
tee.hpp
Page URL
File URL
Prev
34/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.