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 David Abrahams 2002. // Distributed under 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) #ifndef RETURN_FROM_PYTHON_DWA200265_HPP # define RETURN_FROM_PYTHON_DWA200265_HPP # include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
namespace boost { namespace python { namespace converter { template
struct is_object_manager; namespace detail { template
struct return_pointer_from_python { typedef T result_type; T operator()(PyObject*) const; }; template
struct return_reference_from_python { typedef T result_type; T operator()(PyObject*) const; }; template
struct return_rvalue_from_python { typedef T result_type; return_rvalue_from_python(); result_type operator()(PyObject*); private: rvalue_from_python_data
m_data; }; template
struct return_object_manager_from_python { typedef T result_type; result_type operator()(PyObject*) const; }; template
struct select_return_from_python { BOOST_STATIC_CONSTANT( bool, obj_mgr = is_object_manager
::value); BOOST_STATIC_CONSTANT( bool, ptr = is_pointer
::value); BOOST_STATIC_CONSTANT( bool, ref = is_reference
::value); typedef typename mpl::if_c< obj_mgr , return_object_manager_from_python
, typename mpl::if_c< ptr , return_pointer_from_python
, typename mpl::if_c< ref , return_reference_from_python
, return_rvalue_from_python
>::type >::type >::type type; }; } template
struct return_from_python : detail::select_return_from_python
::type { }; // Specialization as a convenience for call and call_method template <> struct return_from_python
{ typedef python::detail::returnable
::type result_type; result_type operator()(PyObject* x) const { (void_result_from_python)(x); # ifdef BOOST_NO_VOID_RETURNS return result_type(); # endif } }; // // Implementations // namespace detail { template
inline return_rvalue_from_python
::return_rvalue_from_python() : m_data( const_cast
(®istered
::converters) ) { } template
inline typename return_rvalue_from_python
::result_type return_rvalue_from_python
::operator()(PyObject* obj) { // Take possession of the source object here. If the result is in // fact going to be a copy of an lvalue embedded in the object, // and we take possession inside rvalue_result_from_python, it // will be destroyed too early. handle<> holder(obj); return *(T*) (rvalue_result_from_python)(obj, m_data.stage1); } template
inline T return_reference_from_python
::operator()(PyObject* obj) const { return python::detail::void_ptr_to_reference( (reference_result_from_python)(obj, registered
::converters) , (T(*)())0); } template
inline T return_pointer_from_python
::operator()(PyObject* obj) const { return T( (pointer_result_from_python)(obj, registered_pointee
::converters) ); } template
inline T return_object_manager_from_python
::operator()(PyObject* obj) const { return T( object_manager_traits
::adopt(expect_non_null(obj)) ); } } }}} // namespace boost::python::converter #endif // RETURN_FROM_PYTHON_DWA200265_HPP
return_from_python.hpp
Page URL
File URL
Prev
22/27
Next
Download
( 4 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.