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) 1998-2003 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_MATCH_HPP) #define BOOST_SPIRIT_MATCH_HPP #include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // // match class // // The match holds the result of a parser. A match object evaluates // to true when a successful match is found, otherwise false. The // length of the match is the number of characters (or tokens) that // is successfully matched. This can be queried through its length() // member function. A negative value means that the match is // unsucessful. // // Each parser may have an associated attribute. This attribute is // also returned back to the client on a successful parse through // the match object. The match's value() member function returns the // match's attribute. // // A match attribute is valid: // // * on a successful match // * when its value is set through the value(val) member function // * if it is assigned or copied from a compatible match object // (e.g. match
from match
) with a valid attribute. // // The match attribute is undefined: // // * on an unsuccessful match // * when an attempt to copy or assign from another match object // with an incompatible attribute type (e.g. match
// from match
). // // The member function has_valid_attribute() can be queried to know if // it is safe to get the match's attribute. The attribute may be set // through the member function value(v) where v is the new attribute // value. // /////////////////////////////////////////////////////////////////////////// template
class match : public safe_bool
> { public: typedef typename boost::optional
optional_type; typedef typename optional_type::argument_type ctor_param_t; typedef typename optional_type::reference_const_type return_t; typedef T attr_t; match(); explicit match(std::size_t length); match(std::size_t length, ctor_param_t val); bool operator!() const; std::ptrdiff_t length() const; bool has_valid_attribute() const; return_t value() const; void swap(match& other); template
match(match
const& other) : len(other.length()), val() { impl::match_attr_traits
::copy(val, other); } template
match& operator=(match
const& other) { impl::match_attr_traits
::assign(val, other); len = other.length(); return *this; } template
void concat(MatchT const& other) { BOOST_SPIRIT_ASSERT(*this && other); len += other.length(); } template
void value(ValueT const& val_) { impl::match_attr_traits
::set_value(val, val_, is_reference
()); } bool operator_bool() const { return len >= 0; } private: std::ptrdiff_t len; optional_type val; }; /////////////////////////////////////////////////////////////////////////// // // match class specialization for nil_t values // /////////////////////////////////////////////////////////////////////////// template <> class match
: public safe_bool
> { public: typedef nil_t attr_t; typedef nil_t return_t; match(); explicit match(std::size_t length); match(std::size_t length, nil_t); bool operator!() const; bool has_valid_attribute() const; std::ptrdiff_t length() const; nil_t value() const; void value(nil_t); void swap(match& other); template
match(match
const& other) : len(other.length()) {} template
match<>& operator=(match
const& other) { len = other.length(); return *this; } template
void concat(match
const& other) { BOOST_SPIRIT_ASSERT(*this && other); len += other.length(); } bool operator_bool() const { return len >= 0; } private: std::ptrdiff_t len; }; }} // namespace boost::spirit #endif #include
match.hpp
Page URL
File URL
Prev
3/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.