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_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP #define BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_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 // basic_binary_oprimitive.hpp // (C) Copyright 2002 Robert Ramey - http://www.rrsd.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. // archives stored as native binary - this should be the fastest way // to archive the state of a group of obects. It makes no attempt to // convert to any canonical form. // IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE // ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON #include
#include
#include
#include
// size_t #include
// basic_streambuf #include
#include
#if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::size_t; } // namespace std #endif #include
//#include
//#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// must be the last header namespace boost { namespace archive { ///////////////////////////////////////////////////////////////////////// // class basic_binary_oprimitive - binary output of prmitives template
class basic_binary_oprimitive { #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS friend class save_access; protected: #else public: #endif std::basic_streambuf
& m_sb; // return a pointer to the most derived class Archive * This(){ return static_cast
(this); } boost::scoped_ptr
archive_locale; basic_streambuf_locale_saver
locale_saver; // default saving of primitives. template
void save(const T & t) { save_binary(& t, sizeof(T)); } ///////////////////////////////////////////////////////// // fundamental types that need special treatment // trap usage of invalid uninitialized boolean which would // otherwise crash on load. void save(const bool t){ int i = t; assert(0 == i || 1 == i); save_binary(& t, sizeof(t)); } BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const std::wstring &ws); #endif BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const char * t); BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const wchar_t * t); BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(); BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_binary_oprimitive( std::basic_streambuf
& sb, bool no_codecvt ); BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_binary_oprimitive(); public: // we provide an optimized save for all fundamental types // typedef serialization::is_bitwise_serializable
// use_array_optimization; // workaround without using mpl lambdas struct use_array_optimization { template
struct apply : public serialization::is_bitwise_serializable
{}; }; // the optimized save_array dispatches to save_binary template
void save_array(serialization::array
const& a, unsigned int) { save_binary(a.address(),a.count()*sizeof(ValueType)); } void save_binary(const void *address, std::size_t count); }; template
inline void basic_binary_oprimitive
::save_binary( const void *address, std::size_t count ){ //assert( // static_cast
((std::numeric_limits
::max)()) >= count //); // note: if the following assertions fail // a likely cause is that the output stream is set to "text" // mode where by cr characters recieve special treatment. // be sure that the output stream is opened with ios::binary //if(os.fail()) // boost::throw_exception(archive_exception(archive_exception::stream_error)); // figure number of elements to output - round up count = ( count + sizeof(Elem) - 1) / sizeof(Elem); std::streamsize scount = m_sb.sputn( static_cast
(address), count ); if(count != static_cast
(scount)) boost::throw_exception(archive_exception(archive_exception::stream_error)); //os.write( // static_cast
(address), // count //); //assert(os.good()); } } //namespace boost } //namespace archive #include
// pop pragams #endif // BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP
basic_binary_oprimitive.hpp
Page URL
File URL
Prev
7/46
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.