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_VARIANT_HPP #define BOOST_SERIALIZATION_VARIANT_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #if defined(_MSC_VER) && (_MSC_VER <= 1020) # pragma warning (disable : 4786) // too long name, harmless warning #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // variant.hpp - non-intrusive serialization of variant types // // copyright (c) 2005 // troy d. straszheim
// http://www.resophonic.com // // 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. // // thanks to Robert Ramey, Peter Dimov, and Richard Crossley. // #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace serialization { template
struct variant_save_visitor : boost::static_visitor<> { variant_save_visitor(Archive& ar) : m_ar(ar) {} template
void operator()(T const & value) const { m_ar << BOOST_SERIALIZATION_NVP(value); } private: Archive & m_ar; }; template
void save( Archive & ar, boost::variant
const & v, unsigned int version ){ int which = v.which(); ar << BOOST_SERIALIZATION_NVP(which); typedef BOOST_DEDUCED_TYPENAME boost::variant
::types types; variant_save_visitor
visitor(ar); v.apply_visitor(visitor); } template
struct variant_impl { struct load_null { template
static void invoke( Archive & ar, int which, V & v, unsigned int version ){} }; struct load_impl { template
static void invoke( Archive & ar, int which, V & v, unsigned int version ){ if(which == 0){ // note: A non-intrusive implementation (such as this one) // necessary has to copy the value. This wouldn't be necessary // with an implementation that de-serialized to the address of the // aligned storage included in the variant. typedef BOOST_DEDUCED_TYPENAME mpl::front
::type head_type; head_type value; ar >> BOOST_SERIALIZATION_NVP(value); v = value; ar.reset_object_address(& boost::get
(v), & value); return; } typedef BOOST_DEDUCED_TYPENAME mpl::pop_front
::type type; variant_impl
::load(ar, which - 1, v, version); } }; template
static void load( Archive & ar, int which, V & v, unsigned int version ){ typedef BOOST_DEDUCED_TYPENAME mpl::eval_if
, mpl::identity
, mpl::identity
>::type typex; typex::invoke(ar, which, v, version); } }; template
void load( Archive & ar, boost::variant
& v, unsigned int version ){ int which; typedef BOOST_DEDUCED_TYPENAME boost::variant
::types types; ar >> BOOST_SERIALIZATION_NVP(which); if(which >= mpl::size
::value) // this might happen if a type was removed from the list of variant types boost::throw_exception( boost::archive::archive_exception( boost::archive::archive_exception::unsupported_version ) ); variant_impl
::load(ar, which, v, version); } template
inline void serialize( Archive & ar, boost::variant
& v, unsigned int file_version ){ split_free(ar,v,file_version); } } // namespace serialization } // namespace boost #endif //BOOST_SERIALIZATION_VARIANT_HPP
variant.hpp
Page URL
File URL
Prev
45/51
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.