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
/////////////////////////////////////////////////////////////////////////////// // matchable.hpp // // Copyright 2007 Eric Niebler. 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) #ifndef BOOST_XPRESSIVE_DETAIL_DYNAMIC_MATCHABLE_HPP_EAN_10_04_2005 #define BOOST_XPRESSIVE_DETAIL_DYNAMIC_MATCHABLE_HPP_EAN_10_04_2005 // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace xpressive { namespace detail { ////////////////////////////////////////////////////////////////////////// // quant_spec struct quant_spec { unsigned int min_; unsigned int max_; bool greedy_; std::size_t *hidden_mark_count_; }; /////////////////////////////////////////////////////////////////////////////// // matchable template
struct matchable { typedef BidiIter iterator_type; typedef typename iterator_value
::type char_type; virtual ~matchable() {} virtual bool match(match_state
&state) const = 0; }; /////////////////////////////////////////////////////////////////////////////// // matchable_ex template
struct matchable_ex : matchable
, counted_base
> { typedef BidiIter iterator_type; typedef typename iterator_value
::type char_type; virtual void link(xpression_linker
&) const { } virtual void peek(xpression_peeker
&peeker) const { peeker.fail(); } virtual void repeat(quant_spec const &, sequence
&) const { boost::throw_exception( regex_error(regex_constants::error_badrepeat, "expression cannot be quantified") ); } /////////////////////////////////////////////////////////////////////////////////////////////// // The following 4 functions (push_match, top_match, pop_match and skip_match) are // used to implement looping and branching across the matchers. Call push_match to record // a position. Then, another matcher further down the xpression chain has the // option to call either top_match, pop_match or skip_match. top_match and pop_match will // jump back to the place recorded by push_match, whereas skip_match will skip the jump and // pass execution down the xpression chain. top_match will leave the xpression on top of the // stack, whereas pop_match will remove it. Each function comes in 2 flavors: one for // statically bound xpressions and one for dynamically bound xpressions. // template
bool push_match(match_state
&state) const { BOOST_MPL_ASSERT((is_same
>)); return this->match(state); } static bool top_match(match_state
&state, void const *top) { return static_cast
const *>(top)->match(state); } static bool pop_match(match_state
&state, void const *top) { return static_cast
const *>(top)->match(state); } bool skip_match(match_state
&state) const { return this->match(state); } }; /////////////////////////////////////////////////////////////////////////////// // shared_matchable template
struct shared_matchable { typedef BidiIter iterator_type; typedef typename iterator_value
::type char_type; typedef intrusive_ptr
const> matchable_ptr; BOOST_STATIC_CONSTANT(std::size_t, width = unknown_width::value); BOOST_STATIC_CONSTANT(bool, pure = false); shared_matchable(matchable_ptr const &xpr = matchable_ptr()) : xpr_(xpr) { } bool operator !() const { return !this->xpr_; } friend bool operator ==(shared_matchable
const &left, shared_matchable
const &right) { return left.xpr_ == right.xpr_; } friend bool operator !=(shared_matchable
const &left, shared_matchable
const &right) { return left.xpr_ != right.xpr_; } matchable_ptr const &matchable() const { return this->xpr_; } bool match(match_state
&state) const { return this->xpr_->match(state); } void link(xpression_linker
&linker) const { this->xpr_->link(linker); } void peek(xpression_peeker
&peeker) const { this->xpr_->peek(peeker); } // BUGBUG yuk! template
bool push_match(match_state
&state) const { BOOST_MPL_ASSERT((is_same
>)); return this->match(state); } private: matchable_ptr xpr_; }; }}} // namespace boost::xpressive::detail #endif
matchable.hpp
Page URL
File URL
Prev
2/7
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.