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) 2004 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. #ifndef OPERATOR_040729_HPP #define OPERATOR_040729_HPP #include
#include
#include
#include
#include
#include
#if defined(__GNUC__) && __GNUC__ < 3 # define LUABIND_NO_STRINGSTREAM #else # if defined(BOOST_NO_STRINGSTREAM) # define LUABIND_NO_STRINGSTREAM # endif #endif #ifdef LUABIND_NO_STRINGSTREAM #include
#else #include
#endif namespace luabind { namespace detail { template
struct unwrap_parameter_type; template
struct operator_ {}; struct operator_void_return {}; #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) template
inline T const& operator,(T const& x, operator_void_return) { return x; } #endif }} // namespace luabind namespace luabind { namespace operators { #define BOOST_PP_ITERATION_PARAMS_1 (3, \ (0, LUABIND_MAX_ARITY,
)) #include BOOST_PP_ITERATE() }} // namespace luabind::operators #include
namespace luabind { template
struct self_base { operators::call_operator0
operator()() const { return 0; } #define BOOST_PP_LOCAL_MACRO(n) \ template
\ BOOST_PP_CAT(operators::call_operator, n)< \ Derived \ BOOST_PP_ENUM_TRAILING_PARAMS(n, A) \ >\ operator()( \ BOOST_PP_ENUM_BINARY_PARAMS(n, A, const& BOOST_PP_INTERCEPT) \ ) const \ { \ return 0; \ } #define BOOST_PP_LOCAL_LIMITS (1, LUABIND_MAX_ARITY) #include BOOST_PP_LOCAL_ITERATE() }; struct self_type : self_base
{ }; struct const_self_type : self_base
{ }; namespace detail { template
struct unwrap_parameter_type { typedef typename boost::mpl::eval_if< boost::is_same
, boost::mpl::identity
, boost::mpl::eval_if< boost::is_same
, boost::mpl::identity
, unwrap_other
> >::type type; }; template
struct binary_operator : operator_
> { binary_operator(int) {} template
struct apply { typedef typename unwrap_parameter_type
::type arg0; typedef typename unwrap_parameter_type
::type arg1; static void execute(lua_State* L, arg0 _0, arg1 _1) { Derived::template apply
::execute( L, _0, _1); } }; static char const* name() { return Derived::name(); } }; template
struct unary_operator : operator_
> { unary_operator(int) {} template
struct apply { typedef typename unwrap_parameter_type
::type arg0; static void execute(lua_State* L, arg0 _0) { Derived::template apply
::execute(L, _0); } }; static char const* name() { return Derived::name(); } }; template
inline void operator_result(lua_State* L, operator_void_return, Policies*) { } namespace mpl = boost::mpl; template
inline void operator_result(lua_State* L, T const& x, Policies*) { typedef typename find_conversion_policy< 0 , Policies >::type cv_policy; typename mpl::apply_wrap2
::type cv; cv.apply(L, x); } }} // namespace detail::luabind namespace luabind { #define LUABIND_BINARY_OPERATOR(name_, op) \ namespace operators { \ \ struct name_ \ { \ template
\ struct apply \ { \ static void execute(lua_State* L, T0 _0, T1 _1) \ { \ detail::operator_result(L, _0 op _1, (Policies*)0); \ } \ }; \ \ static char const* name() \ { \ return "__" # name_; \ } \ }; \ \ } \ \ template
\ detail::binary_operator< \ operators::name_ \ , U \ , T \ > \ inline operator op(self_base
, T const&) \ { \ return 0; \ } \ \ template
\ detail::binary_operator< \ operators::name_ \ , T \ , U \ > \ inline operator op(T const&, self_base
) \ { \ return 0; \ } \ \ detail::binary_operator< \ operators::name_ \ , self_type \ , self_type \ > \ inline operator op(self_type, self_type) \ { \ return 0; \ } \ \ detail::binary_operator< \ operators::name_ \ , self_type \ , const_self_type \ > \ inline operator op(self_type, const_self_type) \ { \ return 0; \ } \ \ detail::binary_operator< \ operators::name_ \ , const_self_type \ , self_type \ > \ inline operator op(const_self_type, self_type) \ { \ return 0; \ } \ \ detail::binary_operator< \ operators::name_ \ , const_self_type \ , const_self_type \ > \ inline operator op(const_self_type, const_self_type) \ { \ return 0; \ } LUABIND_BINARY_OPERATOR(add, +) LUABIND_BINARY_OPERATOR(sub, -) LUABIND_BINARY_OPERATOR(mul, *) LUABIND_BINARY_OPERATOR(div, /) LUABIND_BINARY_OPERATOR(pow, ^) LUABIND_BINARY_OPERATOR(lt, <) LUABIND_BINARY_OPERATOR(le, <=) LUABIND_BINARY_OPERATOR(eq, ==) #undef LUABIND_UNARY_OPERATOR #define LUABIND_UNARY_OPERATOR(name_, op, fn) \ namespace operators { \ \ struct name_ \ { \ template
\ struct apply \ { \ static void execute(lua_State* L, T x) \ { \ detail::operator_result(L, op(x), (Policies*)0); \ } \ }; \ \ static char const* name() \ { \ return "__" # name_; \ } \ }; \ \ } \ \ template
\ detail::unary_operator< \ operators::name_ \ , T \ > \ inline fn(self_base
) \ { \ return 0; \ } template
std::string tostring_operator(T const& x) { #ifdef LUABIND_NO_STRINGSTREAM std::strstream s; s << x << std::ends; #else std::stringstream s; s << x; #endif return s.str(); }; LUABIND_UNARY_OPERATOR(tostring, tostring_operator, tostring) LUABIND_UNARY_OPERATOR(unm, -, operator-) #undef LUABIND_BINARY_OPERATOR namespace { LUABIND_ANONYMOUS_FIX self_type self; LUABIND_ANONYMOUS_FIX const_self_type const_self; } // namespace unnamed } // namespace luabind #endif // OPERATOR_040729_HPP
operator.hpp
Page URL
File URL
Prev
22/31
Next
Download
( 8 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.