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
/* Copyright 2003-2007 Joaqu�n M L�pez Mu�oz. * 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) * * See http://www.boost.org/libs/multi_index for library home page. */ #ifndef BOOST_MULTI_INDEX_DETAIL_ITER_ADAPTOR_HPP #define BOOST_MULTI_INDEX_DETAIL_ITER_ADAPTOR_HPP #if defined(_MSC_VER)&&(_MSC_VER>=1200) #pragma once #endif #include
/* keep it first to prevent nasty warns in MSVC */ #include
#include
#include
namespace boost{ namespace multi_index{ namespace detail{ /* Poor man's version of boost::iterator_adaptor. Used instead of the * original as compile times for the latter are significantly higher. * The interface is not replicated exactly, only to the extent necessary * for internal consumption. */ /* NB. The purpose of the (non-inclass) global operators ==, < and - defined * above is to partially alleviate a problem of MSVC++ 6.0 by * which * friend-injected operators on T are not visible if T is instantiated only * in template code where T is a dependent type. */ class iter_adaptor_access { public: template
static typename Class::reference dereference(const Class& x) { return x.dereference(); } template
static bool equal(const Class& x,const Class& y) { return x.equal(y); } template
static void increment(Class& x) { x.increment(); } template
static void decrement(Class& x) { x.decrement(); } template
static void advance(Class& x,typename Class::difference_type n) { x.advance(n); } template
static typename Class::difference_type distance_to( const Class& x,const Class& y) { return x.distance_to(y); } }; template
struct iter_adaptor_selector; template
class forward_iter_adaptor_base: public forward_iterator_helper< Derived, typename Base::value_type, typename Base::difference_type, typename Base::pointer, typename Base::reference> { public: typedef typename Base::reference reference; reference operator*()const { return iter_adaptor_access::dereference(final()); } friend bool operator==(const Derived& x,const Derived& y) { return iter_adaptor_access::equal(x,y); } Derived& operator++() { iter_adaptor_access::increment(final()); return final(); } private: Derived& final(){return *static_cast
(this);} const Derived& final()const{return *static_cast
(this);} }; template
bool operator==( const forward_iter_adaptor_base
& x, const forward_iter_adaptor_base
& y) { return iter_adaptor_access::equal( static_cast
(x),static_cast
(y)); } template<> struct iter_adaptor_selector
{ template
struct apply { typedef forward_iter_adaptor_base
type; }; }; template
class bidirectional_iter_adaptor_base: public bidirectional_iterator_helper< Derived, typename Base::value_type, typename Base::difference_type, typename Base::pointer, typename Base::reference> { public: typedef typename Base::reference reference; reference operator*()const { return iter_adaptor_access::dereference(final()); } friend bool operator==(const Derived& x,const Derived& y) { return iter_adaptor_access::equal(x,y); } Derived& operator++() { iter_adaptor_access::increment(final()); return final(); } Derived& operator--() { iter_adaptor_access::decrement(final()); return final(); } private: Derived& final(){return *static_cast
(this);} const Derived& final()const{return *static_cast
(this);} }; template
bool operator==( const bidirectional_iter_adaptor_base
& x, const bidirectional_iter_adaptor_base
& y) { return iter_adaptor_access::equal( static_cast
(x),static_cast
(y)); } template<> struct iter_adaptor_selector
{ template
struct apply { typedef bidirectional_iter_adaptor_base
type; }; }; template
class random_access_iter_adaptor_base: public random_access_iterator_helper< Derived, typename Base::value_type, typename Base::difference_type, typename Base::pointer, typename Base::reference> { public: typedef typename Base::reference reference; typedef typename Base::difference_type difference_type; reference operator*()const { return iter_adaptor_access::dereference(final()); } friend bool operator==(const Derived& x,const Derived& y) { return iter_adaptor_access::equal(x,y); } friend bool operator<(const Derived& x,const Derived& y) { return iter_adaptor_access::distance_to(x,y)>0; } Derived& operator++() { iter_adaptor_access::increment(final()); return final(); } Derived& operator--() { iter_adaptor_access::decrement(final()); return final(); } Derived& operator+=(difference_type n) { iter_adaptor_access::advance(final(),n); return final(); } Derived& operator-=(difference_type n) { iter_adaptor_access::advance(final(),-n); return final(); } friend difference_type operator-(const Derived& x,const Derived& y) { return iter_adaptor_access::distance_to(y,x); } private: Derived& final(){return *static_cast
(this);} const Derived& final()const{return *static_cast
(this);} }; template
bool operator==( const random_access_iter_adaptor_base
& x, const random_access_iter_adaptor_base
& y) { return iter_adaptor_access::equal( static_cast
(x),static_cast
(y)); } template
bool operator<( const random_access_iter_adaptor_base
& x, const random_access_iter_adaptor_base
& y) { return iter_adaptor_access::distance_to( static_cast
(x),static_cast
(y))>0; } template
typename random_access_iter_adaptor_base
::difference_type operator-( const random_access_iter_adaptor_base
& x, const random_access_iter_adaptor_base
& y) { return iter_adaptor_access::distance_to( static_cast
(y),static_cast
(x)); } template<> struct iter_adaptor_selector
{ template
struct apply { typedef random_access_iter_adaptor_base
type; }; }; template
struct iter_adaptor_base { typedef iter_adaptor_selector< typename Base::iterator_category> selector; typedef typename prevent_eti< selector, typename mpl::apply2< selector,Derived,Base>::type >::type type; }; template
class iter_adaptor:public iter_adaptor_base
::type { protected: iter_adaptor(){} explicit iter_adaptor(const Base& b_):b(b_){} const Base& base_reference()const{return b;} Base& base_reference(){return b;} private: Base b; }; } /* namespace multi_index::detail */ } /* namespace multi_index */ } /* namespace boost */ #endif
iter_adaptor.hpp
Page URL
File URL
Prev
23/44
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.