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) 2003 Daniel Wallin and Arvid Norberg // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE // OR OTHER DEALINGS IN THE SOFTWARE. #if !BOOST_PP_IS_ITERATING #ifndef LUABIND_CALL_HPP_INCLUDED #define LUABIND_CALL_HPP_INCLUDED #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define LUABIND_DECL(z, n, off) \ typedef typename find_conversion_policy< \ n + off \ , Policies \ >::type BOOST_PP_CAT(converter_policy,n); \ \ typename mpl::apply_wrap2< \ BOOST_PP_CAT(converter_policy,n), BOOST_PP_CAT(A,n), lua_to_cpp \ >::type BOOST_PP_CAT(c,n); #define LUABIND_ADD_INDEX(z,n,text) \ + BOOST_PP_CAT(converter_policy,n)::has_arg #define LUABIND_INDEX_MAP(z,n,text) \ text BOOST_PP_REPEAT(n, LUABIND_ADD_INDEX, _) #define LUABIND_PARAMS(z,n,text) \ BOOST_PP_CAT(c,n).apply( \ L \ , LUABIND_DECORATE_TYPE(A##n) \ , LUABIND_INDEX_MAP(_,n,text) \ ) #define LUABIND_POSTCALL(z,n,text) \ BOOST_PP_CAT(c,n).converter_postcall( \ L \ , LUABIND_DECORATE_TYPE(A##n) \ , LUABIND_INDEX_MAP(_,n,text) \ ); namespace luabind { namespace detail { namespace mpl = boost::mpl; template
struct maybe_yield { static inline int apply(lua_State* L, int nret) { return ret(L, nret, boost::mpl::bool_
::value>()); } static inline int ret(lua_State* L, int nret, boost::mpl::bool_
) { return lua_yield(L, nret); } static inline int ret(lua_State*, int nret, boost::mpl::bool_
) { return nret; } }; template
struct returns { #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY,
, 1)) #include BOOST_PP_ITERATE() }; template<> struct returns
{ #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY,
, 2)) #include BOOST_PP_ITERATE() }; #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY,
, 3)) #include BOOST_PP_ITERATE() }} #undef LUABIND_DECL #undef LUABIND_PARAMS #undef LUABIND_POSTCALL #undef LUABIND_ADD_INDEX #undef LUABIND_INDEX_MAP #endif // LUABIND_CALL_HPP_INCLUDED #elif BOOST_PP_ITERATION_FLAGS() == 1 template< class C , class WrappedClass , class Policies BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > static int call( T(C::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) , WrappedClass* , lua_State* L , Policies const*) { int nargs = lua_gettop(L); typedef typename most_derived
::type self_type; pointer_converter
self_cv; typedef typename find_conversion_policy<0, Policies>::type converter_policy_ret; typename mpl::apply_wrap2
::type converter_ret; BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, 2) converter_ret.apply( L , (self_cv.apply(L, LUABIND_DECORATE_TYPE(self_type*), 1)->*f) ( BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAMS, 2) )); BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_POSTCALL, 2) int nret = lua_gettop(L) - nargs; const int indices[] = { nargs + nret // result , 1 // self BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), LUABIND_INDEX_MAP, 2) }; policy_list_postcall
::apply(L, indices); return maybe_yield
::apply(L, nret); } template< class C , class WrappedClass , class Policies BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > static int call( T(C::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) const , WrappedClass* , lua_State* L , Policies const*) { int nargs = lua_gettop(L); typedef typename most_derived
::type self_type; const_pointer_converter
self_cv; typedef typename find_conversion_policy<0, Policies>::type converter_policy_ret; typename mpl::apply_wrap2
::type converter_ret; BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, 2) converter_ret.apply( L , (self_cv.apply(L, LUABIND_DECORATE_TYPE(self_type const*), 1)->*f) ( BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAMS, 2) )); BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_POSTCALL, 2) int nret = lua_gettop(L) - nargs; const int indices[] = { nargs + nret // result , 1 // self BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), LUABIND_INDEX_MAP, 2) }; policy_list_postcall
::apply(L, indices); return maybe_yield
::apply(L, nret); } template< class WrappedClass , class Policies BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > static int call( T(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) , WrappedClass* , lua_State* L , Policies const*) { int nargs = lua_gettop(L); typedef typename find_conversion_policy<0, Policies>::type converter_policy_ret; typename mpl::apply_wrap2
::type converter_ret; BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, 1) converter_ret.apply(L, f ( BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAMS, 1) )); BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_POSTCALL, 1) int nret = lua_gettop(L) - nargs; const int indices[] = { nargs + nret // result BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), LUABIND_INDEX_MAP, 1) }; policy_list_postcall
::apply(L, indices); return maybe_yield
::apply(L, nret); } #elif BOOST_PP_ITERATION_FLAGS() == 2 template< class C , class WrappedClass , class Policies BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > static int call( void(C::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) , WrappedClass* , lua_State* L , Policies* const) { int nargs = lua_gettop(L); L = L; // L is used, but metrowerks compiler seem to warn about it before expanding the macros typedef typename most_derived
::type self_type; pointer_converter
self_cv; BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, 2) (self_cv.apply(L, LUABIND_DECORATE_TYPE(self_type*), 1)->*f) ( BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAMS, 2) ); BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_POSTCALL, 2) int nret = lua_gettop(L) - nargs; const int indices[] = { nargs + nret // result , 1 // self BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), LUABIND_INDEX_MAP, 2) }; policy_list_postcall
::apply(L, indices); return maybe_yield
::apply(L, nret); } template< class C , class WrappedClass , class Policies BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > static int call( void(C::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) const , WrappedClass* , lua_State* L , Policies const*) { int nargs = lua_gettop(L); L = L; // L is used, but metrowerks compiler seem to warn about it before expanding the macros typedef typename most_derived
::type self_type; const_pointer_converter
self_cv; BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, 2) (self_cv.apply(L, LUABIND_DECORATE_TYPE(self_type const*), 1)->*f) ( BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAMS, 2) ); BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_POSTCALL, 2) int nret = lua_gettop(L) - nargs; const int indices[] = { nargs + nret // result , 1 // self BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), LUABIND_INDEX_MAP, 2) }; policy_list_postcall
::apply(L, indices); return maybe_yield
::apply(L, nret); } template< class WrappedClass , class Policies BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > static int call( void(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) , WrappedClass* , lua_State* L , Policies const*) { int nargs = lua_gettop(L); L = L; // L is used, but metrowerks compiler seem to warn about it before expanding the macros BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, 1) f( BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAMS, 1) ); int nret = lua_gettop(L) - nargs; const int indices[] = { nargs + nret /* result */ BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), LUABIND_INDEX_MAP, 1) }; BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_POSTCALL, 1) policy_list_postcall
::apply(L, indices); return maybe_yield
::apply(L, nret); } #elif BOOST_PP_ITERATION_FLAGS() == 3 template< class WrappedClass , class Policies , class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > int call( R(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) , WrappedClass* , lua_State* L , Policies const*) { return returns
::call(f, (WrappedClass*)0, L, (Policies*)0); } template< class T , class WrappedClass , class Policies , class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > int call( R(T::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) , WrappedClass* , lua_State* L , Policies const*) { return returns
::call(f, (WrappedClass*)0, L, (Policies*)0); } template< class T , class WrappedClass , class Policies , class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A) > int call( R(T::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) const , WrappedClass* , lua_State* L , Policies const*) { return returns
::call(f, (WrappedClass*)0, L, (Policies*)0); } #endif
call.hpp
Page URL
File URL
Prev
2/43
Next
Download
( 11 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.