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) 2001-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) =============================================================================*/ #ifndef BOOST_SPIRIT_CLOSURE_HPP #define BOOST_SPIRIT_CLOSURE_HPP /////////////////////////////////////////////////////////////////////////////// #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/////////////////////////////////////////////////////////////////////////////// // // Spirit predefined maximum closure limit. This limit defines the maximum // number of elements a closure can hold. This number defaults to 3. The // actual maximum is rounded up in multiples of 3. Thus, if this value // is 4, the actual limit is 6. The ultimate maximum limit in this // implementation is 15. // // It should NOT be greater than PHOENIX_LIMIT! // /////////////////////////////////////////////////////////////////////////////// #if !defined(BOOST_SPIRIT_CLOSURE_LIMIT) #define BOOST_SPIRIT_CLOSURE_LIMIT PHOENIX_LIMIT #endif /////////////////////////////////////////////////////////////////////////////// // // ensure BOOST_SPIRIT_CLOSURE_LIMIT <= PHOENIX_LIMIT and SPIRIT_CLOSURE_LIMIT <= 15 // /////////////////////////////////////////////////////////////////////////////// BOOST_STATIC_ASSERT(BOOST_SPIRIT_CLOSURE_LIMIT <= PHOENIX_LIMIT); BOOST_STATIC_ASSERT(BOOST_SPIRIT_CLOSURE_LIMIT <= 15); /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // // closure_context class // /////////////////////////////////////////////////////////////////////////// template
class closure_context : public parser_context_base { public: typedef typename phoenix::tuple_element<0, typename ClosureT::tuple_t>::type attr_t; typedef ClosureT base_t; typedef closure_context_linker
> context_linker_t; closure_context(ClosureT const& clos) : frame(clos) {} ~closure_context() {} template
void pre_parse(ParserT const&, ScannerT const&) {} template
ResultT& post_parse(ResultT& hit, ParserT const&, ScannerT const&) { hit.value(frame[phoenix::tuple_index<0>()]); return hit; } private: phoenix::closure_frame
frame; }; /////////////////////////////////////////////////////////////////////////// // // init_closure_context class // // The init_closure_context class is a special parser context type // which additionally initializes a closure contained in the derived // parser with values from a given tuple. Please note, that this // given tuple does not contain the required values directly, it // contains phoenix::actor objects. These actors have to be // dereferenced to gain the values to be used for initialization // (this is done by the help of the phoenix::convert_actors<> // template). // /////////////////////////////////////////////////////////////////////////// template
class init_closure_context : public parser_context_base { typedef typename ClosureT::tuple_t tuple_t; typedef typename ClosureT::closure_t closure_t; public: init_closure_context(ClosureT const& clos) : frame(clos.subject(), phoenix::convert_actors
(clos.init)) {} ~init_closure_context() {} template
void pre_parse(ParserT const& /*p*/, ScannerT const&) {} template
ResultT& post_parse(ResultT& hit, ParserT const&, ScannerT const&) { hit.value(frame[phoenix::tuple_index<0>()]); return hit; } private: phoenix::closure_frame
frame; }; /////////////////////////////////////////////////////////////////////////// // // init_closure_parser class // /////////////////////////////////////////////////////////////////////////// template
struct init_closure_parser : public unary
> > { typedef init_closure_parser
self_t; typedef unary
> base_t; typedef typename ParserT::phoenix_closure_t closure_t; typedef typename ParserT::tuple_t tuple_t; typedef typename phoenix::tuple_element<0, tuple_t>::type attr_t; template
struct result { typedef typename match_result
::type type; }; init_closure_parser(ParserT const& p, ActorTupleT const& init_) : base_t(p), init(init_) {} template
typename parser_result
::type parse_main(ScannerT const& scan) const { return this->subject().parse_main(scan); } template
typename parser_result
::type parse(ScannerT const& scan) const { typedef init_closure_context
init_context_t; typedef parser_scanner_linker
scanner_t; typedef closure_context_linker
context_t; typedef typename parser_result
::type result_t; BOOST_SPIRIT_CONTEXT_PARSE( scan, *this, scanner_t, context_t, result_t); } ActorTupleT init; }; /////////////////////////////////////////////////////////////////////////// // // closure class // /////////////////////////////////////////////////////////////////////////// template < typename DerivedT , typename T0 , typename T1 , typename T2 #if BOOST_SPIRIT_CLOSURE_LIMIT > 3 , typename T3 , typename T4 , typename T5 #if BOOST_SPIRIT_CLOSURE_LIMIT > 6 , typename T6 , typename T7 , typename T8 #if BOOST_SPIRIT_CLOSURE_LIMIT > 9 , typename T9 , typename T10 , typename T11 #if BOOST_SPIRIT_CLOSURE_LIMIT > 12 , typename T12 , typename T13 , typename T14 #endif #endif #endif #endif > struct closure : public phoenix::closure< T0, T1, T2 #if BOOST_SPIRIT_CLOSURE_LIMIT > 3 , T3, T4, T5 #if BOOST_SPIRIT_CLOSURE_LIMIT > 6 , T6, T7, T8 #if BOOST_SPIRIT_CLOSURE_LIMIT > 9 , T9, T10, T11 #if BOOST_SPIRIT_CLOSURE_LIMIT > 12 , T12, T13, T14 #endif #endif #endif #endif > { typedef phoenix::closure< T0, T1, T2 #if BOOST_SPIRIT_CLOSURE_LIMIT > 3 , T3, T4, T5 #if BOOST_SPIRIT_CLOSURE_LIMIT > 6 , T6, T7, T8 #if BOOST_SPIRIT_CLOSURE_LIMIT > 9 , T9, T10, T11 #if BOOST_SPIRIT_CLOSURE_LIMIT > 12 , T12, T13, T14 #endif #endif #endif #endif > phoenix_closure_t; typedef closure_context
context_t; template
struct aux { DerivedT2& aux_derived() { return *static_cast
(this); } DerivedT2 const& aux_derived() const { return *static_cast
(this); } // initialization functions template
init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type > > operator()(A const &a) const { typedef typename phoenix::as_actor
::type a_t; typedef phoenix::tuple
actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a) ) ); } template
init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()(A const &a, B const &b) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef phoenix::tuple
actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b) ) ); } template
init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()(A const &a, B const &b, C const &c) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef phoenix::tuple
actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c) ) ); } #if BOOST_SPIRIT_CLOSURE_LIMIT > 3 template < typename A, typename B, typename C, typename D > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c), phoenix::as_actor
::convert(d) ) ); } template < typename A, typename B, typename C, typename D, typename E > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d, E const &e ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef typename phoenix::as_actor
::type e_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t, e_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c), phoenix::as_actor
::convert(d), phoenix::as_actor
::convert(e) ) ); } template < typename A, typename B, typename C, typename D, typename E, typename F > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d, E const &e, F const &f ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef typename phoenix::as_actor
::type e_t; typedef typename phoenix::as_actor
::type f_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t, e_t, f_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c), phoenix::as_actor
::convert(d), phoenix::as_actor
::convert(e), phoenix::as_actor
::convert(f) ) ); } #if BOOST_SPIRIT_CLOSURE_LIMIT > 6 template < typename A, typename B, typename C, typename D, typename E, typename F, typename G > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d, E const &e, F const &f, G const &g ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef typename phoenix::as_actor
::type e_t; typedef typename phoenix::as_actor
::type f_t; typedef typename phoenix::as_actor
::type g_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t, e_t, f_t, g_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c), phoenix::as_actor
::convert(d), phoenix::as_actor
::convert(e), phoenix::as_actor
::convert(f), phoenix::as_actor
::convert(g) ) ); } template < typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d, E const &e, F const &f, G const &g, H const &h ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef typename phoenix::as_actor
::type e_t; typedef typename phoenix::as_actor
::type f_t; typedef typename phoenix::as_actor
::type g_t; typedef typename phoenix::as_actor
::type h_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c), phoenix::as_actor
::convert(d), phoenix::as_actor
::convert(e), phoenix::as_actor
::convert(f), phoenix::as_actor
::convert(g), phoenix::as_actor
::convert(h) ) ); } template < typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d, E const &e, F const &f, G const &g, H const &h, I const &i ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef typename phoenix::as_actor
::type e_t; typedef typename phoenix::as_actor
::type f_t; typedef typename phoenix::as_actor
::type g_t; typedef typename phoenix::as_actor
::type h_t; typedef typename phoenix::as_actor
::type i_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c), phoenix::as_actor
::convert(d), phoenix::as_actor
::convert(e), phoenix::as_actor
::convert(f), phoenix::as_actor
::convert(g), phoenix::as_actor
::convert(h), phoenix::as_actor
::convert(i) ) ); } #if BOOST_SPIRIT_CLOSURE_LIMIT > 9 template < typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d, E const &e, F const &f, G const &g, H const &h, I const &i, J const &j ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef typename phoenix::as_actor
::type e_t; typedef typename phoenix::as_actor
::type f_t; typedef typename phoenix::as_actor
::type g_t; typedef typename phoenix::as_actor
::type h_t; typedef typename phoenix::as_actor
::type i_t; typedef typename phoenix::as_actor
::type j_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor
::convert(c), phoenix::as_actor
::convert(d), phoenix::as_actor
::convert(e), phoenix::as_actor
::convert(f), phoenix::as_actor
::convert(g), phoenix::as_actor
::convert(h), phoenix::as_actor
::convert(i), phoenix::as_actor
::convert(j) ) ); } template < typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K > init_closure_parser< DerivedT2, phoenix::tuple< typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type, typename phoenix::as_actor
::type > > operator()( A const &a, B const &b, C const &c, D const &d, E const &e, F const &f, G const &g, H const &h, I const &i, J const &j, K const &k ) const { typedef typename phoenix::as_actor
::type a_t; typedef typename phoenix::as_actor
::type b_t; typedef typename phoenix::as_actor
::type c_t; typedef typename phoenix::as_actor
::type d_t; typedef typename phoenix::as_actor
::type e_t; typedef typename phoenix::as_actor
::type f_t; typedef typename phoenix::as_actor
::type g_t; typedef typename phoenix::as_actor
::type h_t; typedef typename phoenix::as_actor
::type i_t; typedef typename phoenix::as_actor
::type j_t; typedef typename phoenix::as_actor
::type k_t; typedef phoenix::tuple< a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t, k_t > actor_tuple_t; return init_closure_parser
( aux_derived(), actor_tuple_t( phoenix::as_actor
::convert(a), phoenix::as_actor
::convert(b), phoenix::as_actor