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_WRAPPER_BASE_HPP_INCLUDED #define LUABIND_WRAPPER_BASE_HPP_INCLUDED #include
#include
#include
#include
#include
#include
namespace luabind { namespace detail { struct wrap_access; // implements the selection between dynamic dispatch // or default implementation calls from within a virtual // function wrapper. The input is the self reference on // the top of the stack. Output is the function to call // on the top of the stack (the input self reference will // be popped) LUABIND_API void do_call_member_selection(lua_State* L, char const* name); } struct wrapped_self_t: weak_ref { detail::lua_reference m_strong_ref; }; struct wrap_base { friend struct detail::wrap_access; wrap_base() {} #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY,
, 1)) #include BOOST_PP_ITERATE() private: wrapped_self_t m_self; }; #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY,
, 2)) #include BOOST_PP_ITERATE() namespace detail { struct wrap_access { static wrapped_self_t const& ref(wrap_base const& b) { return b.m_self; } static wrapped_self_t& ref(wrap_base& b) { return b.m_self; } }; } } #endif // LUABIND_WRAPPER_BASE_HPP_INCLUDED #elif BOOST_PP_ITERATION_FLAGS() == 1 #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n template
typename boost::mpl::if_
, luabind::detail::proxy_member_void_caller
> , luabind::detail::proxy_member_caller
> >::type call(char const* name BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _), detail::type_
* = 0) const { typedef boost::tuples::tuple
tuple_t; #if BOOST_PP_ITERATION() == 0 tuple_t args; #else tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); #endif typedef typename boost::mpl::if_
, luabind::detail::proxy_member_void_caller
> , luabind::detail::proxy_member_caller
> >::type proxy_type; // this will be cleaned up by the proxy object // once the call has been made // TODO: what happens if this virtual function is // dispatched from a lua thread where the state // pointer is different? // get the function lua_State* L = m_self.state(); m_self.get(L); assert(!lua_isnil(L, -1)); detail::do_call_member_selection(L, name); // push the self reference as the first parameter m_self.get(L); // now the function and self objects // are on the stack. These will both // be popped by pcall return proxy_type(L, args); } #undef LUABIND_CALL_MEMBER_NAME #undef LUABIND_OPERATOR_PARAMS #undef LUABIND_TUPLE_PARAMS #else // free call_member forwardarding functions #define N BOOST_PP_ITERATION() #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n template< class R BOOST_PP_ENUM_TRAILING_PARAMS(N, class A) > typename boost::mpl::if_< boost::is_void
, detail::proxy_member_void_caller< boost::tuples::tuple< BOOST_PP_ENUM(N, LUABIND_TUPLE_PARAMS, _) > > , detail::proxy_member_caller< R , boost::tuples::tuple< BOOST_PP_ENUM(N, LUABIND_TUPLE_PARAMS, _) > > >::type call_member( wrap_base const* self , char const* fn BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(N, A, &a) , detail::type_
* = 0 ) { return self->call( fn BOOST_PP_ENUM_TRAILING_PARAMS(N, a) , (detail::type_
*)0 ); } #undef LUABIND_OPERATOR_PARAMS #undef LUABIND_TUPLE_PARAMS #undef N #endif
wrapper_base.hpp
Page URL
File URL
Prev
30/31
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.