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
#ifndef BOOST_SERIALIZATION_SHARED_PTR_HPP #define BOOST_SERIALIZATION_SHARED_PTR_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // shared_ptr.hpp: serialization for boost shared pointer // (C) Copyright 2004 Robert Ramey and Martin Ecker // Use, modification and distribution is subject to 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) // See http://www.boost.org for updates, documentation, and revision history. #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // shared_ptr serialization traits // version 1 to distinguish from boost 1.32 version. Note: we can only do this // for a template when the compiler supports partial template specialization #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace boost { namespace serialization{ template
struct version< ::boost::shared_ptr
> { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) typedef BOOST_DEDUCED_TYPENAME mpl::int_<1> type; #else typedef mpl::int_<1> type; #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) BOOST_STATIC_CONSTANT(unsigned int, value = 1); #else BOOST_STATIC_CONSTANT(unsigned int, value = type::value); #endif }; // don't track shared pointers template
struct tracking_level< ::boost::shared_ptr
> { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) typedef BOOST_DEDUCED_TYPENAME mpl::int_< ::boost::serialization::track_never> type; #else typedef mpl::int_< ::boost::serialization::track_never> type; #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) BOOST_STATIC_CONSTANT(int, value = ::boost::serialization::track_never); #else BOOST_STATIC_CONSTANT(int, value = type::value); #endif }; }} #define BOOST_SERIALIZATION_SHARED_PTR(T) #else // define macro to let users of these compilers do this #define BOOST_SERIALIZATION_SHARED_PTR(T) \ BOOST_CLASS_VERSION( \ ::boost::shared_ptr< T >, \ 1 \ ) \ BOOST_CLASS_TRACKING( \ ::boost::shared_ptr< T >, \ ::boost::serialization::track_never \ ) \ /**/ #endif namespace boost { namespace serialization{ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // serialization for shared_ptr template
inline void save( Archive & ar, const boost::shared_ptr
&t, const unsigned int /* file_version */ ){ // The most common cause of trapping here would be serializing // something like shared_ptr
. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level
::value != track_never)); const T * t_ptr = t.get(); ar << boost::serialization::make_nvp("px", t_ptr); } template
inline void load( Archive & ar, boost::shared_ptr
&t, const unsigned int file_version ){ // The most common cause of trapping here would be serializing // something like shared_ptr
. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level
::value != track_never)); T* r; #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP if(file_version < 1){ //ar.register_type(static_cast< // boost_132::detail::sp_counted_base_impl
> * //>(NULL)); ar.register_type(static_cast< boost_132::detail::sp_counted_base_impl
* >(NULL)); boost_132::shared_ptr
sp; ar >> boost::serialization::make_nvp("px", sp.px); ar >> boost::serialization::make_nvp("pn", sp.pn); // got to keep the sps around so the sp.pns don't disappear ar.append(sp); r = sp.get(); } else #endif { ar >> boost::serialization::make_nvp("px", r); } ar.reset(t,r); } template
inline void serialize( Archive & ar, boost::shared_ptr
&t, const unsigned int file_version ){ // correct shared_ptr serialization depends upon object tracking // being used. BOOST_STATIC_ASSERT( boost::serialization::tracking_level
::value != boost::serialization::track_never ); boost::serialization::split_free(ar, t, file_version); } } // namespace serialization } // namespace boost #endif // BOOST_SERIALIZATION_SHARED_PTR_HPP
shared_ptr.hpp
Page URL
File URL
Prev
33/51
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.