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 2004. 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 CLASS_METADATA_DWA2004719_HPP # define CLASS_METADATA_DWA2004719_HPP # include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
namespace boost { namespace python { namespace objects { BOOST_PYTHON_DECL void copy_class_object(type_info const& src, type_info const& dst); // // Support for registering base/derived relationships // template
struct register_base_of { template
inline void operator()(Base*) const { # if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) BOOST_MPL_ASSERT_NOT((is_same
)); # else BOOST_STATIC_ASSERT(!(is_same
::value)); # endif // Register the Base class register_dynamic_id
(); // Register the up-cast register_conversion
(false); // Register the down-cast, if appropriate. this->register_downcast((Base*)0, is_polymorphic
()); } private: static inline void register_downcast(void*, mpl::false_) {} template
static inline void register_downcast(Base*, mpl::true_) { register_conversion
(true); } }; // // Preamble of register_class. Also used for callback classes, which // need some registration of their own. // template
inline void register_shared_ptr_from_python_and_casts(T*, Bases) { // Constructor performs registration python::detail::force_instantiate(converter::shared_ptr_from_python
()); // // register all up/downcasts here. We're using the alternate // interface to mpl::for_each to avoid an MSVC 6 bug. // register_dynamic_id
(); mpl::for_each(register_base_of
(), (Bases*)0, (add_pointer
*)0); } // // Helper for choosing the unnamed held_type argument // template
struct select_held_type : mpl::if_< mpl::or_< python::detail::specifies_bases
, is_same
> , Prev , T > { }; template < class T // class being wrapped , class X1 // = detail::not_specified , class X2 // = detail::not_specified , class X3 // = detail::not_specified > struct class_metadata { // // Calculate the unnamed template arguments // // held_type_arg -- not_specified, [a class derived from] T or a // smart pointer to [a class derived from] T. Preserving // not_specified allows us to give class_
a back-reference. typedef typename select_held_type< X1 , typename select_held_type< X2 , typename select_held_type< X3 , python::detail::not_specified >::type >::type >::type held_type_arg; // bases typedef typename python::detail::select_bases< X1 , typename python::detail::select_bases< X2 , typename python::detail::select_bases< X3 , python::bases<> >::type >::type >::type bases; typedef mpl::or_< is_same
, is_same
, is_same
> is_noncopyable; // // Holder computation. // // Compute the actual type that will be held in the Holder. typedef typename mpl::if_< is_same
, T, held_type_arg >::type held_type; // Determine if the object will be held by value typedef is_convertible
use_value_holder; // Compute the "wrapped type", that is, if held_type is a smart // pointer, we're talking about the pointee. typedef typename mpl::eval_if< use_value_holder , mpl::identity
, pointee
>::type wrapped; // Determine whether to use a "back-reference holder" typedef mpl::or_< has_back_reference
, is_same
, is_base_and_derived
> use_back_reference; // Select the holder. typedef typename mpl::eval_if< use_back_reference , mpl::if_< use_value_holder , value_holder_back_reference
, pointer_holder_back_reference
> , mpl::if_< use_value_holder , value_holder
, pointer_holder
> >::type holder; inline static void register_() // Register the runtime metadata. { class_metadata::register_aux((T*)0); } private: template
inline static void register_aux(python::wrapper
*) { typedef typename mpl::not_
>::type use_callback; class_metadata::register_aux2((T2*)0, use_callback()); } inline static void register_aux(void*) { typedef typename is_base_and_derived
::type use_callback; class_metadata::register_aux2((T*)0, use_callback()); } template
inline static void register_aux2(T2*, Callback) { objects::register_shared_ptr_from_python_and_casts((T2*)0, bases()); class_metadata::maybe_register_callback_class((T2*)0, Callback()); class_metadata::maybe_register_class_to_python((T2*)0, is_noncopyable()); class_metadata::maybe_register_pointer_to_python( (T2*)0, (use_value_holder*)0, (use_back_reference*)0); } // // Support for converting smart pointers to python // inline static void maybe_register_pointer_to_python(void*,void*,void*) {} #ifndef BOOST_PYTHON_NO_PY_SYGNATURES inline static void maybe_register_pointer_to_python(void*,void*,mpl::true_*) { objects::copy_class_object(python::type_id
(), python::type_id
>()); objects::copy_class_object(python::type_id
(), python::type_id
>()); } #endif template
inline static void maybe_register_pointer_to_python(T2*, mpl::false_*, mpl::false_*) { python::detail::force_instantiate( objects::class_value_wrapper< held_type , make_ptr_instance
> >() ); #ifndef BOOST_PYTHON_NO_PY_SYGNATURES // explicit qualification of type_id makes msvc6 happy objects::copy_class_object(python::type_id
(), python::type_id
()); #endif } // // Support for registering to-python converters // inline static void maybe_register_class_to_python(void*, mpl::true_) {} template
inline static void maybe_register_class_to_python(T2*, mpl::false_) { python::detail::force_instantiate(class_cref_wrapper
>()); #ifndef BOOST_PYTHON_NO_PY_SYGNATURES // explicit qualification of type_id makes msvc6 happy objects::copy_class_object(python::type_id
(), python::type_id
()); #endif } // // Support for registering callback classes // inline static void maybe_register_callback_class(void*, mpl::false_) {} template
inline static void maybe_register_callback_class(T2*, mpl::true_) { objects::register_shared_ptr_from_python_and_casts( (wrapped*)0, mpl::single_view
()); // explicit qualification of type_id makes msvc6 happy objects::copy_class_object(python::type_id
(), python::type_id
()); } }; }}} // namespace boost::python::object #endif // CLASS_METADATA_DWA2004719_HPP
class_metadata.hpp
Page URL
File URL
Prev
4/27
Next
Download
( 9 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.