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
/////////////////////////////////////////////////////////////////////////////// // static.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_STATIC_STATIC_HPP_EAN_10_04_2005 #define BOOST_XPRESSIVE_DETAIL_STATIC_STATIC_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
// Random thoughts: // - must support indirect repeat counts {$n,$m} // - add ws to eat whitespace (make *ws illegal) // - a{n,m} -> repeat
(a) // - a{$n,$m} -> repeat(n,m)(a) // - add nil to match nothing // - instead of s1, s2, etc., how about s[1], s[2], etc.? Needlessly verbose? namespace boost { namespace xpressive { namespace detail { /////////////////////////////////////////////////////////////////////////////// // stacked_xpression // template
struct stacked_xpression : Next { // match // delegates to Next template
bool match(match_state
&state) const { return static_cast
(this)-> BOOST_NESTED_TEMPLATE push_match
(state); } // top_match // jump back to the xpression on top of the xpression stack, // and keep the xpression on the stack. template
static bool top_match(match_state
&state, void const *top) { return static_cast
(top)-> BOOST_NESTED_TEMPLATE push_match
(state); } // pop_match // jump back to the xpression on top of the xpression stack, // pop the xpression off the stack. template
static bool pop_match(match_state
&state, void const *top) { return static_cast
(top)->match(state); } // skip_match // pop the xpression off the top of the stack and ignore it; call // match on next. template
bool skip_match(match_state
&state) const { // could be static_xpression::skip_impl or stacked_xpression::skip_impl // depending on if there is 1 or more than 1 xpression on the // xpression stack return Top::skip_impl(*static_cast
(this), state); } //protected: // skip_impl // implementation of skip_match. template
static bool skip_impl(That const &that, match_state
&state) { return that.BOOST_NESTED_TEMPLATE push_match
(state); } }; /////////////////////////////////////////////////////////////////////////////// // stacked_xpression_cast // template
inline stacked_xpression
const &stacked_xpression_cast(Next const &next) { // NOTE: this is a little white lie. The "next" object doesn't really have // the type to which we're casting it. It is harmless, though. We are only using // the cast to decorate the next object with type information. It is done // this way to save stack space. BOOST_MPL_ASSERT_RELATION(sizeof(stacked_xpression
), ==, sizeof(Next)); return *static_cast
const *>(&next); } /////////////////////////////////////////////////////////////////////////////// // static_xpression // template
struct static_xpression : Matcher { Next next_; BOOST_STATIC_CONSTANT(bool, pure = Matcher::pure && Next::pure); BOOST_STATIC_CONSTANT( std::size_t , width = Matcher::width != unknown_width::value && Next::width != unknown_width::value ? Matcher::width + Next::width : unknown_width::value ); static_xpression(Matcher const &matcher = Matcher(), Next const &next = Next()) : Matcher(matcher) , next_(next) { } // match // delegates to the Matcher template
bool match(match_state
&state) const { return this->Matcher::match(state, this->next_); } // push_match // call match on this, but also push "Top" onto the xpression // stack so we know what we are jumping back to later. template
bool push_match(match_state
&state) const { return this->Matcher::match(state, stacked_xpression_cast
(this->next_)); } // skip_impl // implementation of skip_match, called from stacked_xpression::skip_match template
static bool skip_impl(That const &that, match_state
&state) { return that.match(state); } // for linking a compiled regular xpression template
void link(xpression_linker
&linker) const { linker.accept(*static_cast
(this), &this->next_); this->next_.link(linker); } // for building a lead-follow template
void peek(xpression_peeker
&peeker) const { this->peek_next_(peeker.accept(*static_cast
(this)), peeker); } // for getting xpression width detail::width get_width() const { return this->get_width_(mpl::size_t
()); } private: static_xpression &operator =(static_xpression const &); template
void peek_next_(mpl::true_, xpression_peeker
&peeker) const { this->next_.peek(peeker); } template
void peek_next_(mpl::false_, xpression_peeker
&) const { // no-op } template
detail::width get_width_(mpl::size_t
) const { return Width; } detail::width get_width_(unknown_width) const { // Should only be called in contexts where the width is // known to be fixed. return this->Matcher::get_width() + this->next_.get_width(); } }; /////////////////////////////////////////////////////////////////////////////// // make_static // template
inline static_xpression
const make_static(Matcher const &matcher) { return static_xpression
(matcher); } template
inline static_xpression
const make_static(Matcher const &matcher, Next const &next) { return static_xpression
(matcher, next); } /////////////////////////////////////////////////////////////////////////////// // no_next // struct no_next { BOOST_STATIC_CONSTANT(std::size_t, width = 0); BOOST_STATIC_CONSTANT(bool, pure = true); template
void link(xpression_linker
&) const { } template
void peek(xpression_peeker
&peeker) const { peeker.fail(); } detail::width get_width() const { return 0; } }; /////////////////////////////////////////////////////////////////////////////// // get_mark_number // inline int get_mark_number(basic_mark_tag const &mark) { return proto::arg(mark).mark_number_; } }}} // namespace boost::xpressive::detail #endif
static.hpp
Page URL
File URL
Prev
6/10
Next
Download
( 7 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.