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 (C) Vladimir Prus 2003. // 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/graph/vector_property_map.html for // documentation. // #ifndef VECTOR_PROPERTY_MAP_HPP_VP_2003_03_04 #define VECTOR_PROPERTY_MAP_HPP_VP_2003_03_04 #include
#include
#include
namespace boost { template
class vector_property_map : public boost::put_get_helper< typename std::iterator_traits< typename std::vector
::iterator >::reference, vector_property_map
> { public: typedef typename property_traits
::key_type key_type; typedef T value_type; typedef typename std::iterator_traits< typename std::vector
::iterator >::reference reference; typedef boost::lvalue_property_map_tag category; vector_property_map(const IndexMap& index = IndexMap()) : store(new std::vector
()), index(index) {} vector_property_map(unsigned initial_size, const IndexMap& index = IndexMap()) : store(new std::vector
(initial_size)), index(index) {} typename std::vector
::iterator storage_begin() { return store->begin(); } typename std::vector
::iterator storage_end() { return store->end(); } typename std::vector
::const_iterator storage_begin() const { return store->begin(); } typename std::vector
::const_iterator storage_end() const { return store->end(); } public: // Copy ctor absent, default semantics is OK. // Assignment operator absent, default semantics is OK. // CONSIDER: not sure that assignment to 'index' is correct. reference operator[](const key_type& v) const { typename property_traits
::value_type i = get(index, v); if (static_cast
(i) >= store->size()) { store->resize(i + 1, T()); } return (*store)[i]; } private: // Conceptually, we have a vector of infinite size. For practical // purposes, we start with an empty vector and grow it as needed. // Note that we cannot store pointer to vector here -- we cannot // store pointer to data, because if copy of property map resizes // the vector, the pointer to data will be invalidated. // I wonder if class 'pmap_ref' is simply needed. shared_ptr< std::vector
> store; IndexMap index; }; template
vector_property_map
make_vector_property_map(IndexMap index) { return vector_property_map
(index); } } #endif
vector_property_map.hpp
Page URL
File URL
Prev
109/113
Next
Download
( 3 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.