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
/////////////////////////////////////////////////////////////////////////////// /// \file debug.hpp /// Utilities for debugging proto expression trees // // Copyright 2007 Eric Niebler. Distributed under 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 BOOST_PROTO_DEBUG_HPP_EAN_12_31_2006 #define BOOST_PROTO_DEBUG_HPP_EAN_12_31_2006 #include
#include
#if !defined(__WAVE__) || !defined(BOOST_PROTO_DOXYGEN_INVOKED) #include
#include
#include
#include
#include
#include
#else /// INTERNAL ONLY /// Needed to work around doxygen bug struct a_dummy_global; #endif namespace boost { namespace proto { namespace tag { namespace hidden_detail_ { typedef char (¬_ostream)[sizeof(std::ostream)+1]; not_ostream operator<<(std::ostream &, detail::dont_care); template
struct printable_tag_ { typedef char const *type; static type call() { return typeid(Tag).name(); } }; template
struct printable_tag_
{ typedef Tag type; static type call() { return Tag(); } }; template
struct printable_tag : printable_tag_
{}; } template
inline typename hidden_detail_::printable_tag
::type proto_tag_name(Tag) { return hidden_detail_::printable_tag
::call(); } #define BOOST_PROTO_DEFINE_TAG_NAME(Tag)\ inline char const *proto_tag_name(tag::Tag)\ {\ return #Tag;\ }\ /**/ BOOST_PROTO_DEFINE_TAG_NAME(posit) BOOST_PROTO_DEFINE_TAG_NAME(negate) BOOST_PROTO_DEFINE_TAG_NAME(dereference) BOOST_PROTO_DEFINE_TAG_NAME(complement) BOOST_PROTO_DEFINE_TAG_NAME(address_of) BOOST_PROTO_DEFINE_TAG_NAME(logical_not) BOOST_PROTO_DEFINE_TAG_NAME(pre_inc) BOOST_PROTO_DEFINE_TAG_NAME(pre_dec) BOOST_PROTO_DEFINE_TAG_NAME(post_inc) BOOST_PROTO_DEFINE_TAG_NAME(post_dec) BOOST_PROTO_DEFINE_TAG_NAME(shift_left) BOOST_PROTO_DEFINE_TAG_NAME(shift_right) BOOST_PROTO_DEFINE_TAG_NAME(multiplies) BOOST_PROTO_DEFINE_TAG_NAME(divides) BOOST_PROTO_DEFINE_TAG_NAME(modulus) BOOST_PROTO_DEFINE_TAG_NAME(plus) BOOST_PROTO_DEFINE_TAG_NAME(minus) BOOST_PROTO_DEFINE_TAG_NAME(less) BOOST_PROTO_DEFINE_TAG_NAME(greater) BOOST_PROTO_DEFINE_TAG_NAME(less_equal) BOOST_PROTO_DEFINE_TAG_NAME(greater_equal) BOOST_PROTO_DEFINE_TAG_NAME(equal_to) BOOST_PROTO_DEFINE_TAG_NAME(not_equal_to) BOOST_PROTO_DEFINE_TAG_NAME(logical_or) BOOST_PROTO_DEFINE_TAG_NAME(logical_and) BOOST_PROTO_DEFINE_TAG_NAME(bitwise_and) BOOST_PROTO_DEFINE_TAG_NAME(bitwise_or) BOOST_PROTO_DEFINE_TAG_NAME(bitwise_xor) BOOST_PROTO_DEFINE_TAG_NAME(comma) BOOST_PROTO_DEFINE_TAG_NAME(mem_ptr) BOOST_PROTO_DEFINE_TAG_NAME(assign) BOOST_PROTO_DEFINE_TAG_NAME(shift_left_assign) BOOST_PROTO_DEFINE_TAG_NAME(shift_right_assign) BOOST_PROTO_DEFINE_TAG_NAME(multiplies_assign) BOOST_PROTO_DEFINE_TAG_NAME(divides_assign) BOOST_PROTO_DEFINE_TAG_NAME(modulus_assign) BOOST_PROTO_DEFINE_TAG_NAME(plus_assign) BOOST_PROTO_DEFINE_TAG_NAME(minus_assign) BOOST_PROTO_DEFINE_TAG_NAME(bitwise_and_assign) BOOST_PROTO_DEFINE_TAG_NAME(bitwise_or_assign) BOOST_PROTO_DEFINE_TAG_NAME(bitwise_xor_assign) BOOST_PROTO_DEFINE_TAG_NAME(subscript) BOOST_PROTO_DEFINE_TAG_NAME(if_else_) BOOST_PROTO_DEFINE_TAG_NAME(function) #undef BOOST_PROTO_DEFINE_TAG_NAME } namespace functional { // Display a proto expression tree struct display_expr { display_expr(int depth = 0, std::ostream &sout = std::cout) : depth_(depth) , first_(true) , sout_(sout) {} template
void operator()(expr
const &expr) const { this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ") << "terminal(" << proto::arg(expr) << ")\n"; this->first_ = false; } #define BOOST_PROTO_ARG(z, n, data) \ display(proto::arg_c
(expr)); \ /**/ #define BOOST_PP_LOCAL_MACRO(N) \ template
\ void operator()(expr
const &expr) const \ { \ using namespace tag; \ this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ") \ << proto_tag_name(Tag()) << "(\n"; \ display_expr display(this->depth_ + 4, this->sout_); \ BOOST_PP_REPEAT(N, BOOST_PROTO_ARG, _) \ this->sout_ << std::setw(this->depth_) << "" << ")\n"; \ this->first_ = false; \ } \ /**/ #define BOOST_PP_LOCAL_LIMITS (1, BOOST_PROTO_MAX_ARITY) #include BOOST_PP_LOCAL_ITERATE() #undef BOOST_PROTO_ARG template
void operator()(T const &t) const { (*this)(t.proto_base()); } private: int depth_; mutable bool first_; std::ostream &sout_; }; } template
void display_expr(Expr const &expr) { functional::display_expr()(expr); } template
void display_expr(Expr const &expr, std::ostream &sout) { functional::display_expr(0, sout)(expr); } }} #endif
debug.hpp
Page URL
File URL
Prev
3/21
Next
Download
( 7 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.