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
// Boost.Signals library // Copyright Douglas Gregor 2001-2004. 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) // For more information, see http://www.boost.org #ifndef BOOST_SIGNALS_NAMED_SLOT_MAP_HPP #define BOOST_SIGNALS_NAMED_SLOT_MAP_HPP #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace BOOST_SIGNALS_NAMESPACE { enum connect_position { at_back, at_front }; namespace detail { class stored_group { public: enum storage_kind { sk_empty, sk_front, sk_back, sk_group }; stored_group(storage_kind kind = sk_empty) : kind(kind), group() { } template
stored_group(const T& group) : kind(sk_group), group(new T(group)) { } bool is_front() const { return kind == sk_front; } bool is_back() const { return kind == sk_back; } bool empty() const { return kind == sk_empty; } void* get() const { return group.get(); } private: storage_kind kind; shared_ptr
group; }; typedef function2
compare_type; // This function object bridges from a pair of any objects that hold // values of type Key to the underlying function object that compares // values of type Key. template
class group_bridge_compare { public: typedef bool result_type; typedef const stored_group& first_argument_type; typedef const stored_group& second_argument_type; group_bridge_compare(const Compare& c) : comp(c) { } bool operator()(const stored_group& k1, const stored_group& k2) const { if (k1.is_front()) return !k2.is_front(); if (k1.is_back()) return false; if (k2.is_front()) return false; if (k2.is_back()) return true; // Neither is empty, so compare their values to order them return comp(*static_cast
(k1.get()), *static_cast
(k2.get())); } private: Compare comp; }; class BOOST_SIGNALS_DECL named_slot_map_iterator : public iterator_facade
{ typedef std::list
group_list; typedef group_list::iterator slot_pair_iterator; typedef std::map
slot_container_type; typedef slot_container_type::iterator group_iterator; typedef slot_container_type::const_iterator const_group_iterator; typedef iterator_facade
inherited; public: named_slot_map_iterator() : slot_assigned(false) { } named_slot_map_iterator(const named_slot_map_iterator& other) : group(other.group), last_group(other.last_group), slot_assigned(other.slot_assigned) { if (slot_assigned) slot_ = other.slot_; } named_slot_map_iterator& operator=(const named_slot_map_iterator& other) { slot_assigned = other.slot_assigned; group = other.group; last_group = other.last_group; if (slot_assigned) slot_ = other.slot_; return *this; } connection_slot_pair& dereference() const { return *slot_; } void increment() { ++slot_; if (slot_ == group->second.end()) { ++group; init_next_group(); } } bool equal(const named_slot_map_iterator& other) const { return (group == other.group && (group == last_group || slot_ == other.slot_)); } #if BOOST_WORKAROUND(_MSC_VER, <= 1500) void decrement(); void advance(difference_type); #endif private: named_slot_map_iterator(group_iterator group, group_iterator last) : group(group), last_group(last), slot_assigned(false) { init_next_group(); } named_slot_map_iterator(group_iterator group, group_iterator last, slot_pair_iterator slot) : group(group), last_group(last), slot_(slot), slot_assigned(true) { } void init_next_group() { while (group != last_group && group->second.empty()) ++group; if (group != last_group) { slot_ = group->second.begin(); slot_assigned = true; } } group_iterator group; group_iterator last_group; slot_pair_iterator slot_; bool slot_assigned; friend class named_slot_map; }; class BOOST_SIGNALS_DECL named_slot_map { public: typedef named_slot_map_iterator iterator; named_slot_map(const compare_type& compare); void clear(); iterator begin(); iterator end(); iterator insert(const stored_group& name, const connection& con, const any& slot, connect_position at); void disconnect(const stored_group& name); void erase(iterator pos); void remove_disconnected_slots(); private: typedef std::list
group_list; typedef std::map
slot_container_type; typedef slot_container_type::iterator group_iterator; typedef slot_container_type::const_iterator const_group_iterator; bool empty(const_group_iterator group) const { return (group->second.empty() && group != groups.begin() && group != back); } slot_container_type groups; group_iterator back; }; } } } #endif // BOOST_SIGNALS_NAMED_SLOT_MAP_HPP
named_slot_map.hpp
Page URL
File URL
Prev
3/6
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.