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 2005-2007 Adobe Systems Incorporated Use, modification and distribution are 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). See http://opensource.adobe.com/gil for most recent version including documentation. */ /*************************************************************************************************/ #ifndef GIL_POSITION_ITERATOR_HPP #define GIL_POSITION_ITERATOR_HPP //////////////////////////////////////////////////////////////////////////////////////// /// \file /// \brief Locator for virtual image views /// \author Lubomir Bourdev and Hailin Jin \n /// Adobe Systems Incorporated /// \date 2005-2007 \n Last updated on February 12, 2007 /// //////////////////////////////////////////////////////////////////////////////////////// #include
#include "locator.hpp" namespace boost { namespace gil { /// \defgroup PixelIteratorModelVirtual position_iterator /// \ingroup PixelIteratorModel /// \brief An iterator that remembers its current X,Y position and invokes a function object with it upon dereferencing. Models PixelIteratorConcept, PixelBasedConcept, HasDynamicXStepTypeConcept. Used to create virtual image views. /// \brief An iterator that remembers its current X,Y position and invokes a function object with it upon dereferencing. Models PixelIteratorConcept. Used to create virtual image views. /// Models: StepIteratorConcept, PixelIteratorConcept, PixelBasedConcept, HasDynamicXStepTypeConcept /// \ingroup PixelIteratorModelVirtual PixelBasedModel template
// the dimension to advance along struct position_iterator : public iterator_facade
, typename Deref::value_type, random_access_traversal_tag, typename Deref::reference, typename Deref::argument_type::template axis
::coord_t> { typedef iterator_facade
, typename Deref::value_type, random_access_traversal_tag, typename Deref::reference, typename Deref::argument_type::template axis
::coord_t> parent_t; typedef typename parent_t::difference_type difference_type; typedef typename parent_t::reference reference; typedef typename Deref::argument_type point_t; position_iterator() {} position_iterator(const point_t& p, const point_t& step, const Deref& d) : _p(p), _step(step), _d(d) {} position_iterator(const position_iterator& p) : _p(p._p), _step(p._step), _d(p._d) {} template
position_iterator(const position_iterator
& p) : _p(p._p), _step(p._step), _d(p._d) {} position_iterator& operator=(const position_iterator& p) { _p=p._p; _d=p._d; _step=p._step; return *this; } const point_t& pos() const { return _p; } const point_t& step() const { return _step; } const Deref& deref_fn() const { return _d; } void set_step(difference_type s) { _step[Dim]=s; } /// For some reason operator[] provided by iterator_adaptor returns a custom class that is convertible to reference /// We require our own reference because it is registered in iterator_traits reference operator[](difference_type d) const { point_t p=_p; p[Dim]+=d*_step[Dim]; return _d(p); } private: point_t _p, _step; Deref _d; template
friend struct position_iterator; friend class boost::iterator_core_access; reference dereference() const { return _d(_p); } void increment() { _p[Dim]+=_step[Dim]; } void decrement() { _p[Dim]-=_step[Dim]; } void advance(difference_type d) { _p[Dim]+=d*_step[Dim]; } difference_type distance_to(const position_iterator& it) const { return (it._p[Dim]-_p[Dim])/_step[Dim]; } bool equal(const position_iterator& it) const { return _p==it._p; } }; template
struct const_iterator_type
> { typedef position_iterator
type; }; template
struct iterator_is_mutable
> : public mpl::bool_
{ }; ///////////////////////////// // PixelBasedConcept ///////////////////////////// template
struct color_space_type
> : public color_space_type
{}; template
struct channel_mapping_type
> : public channel_mapping_type
{}; template
struct is_planar
> : public mpl::false_ {}; template
struct channel_type
> : public channel_type
{}; ///////////////////////////// // HasDynamicXStepTypeConcept ///////////////////////////// template
struct dynamic_x_step_type
> { typedef position_iterator
type; }; } } // namespace boost::gil #endif
position_iterator.hpp
Page URL
File URL
Prev
28/34
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.