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 ARG_TO_PYTHON_DWA200265_HPP # define ARG_TO_PYTHON_DWA200265_HPP # include
# include
# include
# include
# include
# include
# include
// Bring in specializations # 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 function_arg_to_python : handle<> { function_arg_to_python(T const& x); }; template
struct reference_arg_to_python : handle<> { reference_arg_to_python(T& x); private: static PyObject* get_object(T& x); }; template
struct shared_ptr_arg_to_python : handle<> { shared_ptr_arg_to_python(T const& x); private: static PyObject* get_object(T& x); }; template
struct value_arg_to_python : arg_to_python_base { // Throw an exception if the conversion can't succeed value_arg_to_python(T const&); }; template
struct pointer_deep_arg_to_python : arg_to_python_base { // Throw an exception if the conversion can't succeed pointer_deep_arg_to_python(Ptr); }; template
struct pointer_shallow_arg_to_python : handle<> { // Throw an exception if the conversion can't succeed pointer_shallow_arg_to_python(Ptr); private: static PyObject* get_object(Ptr p); }; // Convert types that manage a Python object to_python template
struct object_manager_arg_to_python { object_manager_arg_to_python(T const& x) : m_src(x) {} PyObject* get() const { return python::upcast
(get_managed_object(m_src, tag)); } private: T const& m_src; }; template
struct select_arg_to_python { typedef typename unwrap_reference
::type unwrapped_referent; typedef typename unwrap_pointer
::type unwrapped_ptr; typedef typename mpl::if_< // Special handling for char const[N]; interpret them as char // const* for the sake of conversion python::detail::is_string_literal
, arg_to_python
, typename mpl::if_< python::detail::value_is_shared_ptr
, shared_ptr_arg_to_python
, typename mpl::if_< mpl::or_< is_function
, indirect_traits::is_pointer_to_function
, is_member_function_pointer
> , function_arg_to_python
, typename mpl::if_< is_object_manager
, object_manager_arg_to_python
, typename mpl::if_< is_pointer
, pointer_deep_arg_to_python
, typename mpl::if_< is_pointer_wrapper
, pointer_shallow_arg_to_python
, typename mpl::if_< is_reference_wrapper
, reference_arg_to_python
, value_arg_to_python
>::type >::type >::type >::type >::type >::type >::type type; }; } template
struct arg_to_python : detail::select_arg_to_python
::type { typedef typename detail::select_arg_to_python
::type base; public: // member functions // Throw an exception if the conversion can't succeed arg_to_python(T const& x); }; // // implementations // namespace detail { // reject_raw_object_ptr -- cause a compile-time error if the user // should pass a raw Python object pointer using python::detail::yes_convertible; using python::detail::no_convertible; using python::detail::unspecialized; template
struct cannot_convert_raw_PyObject; template
struct reject_raw_object_helper { static void error(Convertibility) { cannot_convert_raw_PyObject
::to_python_use_handle_instead(); } static void error(...) {} }; template
inline void reject_raw_object_ptr(T*) { reject_raw_object_helper
::error( python::detail::convertible
::check((T*)0)); typedef typename remove_cv
::type value_type; reject_raw_object_helper
::error( python::detail::convertible
::check( (base_type_traits
*)0 )); } // --------- template
inline function_arg_to_python
::function_arg_to_python(T const& x) : handle<>(python::objects::make_function_handle(x)) { } template
inline value_arg_to_python
::value_arg_to_python(T const& x) : arg_to_python_base(&x, registered
::converters) { } template
inline pointer_deep_arg_to_python
::pointer_deep_arg_to_python(Ptr x) : arg_to_python_base(x, registered_pointee
::converters) { detail::reject_raw_object_ptr((Ptr)0); } template
inline PyObject* reference_arg_to_python
::get_object(T& x) { to_python_indirect
convert; return convert(x); } template
inline reference_arg_to_python
::reference_arg_to_python(T& x) : handle<>(reference_arg_to_python
::get_object(x)) { } template
inline shared_ptr_arg_to_python
::shared_ptr_arg_to_python(T const& x) : handle<>(shared_ptr_to_python(x)) { } template
inline pointer_shallow_arg_to_python
::pointer_shallow_arg_to_python(Ptr x) : handle<>(pointer_shallow_arg_to_python
::get_object(x)) { detail::reject_raw_object_ptr((Ptr)0); } template
inline PyObject* pointer_shallow_arg_to_python
::get_object(Ptr x) { to_python_indirect
convert; return convert(x); } } template
inline arg_to_python
::arg_to_python(T const& x) : base(x) {} }}} // namespace boost::python::converter #endif // ARG_TO_PYTHON_DWA200265_HPP
arg_to_python.hpp
Page URL
File URL
Prev
2/27
Next
Download
( 7 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.