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
#ifndef BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP #define BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_from_base64.hpp // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to 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 for updates, documentation, and revision history. #include
#include
// for BOOST_DEDUCED_TYPENAME #include
#include
#include
//#include
//#if ! BOOST_WORKAROUND(BOOST_MSVC, <=1300) // here is the default standard implementation of the functor used // by the filter iterator to remove spaces. Unfortunately usage // of this implementation in combination with spirit trips a bug // VC 6.5. The only way I can find to work around it is to // implement a special non-standard version for this platform #ifndef BOOST_NO_CWCTYPE #include
// iswspace #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::iswspace; } #endif #endif #include
// isspace #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::isspace; } #endif #if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) // this is required for the RW STL on Linux and Tru64. #undef isspace #undef iswspace #endif //#endif // BOOST_WORKAROUND namespace { // anonymous template
struct remove_whitespace_predicate; template<> struct remove_whitespace_predicate
{ bool operator()(unsigned char t){ return ! std::isspace(t); } }; #ifndef BOOST_NO_CWCHAR template<> struct remove_whitespace_predicate
{ bool operator()(wchar_t t){ return ! std::iswspace(t); } }; #endif } // namespace anonymous /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // convert base64 file data (including whitespace and padding) to binary namespace boost { namespace archive { namespace iterators { // custom version of filter iterator which doesn't look ahead further than // necessary template
class filter_iterator : public boost::iterator_adaptor< filter_iterator
, Base, use_default, single_pass_traversal_tag > { friend class boost::iterator_core_access; typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< filter_iterator
, Base, use_default, single_pass_traversal_tag > super_t; typedef filter_iterator
this_t; typedef BOOST_DEDUCED_TYPENAME super_t::reference reference_type; reference_type dereference_impl(){ if(! m_full){ while(! m_predicate(* this->base_reference())) ++(this->base_reference()); m_full = true; } return * this->base_reference(); } reference_type dereference() const { return const_cast
(this)->dereference_impl(); } Predicate m_predicate; bool m_full; public: // note: this function is public only because comeau compiler complained // I don't know if this is because the compiler is wrong or what void increment(){ m_full = false; ++(this->base_reference()); } filter_iterator(Base start) : super_t(start), m_full(false) {} filter_iterator(){} }; template
class remove_whitespace : public filter_iterator< remove_whitespace_predicate
, Base > { friend class boost::iterator_core_access; typedef filter_iterator< remove_whitespace_predicate
, Base > super_t; public: // remove_whitespace(){} // why is this needed? // make composible buy using templated constructor template
remove_whitespace(BOOST_PFTO_WRAPPER(T) start) : super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast
(start)))) {} // intel 7.1 doesn't like default copy constructor remove_whitespace(const remove_whitespace & rhs) : super_t(rhs.base_reference()) {} }; } // namespace iterators } // namespace archive } // namespace boost #endif // BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP
remove_whitespace.hpp
Page URL
File URL
Prev
12/18
Next
Download
( 4 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.