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
/*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library http://www.boost.org/ Copyright (c) 2001-2008 Hartmut Kaiser. 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) =============================================================================*/ #if !defined(TRANSFORM_ITERATOR_HPP_D492C659_88C7_4258_8C42_192F9AE80EC0_INCLUDED) #define TRANSFORM_ITERATOR_HPP_D492C659_88C7_4258_8C42_192F9AE80EC0_INCLUDED #include
#include
#if BOOST_ITERATOR_ADAPTORS_VERSION >= 0x0200 #include
#endif // BOOST_ITERATOR_ADAPTORS_VERSION >= 0x0200 #include
// this must occur after all of the includes and before any code appears #ifdef BOOST_HAS_ABI_HEADERS #include BOOST_ABI_PREFIX #endif /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { namespace impl { #if BOOST_ITERATOR_ADAPTORS_VERSION < 0x0200 /////////////////////////////////////////////////////////////////////////////// // // Transform Iterator Adaptor // // Upon deference, apply some unary function object and return the // result by reference. // // This class is adapted from the Boost.Iterator library, where a similar // class exists, which returns the next item by value // /////////////////////////////////////////////////////////////////////////////// template
struct ref_transform_iterator_policies : public boost::default_iterator_policies { ref_transform_iterator_policies() {} ref_transform_iterator_policies(const AdaptableUnaryFunctionT &f) : m_f(f) {} template
typename IteratorAdaptorT::reference dereference(const IteratorAdaptorT &iter) const { return m_f(*iter.base()); } AdaptableUnaryFunctionT m_f; }; template
class ref_transform_iterator_generator { typedef typename AdaptableUnaryFunctionT::result_type value_type; public: typedef boost::iterator_adaptor< IteratorT, ref_transform_iterator_policies
, value_type, value_type const &, value_type const *, std::input_iterator_tag> type; }; template
inline typename ref_transform_iterator_generator< AdaptableUnaryFunctionT, IteratorT>::type make_ref_transform_iterator( IteratorT base, const AdaptableUnaryFunctionT &f = AdaptableUnaryFunctionT()) { typedef typename ref_transform_iterator_generator< AdaptableUnaryFunctionT, IteratorT>::type result_t; return result_t(base, f); } // Retrieve the token value given a parse node // This is used in conjunction with the ref_transform_iterator above, to // get the token values while iterating directly over the parse tree. template
struct get_token_value { typedef TokenT result_type; TokenT const &operator()(ParseTreeNodeT const &node) const { BOOST_ASSERT(1 == std::distance(node.value.begin(), node.value.end())); return *node.value.begin(); } }; #else // BOOST_ITERATOR_ADAPTORS_VERSION < 0x0200 /////////////////////////////////////////////////////////////////////////////// // // The new Boost.Iterator library already conatins a transform_iterator usable // for our needs. The code below wraps this up. // /////////////////////////////////////////////////////////////////////////////// template
class ref_transform_iterator_generator { typedef typename AdaptableUnaryFunctionT::result_type return_type; typedef typename AdaptableUnaryFunctionT::argument_type argument_type; public: typedef boost::transform_iterator< return_type (*)(argument_type), IteratorT, return_type> type; }; template
inline typename ref_transform_iterator_generator< AdaptableUnaryFunctionT, IteratorT>::type make_ref_transform_iterator( IteratorT base, AdaptableUnaryFunctionT const &f) { typedef typename ref_transform_iterator_generator< AdaptableUnaryFunctionT, IteratorT>::type iterator_type; return iterator_type(base, f.transform); } // Retrieve the token value given a parse node // This is used in conjunction with the ref_transform_iterator above, to // get the token values while iterating directly over the parse tree. template
struct get_token_value { typedef TokenT const &result_type; typedef ParseTreeNodeT const &argument_type; static result_type transform (argument_type node) { BOOST_ASSERT(1 == std::distance(node.value.begin(), node.value.end())); return *node.value.begin(); } }; #endif // BOOST_ITERATOR_ADAPTORS_VERSION < 0x0200 /////////////////////////////////////////////////////////////////////////////// } // namespace impl } // namespace wave } // namespace boost // the suffix header occurs after all of the code #ifdef BOOST_HAS_ABI_HEADERS #include BOOST_ABI_SUFFIX #endif #endif // !defined(TRANSFORM_ITERATOR_HPP_D492C659_88C7_4258_8C42_192F9AE80EC0_INCLUDED)
transform_iterator.hpp
Page URL
File URL
Prev
18/19
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.