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
/////////////////////////////////////////////////////////////////////////////// // sequence.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_SEQUENCE_HPP_EAN_04_10_2006 #define BOOST_XPRESSIVE_DETAIL_DYNAMIC_SEQUENCE_HPP_EAN_04_10_2006 // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
#include
#include
#include
namespace boost { namespace xpressive { namespace detail { /////////////////////////////////////////////////////////////////////////////// // sequence template
struct sequence { sequence() : pure_(true) , width_(0) , quant_(quant_none) , head_() , tail_(0) , alt_end_xpr_() , alternates_(0) { } template
sequence(intrusive_ptr
> const &xpr) : pure_(Matcher::pure) , width_(xpr->Matcher::get_width()) , quant_(static_cast
(Matcher::quant)) , head_(xpr) , tail_(&xpr->next_) , alt_end_xpr_() , alternates_(0) { } template
sequence(intrusive_ptr
, Traits>, BidiIter> > const &xpr) : pure_(true) , width_(0) , quant_(quant_none) , head_(xpr) , tail_(&xpr->next_) , alt_end_xpr_() , alternates_(&xpr->alternates_) { } bool empty() const { return !this->head_; } sequence
&operator +=(sequence
const &that) { if(this->empty()) { *this = that; } else if(!that.empty()) { *this->tail_ = that.head_; this->tail_ = that.tail_; // keep track of sequence width and purity this->width_ += that.width_; this->pure_ = this->pure_ && that.pure_; this->set_quant_(); } return *this; } sequence
&operator |=(sequence
that) { BOOST_ASSERT(!this->empty()); BOOST_ASSERT(0 != this->alternates_); // Keep track of width and purity if(this->alternates_->empty()) { this->width_ = that.width_; this->pure_ = that.pure_; } else { this->width_ |= that.width_; this->pure_ = this->pure_ && that.pure_; } // through the wonders of reference counting, all alternates_ can share an end_alternate if(!this->alt_end_xpr_) { this->alt_end_xpr_ = new alt_end_xpr_type; } // terminate each alternate with an alternate_end_matcher that += sequence(this->alt_end_xpr_); this->alternates_->push_back(that.head_); this->set_quant_(); return *this; } void repeat(quant_spec const &spec) { this->xpr().matchable()->repeat(spec, *this); } shared_matchable
const &xpr() const { return this->head_; } detail::width width() const { return this->width_; } bool pure() const { return this->pure_; } quant_enum quant() const { return this->quant_; } private: typedef dynamic_xpression
alt_end_xpr_type; void set_quant_() { this->quant_ = (!is_unknown(this->width_) && this->pure_) ? (!this->width_ ? quant_none : quant_fixed_width) : quant_variable_width; } bool pure_; detail::width width_; quant_enum quant_; shared_matchable
head_; shared_matchable
*tail_; intrusive_ptr
alt_end_xpr_; alternates_vector
*alternates_; }; template
inline sequence
operator +(sequence
left, sequence
const &right) { return left += right; } template
inline sequence
operator |(sequence
left, sequence
const &right) { return left |= right; } }}} // namespace boost::xpressive::detail #endif
sequence.hpp
Page URL
File URL
Prev
7/7 Next
Download
( 4 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.