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 POSIX_TIME_PRE133_OPERATORS_HPP___ #define POSIX_TIME_PRE133_OPERATORS_HPP___ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ */ /*! @file posix_time_pre133_operators.hpp * These input and output operators are for use with the * pre 1.33 version of the date_time libraries io facet code. * The operators used in version 1.33 and later can be found * in posix_time_io.hpp */ #include
#include
#include
#include "boost/date_time/compiler_config.hpp" #include "boost/date_time/gregorian/gregorian.hpp" #include "boost/date_time/posix_time/posix_time_duration.hpp" #include "boost/date_time/posix_time/ptime.hpp" #include "boost/date_time/posix_time/time_period.hpp" #include "boost/date_time/time_parsing.hpp" namespace boost { namespace posix_time { //The following code is removed for configurations with poor std::locale support (eg: MSVC6, gcc 2.9x) #ifndef BOOST_DATE_TIME_NO_LOCALE #if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) //! ostream operator for posix_time::time_duration template
inline std::basic_ostream
& operator<<(std::basic_ostream
& os, const time_duration& td) { typedef boost::date_time::ostream_time_duration_formatter
duration_formatter; duration_formatter::duration_put(td, os); return os; } //! ostream operator for posix_time::ptime template
inline std::basic_ostream
& operator<<(std::basic_ostream
& os, const ptime& t) { typedef boost::date_time::ostream_time_formatter
time_formatter; time_formatter::time_put(t, os); return os; } //! ostream operator for posix_time::time_period template
inline std::basic_ostream
& operator<<(std::basic_ostream
& os, const time_period& tp) { typedef boost::date_time::ostream_time_period_formatter
period_formatter; period_formatter::period_put(tp, os); return os; } #endif // USE_DATE_TIME_PRE_1_33_FACET_IO /******** input streaming ********/ template
inline std::basic_istream
& operator>>(std::basic_istream
& is, time_duration& td) { // need to create a std::string and parse it std::basic_string
inp_s; std::stringstream out_ss; is >> inp_s; typename std::basic_string
::iterator b = inp_s.begin(); // need to use both iterators because there is no requirement // for the data held by a std::basic_string<> be terminated with // any marker (such as '\0'). typename std::basic_string
::iterator e = inp_s.end(); while(b != e){ out_ss << out_ss.narrow(*b, 0); ++b; } td = date_time::parse_delimited_time_duration
(out_ss.str()); return is; } template
inline std::basic_istream
& operator>>(std::basic_istream
& is, ptime& pt) { gregorian::date d(not_a_date_time); time_duration td(0,0,0); is >> d >> td; pt = ptime(d, td); return is; } /** operator>> for time_period. time_period must be in * "[date time_duration/date time_duration]" format. */ template
inline std::basic_istream
& operator>>(std::basic_istream
& is, time_period& tp) { gregorian::date d(not_a_date_time); time_duration td(0,0,0); ptime beg(d, td); ptime end(beg); std::basic_string
s; // get first date string and remove leading '[' is >> s; { std::basic_stringstream
ss; ss << s.substr(s.find('[')+1); ss >> d; } // get first time_duration & second date string, remove the '/' // and split into 2 strings is >> s; { std::basic_stringstream
ss; ss << s.substr(0, s.find('/')); ss >> td; } beg = ptime(d, td); { std::basic_stringstream
ss; ss << s.substr(s.find('/')+1); ss >> d; } // get last time_duration and remove the trailing ']' is >> s; { std::basic_stringstream
ss; ss << s.substr(0, s.find(']')); ss >> td; } end = ptime(d, td); tp = time_period(beg,end); return is; } #endif //BOOST_DATE_TIME_NO_LOCALE } } // namespaces #endif // POSIX_TIME_PRE133_OPERATORS_HPP___
posix_time_legacy_io.hpp
Page URL
File URL
Prev
7/15
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.