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) 2005-2006 João Abecasis Copyright (c) 2006-2007 Tobias Schwinger Use modification and distribution are 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_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED) #if !defined(BOOST_PP_IS_ITERATING) #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace fusion { namespace result_of { template
struct invoke; } template
inline typename result_of::invoke
::type invoke(Function, Sequence &); template
inline typename result_of::invoke
::type invoke(Function, Sequence const &); //----- ---- --- -- - - - - namespace detail { namespace ft = function_types; template< typename Function, class Sequence, int N = result_of::size
::value, bool CBI = ft::is_callable_builtin
::value, bool RandomAccess = traits::is_random_access
::value > struct invoke_impl; template
struct invoke_param_types; template
struct invoke_data_member; template
struct invoke_mem_fn; #define BOOST_PP_FILENAME_1
#define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_INVOKE_MAX_ARITY) #include BOOST_PP_ITERATE() template
struct invoke_nonmember_builtin // use same implementation as for function objects but... : invoke_impl< // ...work around boost::result_of bugs typename mpl::eval_if< ft::is_function
, boost::add_reference
, boost::remove_cv
>::type, Sequence, N, false, RandomAccess > { }; template
struct invoke_impl
: mpl::if_< ft::is_member_function_pointer
, invoke_mem_fn
, invoke_nonmember_builtin
>::type { }; template
struct invoke_impl
: mpl::eval_if< ft::is_member_pointer
, mpl::if_< ft::is_member_function_pointer
, invoke_mem_fn
, invoke_data_member
>, mpl::identity< invoke_nonmember_builtin< Function,Sequence,1,RandomAccess> > >::type { }; template
struct invoke_data_member< T C::*, Sequence > { private: typedef typename result_of::front
::type that; typedef mpl::or_< boost::is_convertible
, boost::is_convertible
, non_const_pointee
> non_const_cond; typedef typename mpl::eval_if< non_const_cond, mpl::identity
, add_const
>::type qualified_class; typedef typename mpl::eval_if< non_const_cond, mpl::identity
, add_const
>::type qualified_type; public: typedef typename boost::add_reference
::type result_type; static inline result_type call(T C::* f, Sequence & s) { typename result_of::front
::type c = fusion::front(s); return that_ptr
::get(c)->*f; } }; } namespace result_of { template
struct invoke { typedef typename detail::invoke_impl< typename boost::remove_reference
::type, Sequence >::result_type type; }; } template
inline typename result_of::invoke
::type invoke(Function f, Sequence & s) { return detail::invoke_impl< typename boost::remove_reference
::type,Sequence >::call(f,s); } template
inline typename result_of::invoke
::type invoke(Function f, Sequence const & s) { return detail::invoke_impl< typename boost::remove_reference
::type,Sequence const >::call(f,s); } }} #define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED #else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// // // Preprocessor vertical repetition code // /////////////////////////////////////////////////////////////////////////////// #define N BOOST_PP_ITERATION() template
struct invoke_impl
{ public: typedef typename boost::result_of< #define M(z,j,data) typename result_of::at_c
::type Function(BOOST_PP_ENUM(N,M,~)) >::type result_type; #undef M template
static inline result_type call(F & f, Sequence & s) { #define M(z,j,data) fusion::at_c
(s) return f( BOOST_PP_ENUM(N,M,~) ); } }; #if N > 0 template
struct invoke_mem_fn
{ public: typedef typename ft::result_type
::type result_type; template
static inline result_type call(F & f, Sequence & s) { return (that_ptr
>::type >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~)); } }; #endif #undef M #define M(z,j,data) \ typename seq::I##j i##j = \ fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j))); template
struct invoke_impl
{ private: typedef invoke_param_types
seq; public: typedef typename boost::result_of< Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T)) >::type result_type; template
static inline result_type call(F & f, Sequence & s) { #if N > 0 typename seq::I0 i0 = fusion::begin(s); BOOST_PP_REPEAT_FROM_TO(1,N,M,~) #endif return f( BOOST_PP_ENUM_PARAMS(N,*i) ); } }; #if N > 0 template
struct invoke_mem_fn
{ private: typedef invoke_param_types
seq; public: typedef typename ft::result_type
::type result_type; template
static inline result_type call(F & f, Sequence & s) { typename seq::I0 i0 = fusion::begin(s); BOOST_PP_REPEAT_FROM_TO(1,N,M,~) return (that_ptr< typename mpl::front< ft::parameter_types
>::type >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i)); } }; #endif #undef M template
struct invoke_param_types
{ #if N > 0 typedef typename result_of::begin
::type I0; typedef typename result_of::deref
::type T0; #define M(z,i,data) \ typedef typename result_of::next< \ BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \ typedef typename result_of::deref
::type T##i; BOOST_PP_REPEAT_FROM_TO(1,N,M,~) #undef M #endif }; #undef N #endif // defined(BOOST_PP_IS_ITERATING) #endif
invoke.hpp
Page URL
File URL
Prev 1/4
Next
Download
( 10 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.