DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
True Drop Box
FTP/SFTP Hosting
Group Account
Team Anywhere
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
|
Cloud-to-Cloud Backup
|
DVR/Camera Backup
FTP, Email & Web Service
FTP/SFTP Hosting
|
Email Hosting
|
Web Hosting
|
Webcam Hosting
Other Products & Services
Team Anywhere
|
Connect to Remote PC
|
Cloud Surveillance
|
Virtual CCTV NVR
Quick Links
Security and Privacy
Customer Support
Service Manual
Use Cases
Group Account
Online Help
Support Forum
Contact Us
About DriveHQ
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
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
Other Features
Team Anywhere (Remote Desktop Service)
CameraFTP Cloud Surveillance
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Team Anywhere for Windows (Beta)
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) 1998-2002 Joel de Guzman 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_SCANNER_HPP) #define BOOST_SPIRIT_SCANNER_HPP #include
#include
#include
#include
#include
// for boost::detail::iterator_traits #include
namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // // iteration_policy class // /////////////////////////////////////////////////////////////////////////// struct iteration_policy { template
void advance(ScannerT const& scan) const { ++scan.first; } template
bool at_end(ScannerT const& scan) const { return scan.first == scan.last; } template
T filter(T ch) const { return ch; } template
typename ScannerT::ref_t get(ScannerT const& scan) const { return *scan.first; } }; /////////////////////////////////////////////////////////////////////////// // // match_policy class // /////////////////////////////////////////////////////////////////////////// struct match_policy { template
struct result { typedef match
type; }; const match
no_match() const { return match
(); } const match
empty_match() const { return match
(0, nil_t()); } template
match
create_match( std::size_t length, AttrT const& val, IteratorT const& /*first*/, IteratorT const& /*last*/) const { return match
(length, val); } template
void group_match( MatchT& /*m*/, parser_id const& /*id*/, IteratorT const& /*first*/, IteratorT const& /*last*/) const {} template
void concat_match(Match1T& l, Match2T const& r) const { l.concat(r); } }; /////////////////////////////////////////////////////////////////////////// // // match_result class // /////////////////////////////////////////////////////////////////////////// template
struct match_result { typedef typename MatchPolicyT::template result
::type type; }; /////////////////////////////////////////////////////////////////////////// // // action_policy class // /////////////////////////////////////////////////////////////////////////// template
struct attributed_action_policy { template
static void call( ActorT const& actor, AttrT& val, IteratorT const&, IteratorT const&) { actor(val); } }; ////////////////////////////////// template <> struct attributed_action_policy
{ template
static void call( ActorT const& actor, nil_t, IteratorT const& first, IteratorT const& last) { actor(first, last); } }; ////////////////////////////////// struct action_policy { template
void do_action( ActorT const& actor, AttrT& val, IteratorT const& first, IteratorT const& last) const { attributed_action_policy
::call(actor, val, first, last); } }; /////////////////////////////////////////////////////////////////////////// // // scanner_policies class // /////////////////////////////////////////////////////////////////////////// template < typename IterationPolicyT, typename MatchPolicyT, typename ActionPolicyT> struct scanner_policies : public IterationPolicyT, public MatchPolicyT, public ActionPolicyT { typedef IterationPolicyT iteration_policy_t; typedef MatchPolicyT match_policy_t; typedef ActionPolicyT action_policy_t; scanner_policies( IterationPolicyT const& i_policy = IterationPolicyT(), MatchPolicyT const& m_policy = MatchPolicyT(), ActionPolicyT const& a_policy = ActionPolicyT()) : IterationPolicyT(i_policy) , MatchPolicyT(m_policy) , ActionPolicyT(a_policy) {} template
scanner_policies(ScannerPoliciesT const& policies) : IterationPolicyT(policies) , MatchPolicyT(policies) , ActionPolicyT(policies) {} }; /////////////////////////////////////////////////////////////////////////// // // scanner_policies_base class: the base class of all scanners // /////////////////////////////////////////////////////////////////////////// struct scanner_base {}; /////////////////////////////////////////////////////////////////////////// // // scanner class // /////////////////////////////////////////////////////////////////////////// template < typename IteratorT, typename PoliciesT> class scanner : public PoliciesT, public scanner_base { public: typedef IteratorT iterator_t; typedef PoliciesT policies_t; typedef typename boost::detail:: iterator_traits
::value_type value_t; typedef typename boost::detail:: iterator_traits
::reference ref_t; typedef typename boost:: call_traits
::param_type iter_param_t; scanner( IteratorT& first_, iter_param_t last_, PoliciesT const& policies = PoliciesT()) : PoliciesT(policies), first(first_), last(last_) { at_end(); } scanner(scanner const& other) : PoliciesT(other), first(other.first), last(other.last) {} scanner(scanner const& other, IteratorT& first_) : PoliciesT(other), first(first_), last(other.last) {} template
scanner(scanner
const& other) : PoliciesT(other), first(other.first), last(other.last) {} bool at_end() const { typedef typename PoliciesT::iteration_policy_t iteration_policy_t; return iteration_policy_t::at_end(*this); } value_t operator*() const { typedef typename PoliciesT::iteration_policy_t iteration_policy_t; return iteration_policy_t::filter(iteration_policy_t::get(*this)); } scanner const& operator++() const { typedef typename PoliciesT::iteration_policy_t iteration_policy_t; iteration_policy_t::advance(*this); return *this; } template
struct rebind_policies { typedef scanner
type; }; template
scanner
change_policies(PoliciesT2 const& policies) const { return scanner
(first, last, policies); } template
struct rebind_iterator { typedef scanner
type; }; template
scanner
change_iterator(IteratorT2 const& first_, IteratorT2 const &last_) const { return scanner
(first_, last_, *this); } IteratorT& first; IteratorT const last; private: scanner& operator=(scanner const& other); }; /////////////////////////////////////////////////////////////////////////// // // rebind_scanner_policies class // /////////////////////////////////////////////////////////////////////////// template
struct rebind_scanner_policies { typedef typename ScannerT::template rebind_policies
::type type; }; ////////////////////////////////// template
struct rebind_scanner_iterator { typedef typename ScannerT::template rebind_iterator
::type type; }; }} #endif
scanner.hpp
Page URL
File URL
Prev 1/4
Next
Download
( 9 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.