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) 2003 * John Maddock * * 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) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE u32regex_iterator.hpp * VERSION see
* DESCRIPTION: Provides u32regex_iterator implementation. */ #ifndef BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP #define BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP namespace boost{ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif template
class u32regex_iterator_implementation { typedef u32regex regex_type; match_results
what; // current match BidirectionalIterator base; // start of sequence BidirectionalIterator end; // end of sequence const regex_type re; // the expression match_flag_type flags; // flags for matching public: u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) : base(), end(last), re(*p), flags(f){} bool init(BidirectionalIterator first) { base = first; return u32regex_search(first, end, what, re, flags, base); } bool compare(const u32regex_iterator_implementation& that) { if(this == &that) return true; return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const match_results
& get() { return what; } bool next() { //if(what.prefix().first != what[0].second) // flags |= match_prev_avail; BidirectionalIterator next_start = what[0].second; match_flag_type f(flags); if(!what.length()) f |= regex_constants::match_not_initial_null; //if(base != next_start) // f |= regex_constants::match_not_bob; bool result = u32regex_search(next_start, end, what, re, f, base); if(result) what.set_base(base); return result; } private: u32regex_iterator_implementation& operator=(const u32regex_iterator_implementation&); }; template
class u32regex_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< std::forward_iterator_tag, match_results
, typename re_detail::regex_iterator_traits
::difference_type, const match_results
*, const match_results
& > #endif { private: typedef u32regex_iterator_implementation
impl; typedef shared_ptr
pimpl; public: typedef u32regex regex_type; typedef match_results
value_type; typedef typename re_detail::regex_iterator_traits
::difference_type difference_type; typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; u32regex_iterator(){} u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { if(!pdata->init(a)) { pdata.reset(); } } u32regex_iterator(const u32regex_iterator& that) : pdata(that.pdata) {} u32regex_iterator& operator=(const u32regex_iterator& that) { pdata = that.pdata; return *this; } bool operator==(const u32regex_iterator& that)const { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); return pdata->compare(*(that.pdata.get())); } bool operator!=(const u32regex_iterator& that)const { return !(*this == that); } const value_type& operator*()const { return pdata->get(); } const value_type* operator->()const { return &(pdata->get()); } u32regex_iterator& operator++() { cow(); if(0 == pdata->next()) { pdata.reset(); } return *this; } u32regex_iterator operator++(int) { u32regex_iterator result(*this); ++(*this); return result; } private: pimpl pdata; void cow() { // copy-on-write if(pdata.get() && !pdata.unique()) { pdata.reset(new impl(*(pdata.get()))); } } }; typedef u32regex_iterator
utf8regex_iterator; typedef u32regex_iterator
utf16regex_iterator; typedef u32regex_iterator
utf32regex_iterator; inline u32regex_iterator
make_u32regex_iterator(const char* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator
(p, p+std::strlen(p), e, m); } #ifndef BOOST_NO_WREGEX inline u32regex_iterator
make_u32regex_iterator(const wchar_t* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator
(p, p+std::wcslen(p), e, m); } #endif #ifndef U_WCHAR_IS_UTF16 inline u32regex_iterator
make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator
(p, p+u_strlen(p), e, m); } #endif template
inline u32regex_iterator
::const_iterator> make_u32regex_iterator(const std::basic_string
& p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { typedef typename std::basic_string
::const_iterator iter_type; return u32regex_iterator
(p.begin(), p.end(), e, m); } inline u32regex_iterator
make_u32regex_iterator(const UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator
(s.getBuffer(), s.getBuffer() + s.length(), e, m); } #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP
u32regex_iterator.hpp
Page URL
File URL
Prev
41/43
Next
Download
( 6 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.