DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
True Drop Box
FTP/SFTP Hosting
Group Account
Team Anywhere
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
|
Cloud-to-Cloud Backup
|
DVR/Camera Backup
FTP, Email & Web Service
FTP/SFTP Hosting
|
Email Hosting
|
Web Hosting
|
Webcam Hosting
Other Products & Services
Team Anywhere
|
Connect to Remote PC
|
Cloud Surveillance
|
Virtual CCTV NVR
Quick Links
Security and Privacy
Customer Support
Service Manual
Use Cases
Group Account
Online Help
Support Forum
Contact Us
About DriveHQ
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
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
Other Features
Team Anywhere (Remote Desktop Service)
CameraFTP Cloud Surveillance
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Team Anywhere for Windows (Beta)
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
/*============================================================================= Phoenix V1.2.1 Copyright (c) 2001-2002 Joel de Guzman 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) ==============================================================================*/ #ifndef PHOENIX_SPECIAL_OPS_HPP #define PHOENIX_SPECIAL_OPS_HPP #include
#ifdef BOOST_NO_STRINGSTREAM #include
#define PHOENIX_SSTREAM strstream #else #include
#define PHOENIX_SSTREAM stringstream #endif /////////////////////////////////////////////////////////////////////////////// #include
#include
/////////////////////////////////////////////////////////////////////////////// #if defined(_STLPORT_VERSION) && defined(__STL_USE_OWN_NAMESPACE) #define PHOENIX_STD _STLP_STD #define PHOENIX_NO_STD_NAMESPACE #else #define PHOENIX_STD std #endif /////////////////////////////////////////////////////////////////////////////// //#if !defined(PHOENIX_NO_STD_NAMESPACE) namespace PHOENIX_STD { //#endif template
class complex; //#if !defined(PHOENIX_NO_STD_NAMESPACE) } //#endif /////////////////////////////////////////////////////////////////////////////// namespace phoenix { /////////////////////////////////////////////////////////////////////////////// // // The following specializations take into account the C++ standard // library components. There are a couple of issues that have to be // dealt with to enable lazy operator overloads for the standard // library classes. // // *iostream (e.g. cout, cin, strstream/ stringstream) uses non- // canonical shift operator overloads where the lhs is taken in // by reference. // // *I/O manipulators overloads for the RHS of the << and >> // operators. // // *STL iterators can be objects that conform to pointer semantics. // Some operators need to be specialized for these. // // *std::complex is given a rank (see rank class in operators.hpp) // /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // // specialization for rank
// /////////////////////////////////////////////////////////////////////////////// template
struct rank
> { static int const value = 170 + rank
::value; }; /////////////////////////////////////////////////////////////////////////////// // // specializations for std::istream // /////////////////////////////////////////////////////////////////////////////// #if defined(__GNUC__) && (__GNUC__ < 3) #if defined(_STLPORT_VERSION) #define PHOENIX_ISTREAM _IO_istream_withassign #else #define PHOENIX_ISTREAM PHOENIX_STD::_IO_istream_withassign #endif #else // #if (defined(__ICL) && defined(_STLPORT_VERSION)) // #define PHOENIX_ISTREAM istream_withassign // #else #define PHOENIX_ISTREAM PHOENIX_STD::istream // #endif #endif ////////////////////////////////// #if defined(__GNUC__) && (__GNUC__ < 3) // || (defined(__ICL) && defined(_STLPORT_VERSION)) template
struct binary_operator
{ typedef PHOENIX_STD::istream& result_type; static result_type eval(PHOENIX_STD::istream& out, T1& rhs) { return out >> rhs; } }; #endif ////////////////////////////////// template
struct binary_operator
{ typedef PHOENIX_STD::istream& result_type; static result_type eval(PHOENIX_STD::istream& out, T1& rhs) { return out >> rhs; } }; ////////////////////////////////// template
inline typename impl::make_binary3
, BaseT>::type operator>>(PHOENIX_ISTREAM& _0, actor
const& _1) { return impl::make_binary3
, BaseT> ::construct(var(_0), _1); } #undef PHOENIX_ISTREAM /////////////////////////////////////////////////////////////////////////////// // // specializations for std::ostream // /////////////////////////////////////////////////////////////////////////////// #if defined(__GNUC__) && (__GNUC__ < 3) #if defined(_STLPORT_VERSION) #define PHOENIX_OSTREAM _IO_ostream_withassign #else #define PHOENIX_OSTREAM PHOENIX_STD::_IO_ostream_withassign #endif #else // #if (defined(__ICL) && defined(_STLPORT_VERSION)) // #define PHOENIX_OSTREAM ostream_withassign // #else #define PHOENIX_OSTREAM PHOENIX_STD::ostream // #endif #endif ////////////////////////////////// #if defined(__GNUC__) && (__GNUC__ < 3) // || (defined(__ICL) && defined(_STLPORT_VERSION)) template
struct binary_operator
{ typedef PHOENIX_STD::ostream& result_type; static result_type eval(PHOENIX_STD::ostream& out, T1 const& rhs) { return out << rhs; } }; #endif ////////////////////////////////// template
struct binary_operator
{ typedef PHOENIX_STD::ostream& result_type; static result_type eval(PHOENIX_STD::ostream& out, T1 const& rhs) { return out << rhs; } }; ////////////////////////////////// template
inline typename impl::make_binary3
, BaseT>::type operator<<(PHOENIX_OSTREAM& _0, actor
const& _1) { return impl::make_binary3
, BaseT> ::construct(var(_0), _1); } #undef PHOENIX_OSTREAM /////////////////////////////////////////////////////////////////////////////// // // specializations for std::strstream / stringstream // /////////////////////////////////////////////////////////////////////////////// template
struct binary_operator
{ typedef PHOENIX_STD::istream& result_type; static result_type eval(PHOENIX_STD::istream& out, T1& rhs) { return out >> rhs; } }; ////////////////////////////////// template
inline typename impl::make_binary3
, BaseT>::type operator>>(PHOENIX_STD::PHOENIX_SSTREAM& _0, actor
const& _1) { return impl::make_binary3
, BaseT> ::construct(var(_0), _1); } ////////////////////////////////// template
struct binary_operator
{ typedef PHOENIX_STD::ostream& result_type; static result_type eval(PHOENIX_STD::ostream& out, T1 const& rhs) { return out << rhs; } }; ////////////////////////////////// template
inline typename impl::make_binary3
, BaseT>::type operator<<(PHOENIX_STD::PHOENIX_SSTREAM& _0, actor
const& _1) { return impl::make_binary3
, BaseT> ::construct(var(_0), _1); } /////////////////////////////////////////////////////////////////////////////// // // I/O manipulator specializations // /////////////////////////////////////////////////////////////////////////////// #if (!defined(__GNUC__) || (__GNUC__ > 2)) // && !(defined(__ICL) && defined(_STLPORT_VERSION)) typedef PHOENIX_STD::ios_base& (*iomanip_t)(PHOENIX_STD::ios_base&); typedef PHOENIX_STD::istream& (*imanip_t)(PHOENIX_STD::istream&); typedef PHOENIX_STD::ostream& (*omanip_t)(PHOENIX_STD::ostream&); #if defined(__BORLANDC__) /////////////////////////////////////////////////////////////////////////////// // // Borland does not like i/o manipulators functions such as endl to // be the rhs of a lazy << operator (Borland incorrectly reports // ambiguity). To get around the problem, we provide function // pointer versions of the same name with a single trailing // underscore. // // You can use the same trick for other i/o manipulators. // Alternatively, you can prefix the manipulator with a '&' // operator. Example: // // cout << arg1 << &endl // /////////////////////////////////////////////////////////////////////////////// imanip_t ws_ = &PHOENIX_STD::ws; iomanip_t dec_ = &PHOENIX_STD::dec; iomanip_t hex_ = &PHOENIX_STD::hex; iomanip_t oct_ = &PHOENIX_STD::oct; omanip_t endl_ = &PHOENIX_STD::endl; omanip_t ends_ = &PHOENIX_STD::ends; omanip_t flush_ = &PHOENIX_STD::flush; #else // __BORLANDC__ /////////////////////////////////////////////////////////////////////////////// // // The following are overloads for I/O manipulators. // /////////////////////////////////////////////////////////////////////////////// template
inline typename impl::make_binary1
::type operator>>(actor
const& _0, imanip_t _1) { return impl::make_binary1
::construct(_0, _1); } ////////////////////////////////// template
inline typename impl::make_binary1
::type operator>>(actor
const& _0, iomanip_t _1) { return impl::make_binary1
::construct(_0, _1); } ////////////////////////////////// template
inline typename impl::make_binary1
::type operator<<(actor
const& _0, omanip_t _1) { return impl::make_binary1
::construct(_0, _1); } ////////////////////////////////// template
inline typename impl::make_binary1
::type operator<<(actor
const& _0, iomanip_t _1) { return impl::make_binary1
::construct(_0, _1); } #endif // __BORLANDC__ #endif // !defined(__GNUC__) || (__GNUC__ > 2) /////////////////////////////////////////////////////////////////////////////// // // specializations for stl iterators and containers // /////////////////////////////////////////////////////////////////////////////// template
struct unary_operator
{ typedef typename T::reference result_type; static result_type eval(T const& iter) { return *iter; } }; ////////////////////////////////// template
struct binary_operator
{ typedef typename T0::reference result_type; static result_type eval(T0& container, T1 const& index) { return container[index]; } }; ////////////////////////////////// template
struct binary_operator
{ typedef typename T0::const_reference result_type; static result_type eval(T0 const& container, T1 const& index) { return container[index]; } }; /////////////////////////////////////////////////////////////////////////////// } // namespace phoenix #undef PHOENIX_SSTREAM #undef PHOENIX_STD #endif
special_ops.hpp
Page URL
File URL
Prev
10/13
Next
Download
( 11 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.