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_COMPOSITE_HPP) #define BOOST_SPIRIT_COMPOSITE_HPP /////////////////////////////////////////////////////////////////////////////// #include
/////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // // unary class. // // Composite class composed of a single subject. This template class // is parameterized by the subject type S and a base class to // inherit from, BaseT. The unary class is meant to be a base class // to inherit from. The inheritance structure, given the BaseT // template parameter places the unary class in the middle of a // linear, single parent hierarchy. For instance, given a class S // and a base class B, a class D can derive from unary: // // struct D : public unary
{...}; // // The inheritance structure is thus: // // B // | // unary (has S) // | // D // // The subject can be accessed from the derived class D as: // this->subject(); // // Typically, the subject S is specified as typename S::embed_t. // embed_t specifies how the subject is embedded in the composite // (See parser.hpp for details). // /////////////////////////////////////////////////////////////////////////// template
class unary : public BaseT { public: typedef BaseT base_t; typedef typename boost::call_traits
::param_type param_t; typedef typename boost::call_traits
::const_reference return_t; typedef S subject_t; typedef typename S::embed_t subject_embed_t; unary(param_t subj_) : base_t(), subj(subj_) {} unary(BaseT const& base, param_t subj_) : base_t(base), subj(subj_) {} return_t subject() const { return subj; } private: subject_embed_t subj; }; /////////////////////////////////////////////////////////////////////////// // // binary class. // // Composite class composed of a pair (left and right). This // template class is parameterized by the left and right subject // types A and B and a base class to inherit from, BaseT. The binary // class is meant to be a base class to inherit from. The // inheritance structure, given the BaseT template parameter places // the binary class in the middle of a linear, single parent // hierarchy. For instance, given classes X and Y and a base class // B, a class D can derive from binary: // // struct D : public binary
{...}; // // The inheritance structure is thus: // // B // | // binary (has X and Y) // | // D // // The left and right subjects can be accessed from the derived // class D as: this->left(); and this->right(); // // Typically, the pairs X and Y are specified as typename X::embed_t // and typename Y::embed_t. embed_t specifies how the subject is // embedded in the composite (See parser.hpp for details). // /////////////////////////////////////////////////////////////////////////////// template
class binary : public BaseT { public: typedef BaseT base_t; typedef typename boost::call_traits
::param_type left_param_t; typedef typename boost::call_traits
::const_reference left_return_t; typedef typename boost::call_traits
::param_type right_param_t; typedef typename boost::call_traits
::const_reference right_return_t; typedef A left_t; typedef typename A::embed_t left_embed_t; typedef B right_t; typedef typename B::embed_t right_embed_t; binary(left_param_t a, right_param_t b) : base_t(), subj(a, b) {} left_return_t left() const { return subj.first(); } right_return_t right() const { return subj.second(); } private: boost::compressed_pair
subj; }; }} // namespace boost::spirit #endif
composite.hpp
Page URL
File URL
Prev
3/17
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.