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
/*============================================================================= Copyright (c) 2002-2003 Joel de Guzman Copyright (c) 2002-2003 Hartmut Kaiser http://spirit.sourceforge.net/ 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) =============================================================================*/ #if !defined(BOOST_SPIRIT_TRAVERSE_HPP) #define BOOST_SPIRIT_TRAVERSE_HPP #include
namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // // Post-order traversal of auxilliary parsers. // /////////////////////////////////////////////////////////////////////////// struct post_order { // Return the parser type, which is generated as the result of the // traverse function below. template
struct result { typedef typename traverse_post_order_return< MetaT , ParserT , traverse_post_order_env<0, 0, 0, 0> >::type type; }; // Traverse a given parser and refactor it with the help of the given // MetaT metafunction template. template
static typename result
::type traverse(MetaT const &meta_, ParserT const &parser_) { typedef typename ParserT::parser_category_t parser_category_t; return impl::traverse_post_order
::generate( meta_, parser_, traverse_post_order_env<0, 0, 0, 0>()); } }; /////////////////////////////////////////////////////////////////////////// // // Transform policies // // The following policy classes could be used to assemble some new // transformation metafunction which uses identity transformations // for some parser_category type parsers. // /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // transform plain parsers template
struct plain_identity_policy { template
struct plain_result { // plain parsers should be embedded and returned correctly typedef typename ParserT::embed_t type; }; template
typename parser_traversal_plain_result
::type generate_plain(ParserT const &parser_, EnvT const& /*env*/) const { return parser_; } }; ////////////////////////////////// // transform unary parsers template
struct unary_identity_policy_return { typedef typename UnaryT::parser_generator_t parser_generator_t; typedef typename parser_generator_t ::template result
::type type; }; template
struct unary_identity_policy { template
struct unary_result { typedef typename unary_identity_policy_return
::type type; }; template
typename parser_traversal_unary_result< TransformT, UnaryT, SubjectT, EnvT>::type generate_unary( UnaryT const &, SubjectT const &subject_, EnvT const& /*env*/) const { typedef typename UnaryT::parser_generator_t parser_generator_t; return parser_generator_t::template generate
(subject_); } }; ////////////////////////////////// // transform action parsers template
struct action_identity_policy { template
struct action_result { typedef action
type; }; template
typename parser_traversal_action_result< TransformT, ActionT, SubjectT, EnvT >::type generate_action(ActionT const &action_, SubjectT const &subject_, EnvT const& /*env*/) const { return subject_[action_.predicate()]; } }; ////////////////////////////////// // transform binary parsers template
struct binary_identity_policy_return { typedef typename BinaryT::parser_generator_t parser_generator_t; typedef typename parser_generator_t ::template result
::type type; }; template
struct binary_identity_policy { template
struct binary_result { typedef typename binary_identity_policy_return
::type type; }; template
typename parser_traversal_binary_result< TransformT, BinaryT, LeftT, RightT, EnvT >::type generate_binary( BinaryT const &, LeftT const& left_ , RightT const& right_, EnvT const& /*env*/) const { typedef typename BinaryT::parser_generator_t parser_generator_t; return parser_generator_t:: template generate
(left_, right_); } }; /////////////////////////////////////////////////////////////////////////// // // transform_policies template // // The transform_policies template metafunction could serve as a // base class for new metafunctions to be passed to the traverse meta // template (see above), where only minimal parts have to be // overwritten. // /////////////////////////////////////////////////////////////////////////// template < typename TransformT, typename PlainPolicyT = plain_identity_policy
, typename UnaryPolicyT = unary_identity_policy
, typename ActionPolicyT = action_identity_policy
, typename BinaryPolicyT = binary_identity_policy
> struct transform_policies : public PlainPolicyT, public UnaryPolicyT, public ActionPolicyT, public BinaryPolicyT { }; /////////////////////////////////////////////////////////////////////////// // // Identity transformation // // The identity_transform metafunction supplied to the traverse // template will generate a new parser, which will be exactly // identical to the parser given as the parameter to the traverse // metafunction. I.e. the following conceptual 'equation' will be // always true: // // some_parser == // post_order::traverse(identity_transform(), some_parser) // /////////////////////////////////////////////////////////////////////////// struct identity_transform : transform_policies
{}; }} // namespace boost::spirit #endif // !defined(BOOST_SPIRIT_TRAVERSE_HPP)
traverse.hpp
Page URL
File URL
Prev
5/5 Next
Download
( 7 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.