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
///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2007. // // 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/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// #ifndef BOOST_INTRUSIVE_TREE_NODE_HPP #define BOOST_INTRUSIVE_TREE_NODE_HPP #include
#include
#include
#include
namespace boost { namespace intrusive { template
struct tree_node { typedef typename pointer_to_other
>::type node_ptr; node_ptr parent_, left_, right_; }; template
struct tree_node_traits { typedef tree_node
node; typedef typename boost::pointer_to_other
::type node_ptr; typedef typename boost::pointer_to_other
::type const_node_ptr; static node_ptr get_parent(const_node_ptr n) { return n->parent_; } static void set_parent(node_ptr n, node_ptr p) { n->parent_ = p; } static node_ptr get_left(const_node_ptr n) { return n->left_; } static void set_left(node_ptr n, node_ptr l) { n->left_ = l; } static node_ptr get_right(const_node_ptr n) { return n->right_; } static void set_right(node_ptr n, node_ptr r) { n->right_ = r; } }; ///////////////////////////////////////////////////////////////////////////// // // // Implementation of the tree iterator // // // ///////////////////////////////////////////////////////////////////////////// // tree_iterator provides some basic functions for a // node oriented bidirectional iterator: template
class tree_iterator : public std::iterator < std::bidirectional_iterator_tag , typename detail::add_const_if_c
::type > { protected: typedef typename Container::real_value_traits real_value_traits; typedef typename Container::node_algorithms node_algorithms; typedef typename real_value_traits::node_traits node_traits; typedef typename node_traits::node node; typedef typename node_traits::node_ptr node_ptr; typedef typename boost::pointer_to_other
::type void_pointer; static const bool store_container_ptr = detail::store_cont_ptr_on_it
::value; public: public: typedef typename detail::add_const_if_c
::type value_type; typedef value_type & reference; typedef value_type * pointer; tree_iterator() : members_ (0, 0) {} explicit tree_iterator(node_ptr node, const Container *cont_ptr) : members_ (node, cont_ptr) {} tree_iterator(tree_iterator
const& other) : members_(other.pointed_node(), other.get_container()) {} const node_ptr &pointed_node() const { return members_.nodeptr_; } tree_iterator &operator=(const node_ptr &node) { members_.nodeptr_ = node; return static_cast
(*this); } public: tree_iterator& operator++() { members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_); return static_cast
(*this); } tree_iterator operator++(int) { tree_iterator result (*this); members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_); return result; } tree_iterator& operator--() { members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_); return static_cast
(*this); } tree_iterator operator--(int) { tree_iterator result (*this); members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_); return result; } bool operator== (const tree_iterator& i) const { return members_.nodeptr_ == i.pointed_node(); } bool operator!= (const tree_iterator& i) const { return !operator== (i); } value_type& operator*() const { return *operator->(); } pointer operator->() const { return detail::get_pointer(this->get_real_value_traits()->to_value_ptr(members_.nodeptr_)); } const Container *get_container() const { if(store_container_ptr) return static_cast
(members_.get_ptr()); else return 0; } const real_value_traits *get_real_value_traits() const { if(store_container_ptr) return &this->get_container()->get_real_value_traits(); else return 0; } private: struct members : public detail::select_constptr
::type { typedef typename detail::select_constptr
::type Base; members(const node_ptr &n_ptr, const void *cont) : Base(cont), nodeptr_(n_ptr) {} node_ptr nodeptr_; } members_; }; } //namespace intrusive } //namespace boost #include
#endif //BOOST_INTRUSIVE_TREE_NODE_HPP
tree_node.hpp
Page URL
File URL
Prev
17/18
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.