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. // To do: add support for random-access. #ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED #define BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
// NO_STD_LOCALE, DEDUCED_TYPENAME. #ifndef BOOST_NO_STD_LOCALE # include
#endif #include
#include
#include
#include
#include
#include
#include
#include
// Must come last. #include
namespace boost { namespace iostreams { namespace detail { // // Template name: combined_device. // Description: Model of Device defined in terms of a Source/Sink pair. // Template paramters: // Source - A model of Source, with the same char_type and traits_type // as Sink. // Sink - A model of Sink, with the same char_type and traits_type // as Source. // template
class combined_device { public: typedef typename char_type_of
::type char_type; struct category : bidirectional, device_tag, closable_tag, localizable_tag { }; combined_device(const Source& src, const Sink& snk); std::streamsize read(char_type* s, std::streamsize n); std::streamsize write(const char_type* s, std::streamsize n); void close(BOOST_IOS::openmode); #ifndef BOOST_NO_STD_LOCALE void imbue(const std::locale& loc); #endif private: typedef typename char_type_of
::type sink_char_type; BOOST_STATIC_ASSERT((is_same
::value)); Source src_; Sink sink_; }; // // Template name: combined_filter. // Description: Model of Device defined in terms of a Source/Sink pair. // Template paramters: // InputFilter - A model of InputFilter, with the same char_type as // OutputFilter. // OutputFilter - A model of OutputFilter, with the same char_type as // InputFilter. // template
class combined_filter { private: typedef typename category_of
::type in_category; typedef typename category_of
::type out_category; public: typedef typename char_type_of
::type char_type; struct category : multichar_bidirectional_filter_tag, closable_tag, localizable_tag { }; combined_filter(const InputFilter& in, const OutputFilter& out); template
std::streamsize read(Source& src, char_type* s, std::streamsize n) { return boost::iostreams::read(in_, src, s, n); } template
std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) { return boost::iostreams::write(out_, snk, s, n); } template
void close(Sink& snk, BOOST_IOS::openmode which) { if (which == BOOST_IOS::in) { if (is_convertible
::value) { iostreams::close(in_, snk, BOOST_IOS::in); } else { detail::close_all(in_, snk); } } if (which == BOOST_IOS::out) { if (is_convertible
::value) { iostreams::close(out_, snk, BOOST_IOS::out); } else { detail::close_all(out_, snk); } } } #ifndef BOOST_NO_STD_LOCALE void imbue(const std::locale& loc); #endif private: typedef typename char_type_of
::type output_char_type; BOOST_STATIC_ASSERT((is_same
::value)); InputFilter in_; OutputFilter out_; }; template
struct combination_traits : mpl::if_< is_device
, combined_device< typename wrapped_type
::type, typename wrapped_type
::type >, combined_filter< typename wrapped_type
::type, typename wrapped_type
::type > > { }; } // End namespace detail. template
struct combination : detail::combination_traits
::type { typedef typename detail::combination_traits
::type base_type; typedef typename detail::wrapped_type
::type in_type; typedef typename detail::wrapped_type
::type out_type; combination(const in_type& in, const out_type& out) : base_type(in, out) { } }; namespace detail { // Workaround for VC6 ETI bug. template
struct combine_traits { typedef combination< BOOST_DEDUCED_TYPENAME detail::unwrapped_type
::type, BOOST_DEDUCED_TYPENAME detail::unwrapped_type
::type > type; }; } // End namespace detail. // // Template name: combine. // Description: Takes a Source/Sink pair or InputFilter/OutputFilter pair and // returns a Reource or Filter which performs input using the first member // of the pair and output using the second member of the pair. // Template paramters: // In - A model of Source or InputFilter, with the same char_type as Out. // Out - A model of Sink or OutputFilter, with the same char_type as In. // template
typename detail::combine_traits
::type combine(const In& in, const Out& out) { typedef typename detail::combine_traits
::type return_type; return return_type(in, out); } //----------------------------------------------------------------------------// namespace detail { //--------------Implementation of combined_device-----------------------------// template
inline combined_device
::combined_device (const Source& src, const Sink& snk) : src_(src), sink_(snk) { } template
inline std::streamsize combined_device
::read(char_type* s, std::streamsize n) { return iostreams::read(src_, s, n); } template
inline std::streamsize combined_device
::write(const char_type* s, std::streamsize n) { return iostreams::write(sink_, s, n); } template
inline void combined_device
::close(BOOST_IOS::openmode which) { if (which == BOOST_IOS::in) detail::close_all(src_); if (which == BOOST_IOS::out) detail::close_all(sink_); } #ifndef BOOST_NO_STD_LOCALE template
void combined_device
::imbue(const std::locale& loc) { iostreams::imbue(src_, loc); iostreams::imbue(sink_, loc); } #endif //--------------Implementation of filter_pair---------------------------------// template
inline combined_filter
::combined_filter (const InputFilter& in, const OutputFilter& out) : in_(in), out_(out) { } #ifndef BOOST_NO_STD_LOCALE template
void combined_filter
::imbue (const std::locale& loc) { iostreams::imbue(in_, loc); iostreams::imbue(out_, loc); } #endif } // End namespace detail. } } // End namespaces iostreams, boost. #include
#endif // #ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED
combine.hpp
Page URL
File URL
Prev
7/37
Next
Download
( 8 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.