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) 1998-2002 * 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 sub_match.cpp * VERSION see
* DESCRIPTION: Declares template class sub_match. */ #ifndef BOOST_REGEX_V4_SUB_MATCH_HPP #define BOOST_REGEX_V4_SUB_MATCH_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ template
struct sub_match : public std::pair
{ typedef typename re_detail::regex_iterator_traits
::value_type value_type; #if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef std::ptrdiff_t difference_type; #else typedef typename re_detail::regex_iterator_traits
::difference_type difference_type; #endif typedef BidiIterator iterator_type; typedef BidiIterator iterator; typedef BidiIterator const_iterator; bool matched; sub_match() : std::pair
(), matched(false) {} sub_match(BidiIterator i) : std::pair
(i, i), matched(false) {} #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1310)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)\ && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) template
operator std::basic_string
()const { return std::basic_string
(this->first, this->second); } #else operator std::basic_string
()const { return str(); } #endif difference_type BOOST_REGEX_CALL length()const { difference_type n = ::boost::re_detail::distance((BidiIterator)this->first, (BidiIterator)this->second); return n; } std::basic_string
str()const { std::basic_string
result; std::size_t len = ::boost::re_detail::distance((BidiIterator)this->first, (BidiIterator)this->second); result.reserve(len); BidiIterator i = this->first; while(i != this->second) { result.append(1, *i); ++i; } return result; } int compare(const sub_match& s)const { if(matched != s.matched) return static_cast
(matched) - static_cast
(s.matched); return str().compare(s.str()); } int compare(const std::basic_string
& s)const { return str().compare(s); } int compare(const value_type* p)const { return str().compare(p); } bool operator==(const sub_match& that)const { return compare(that) == 0; } bool BOOST_REGEX_CALL operator !=(const sub_match& that)const { return compare(that) != 0; } bool operator<(const sub_match& that)const { return compare(that) < 0; } bool operator>(const sub_match& that)const { return compare(that) > 0; } bool operator<=(const sub_match& that)const { return compare(that) <= 0; } bool operator>=(const sub_match& that)const { return compare(that) >= 0; } #ifdef BOOST_REGEX_MATCH_EXTRA typedef std::vector
> capture_sequence_type; const capture_sequence_type& captures()const { if(!m_captures) m_captures.reset(new capture_sequence_type()); return *m_captures; } // // Private implementation API: DO NOT USE! // capture_sequence_type& get_captures()const { if(!m_captures) m_captures.reset(new capture_sequence_type()); return *m_captures; } private: mutable boost::scoped_ptr
m_captures; public: #endif sub_match(const sub_match& that, bool #ifdef BOOST_REGEX_MATCH_EXTRA deep_copy #endif = true ) : std::pair
(that), matched(that.matched) { #ifdef BOOST_REGEX_MATCH_EXTRA if(that.m_captures) if(deep_copy) m_captures.reset(new capture_sequence_type(*(that.m_captures))); #endif } sub_match& operator=(const sub_match& that) { this->first = that.first; this->second = that.second; matched = that.matched; #ifdef BOOST_REGEX_MATCH_EXTRA if(that.m_captures) get_captures() = *(that.m_captures); #endif return *this; } #ifdef BOOST_OLD_REGEX_H // // the following are deprecated, do not use!! // operator int()const; operator unsigned int()const; operator short()const { return (short)(int)(*this); } operator unsigned short()const { return (unsigned short)(unsigned int)(*this); } #endif }; typedef sub_match
csub_match; typedef sub_match
ssub_match; #ifndef BOOST_NO_WREGEX typedef sub_match
wcsub_match; typedef sub_match
wssub_match; #endif // comparison to std::basic_string<> part 1: template
inline bool operator == (const std::basic_string
::value_type, traits, Allocator>& s, const sub_match
& m) { return s.compare(m.str()) == 0; } template
inline bool operator != (const std::basic_string
::value_type, traits, Allocator>& s, const sub_match
& m) { return s.compare(m.str()) != 0; } template
inline bool operator < (const std::basic_string
::value_type, traits, Allocator>& s, const sub_match
& m) { return s.compare(m.str()) < 0; } template
inline bool operator <= (const std::basic_string
::value_type, traits, Allocator>& s, const sub_match
& m) { return s.compare(m.str()) <= 0; } template
inline bool operator >= (const std::basic_string
::value_type, traits, Allocator>& s, const sub_match
& m) { return s.compare(m.str()) >= 0; } template
inline bool operator > (const std::basic_string
::value_type, traits, Allocator>& s, const sub_match
& m) { return s.compare(m.str()) > 0; } // comparison to std::basic_string<> part 2: template
inline bool operator == (const sub_match
& m, const std::basic_string
::value_type, traits, Allocator>& s) { return m.str().compare(s) == 0; } template
inline bool operator != (const sub_match
& m, const std::basic_string
::value_type, traits, Allocator>& s) { return m.str().compare(s) != 0; } template
inline bool operator < (const sub_match
& m, const std::basic_string
::value_type, traits, Allocator>& s) { return m.str().compare(s) < 0; } template
inline bool operator > (const sub_match
& m, const std::basic_string
::value_type, traits, Allocator>& s) { return m.str().compare(s) > 0; } template
inline bool operator <= (const sub_match
& m, const std::basic_string
::value_type, traits, Allocator>& s) { return m.str().compare(s) <= 0; } template
inline bool operator >= (const sub_match
& m, const std::basic_string
::value_type, traits, Allocator>& s) { return m.str().compare(s) >= 0; } // comparison to const charT* part 1: template
inline bool operator == (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const* s) { return m.str().compare(s) == 0; } template
inline bool operator != (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const* s) { return m.str().compare(s) != 0; } template
inline bool operator > (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const* s) { return m.str().compare(s) > 0; } template
inline bool operator < (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const* s) { return m.str().compare(s) < 0; } template
inline bool operator >= (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const* s) { return m.str().compare(s) >= 0; } template
inline bool operator <= (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const* s) { return m.str().compare(s) <= 0; } // comparison to const charT* part 2: template
inline bool operator == (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { return m.str().compare(s) == 0; } template
inline bool operator != (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { return m.str().compare(s) != 0; } template
inline bool operator < (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { return m.str().compare(s) > 0; } template
inline bool operator > (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { return m.str().compare(s) < 0; } template
inline bool operator <= (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { return m.str().compare(s) >= 0; } template
inline bool operator >= (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { return m.str().compare(s) <= 0; } // comparison to const charT& part 1: template
inline bool operator == (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) == 0; } template
inline bool operator != (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) != 0; } template
inline bool operator > (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) > 0; } template
inline bool operator < (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) < 0; } template
inline bool operator >= (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) >= 0; } template
inline bool operator <= (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) <= 0; } // comparison to const charT* part 2: template
inline bool operator == (typename re_detail::regex_iterator_traits
::value_type const& s, const sub_match
& m) { return m.str().compare(0, m.length(), &s, 1) == 0; } template
inline bool operator != (typename re_detail::regex_iterator_traits
::value_type const& s, const sub_match
& m) { return m.str().compare(0, m.length(), &s, 1) != 0; } template
inline bool operator < (typename re_detail::regex_iterator_traits
::value_type const& s, const sub_match
& m) { return m.str().compare(0, m.length(), &s, 1) > 0; } template
inline bool operator > (typename re_detail::regex_iterator_traits
::value_type const& s, const sub_match
& m) { return m.str().compare(0, m.length(), &s, 1) < 0; } template
inline bool operator <= (typename re_detail::regex_iterator_traits
::value_type const& s, const sub_match
& m) { return m.str().compare(0, m.length(), &s, 1) >= 0; } template
inline bool operator >= (typename re_detail::regex_iterator_traits
::value_type const& s, const sub_match
& m) { return m.str().compare(0, m.length(), &s, 1) <= 0; } // addition operators: template
inline std::basic_string
::value_type, traits, Allocator> operator + (const std::basic_string
::value_type, traits, Allocator>& s, const sub_match
& m) { std::basic_string
::value_type, traits, Allocator> result; result.reserve(s.size() + m.length() + 1); return result.append(s).append(m.first, m.second); } template
inline std::basic_string
::value_type, traits, Allocator> operator + (const sub_match
& m, const std::basic_string
::value_type, traits, Allocator>& s) { std::basic_string
::value_type, traits, Allocator> result; result.reserve(s.size() + m.length() + 1); return result.append(m.first, m.second).append(s); } #if !(defined(__GNUC__) && defined(BOOST_NO_STD_LOCALE)) template
inline std::basic_string
::value_type> operator + (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { std::basic_string
::value_type> result; result.reserve(std::char_traits
::value_type>::length(s) + m.length() + 1); return result.append(s).append(m.first, m.second); } template
inline std::basic_string
::value_type> operator + (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const * s) { std::basic_string
::value_type> result; result.reserve(std::char_traits
::value_type>::length(s) + m.length() + 1); return result.append(m.first, m.second).append(s); } #else // worwaround versions: template
inline std::basic_string
::value_type> operator + (typename re_detail::regex_iterator_traits
::value_type const* s, const sub_match
& m) { return s + m.str(); } template
inline std::basic_string
::value_type> operator + (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const * s) { return m.str() + s; } #endif template
inline std::basic_string
::value_type> operator + (typename re_detail::regex_iterator_traits
::value_type const& s, const sub_match
& m) { std::basic_string
::value_type> result; result.reserve(m.length() + 2); return result.append(1, s).append(m.first, m.second); } template
inline std::basic_string
::value_type> operator + (const sub_match
& m, typename re_detail::regex_iterator_traits
::value_type const& s) { std::basic_string
::value_type> result; result.reserve(m.length() + 2); return result.append(m.first, m.second).append(1, s); } template
inline std::basic_string
::value_type> operator + (const sub_match
& m1, const sub_match
& m2) { std::basic_string
::value_type> result; result.reserve(m1.length() + m2.length() + 1); return result.append(m1.first, m1.second).append(m2.first, m2.second); } #ifndef BOOST_NO_STD_LOCALE template
std::basic_ostream
& operator << (std::basic_ostream
& os, const sub_match
& s) { return (os << s.str()); } #else template
std::ostream& operator << (std::ostream& os, const sub_match
& s) { return (os << s.str()); } #endif #ifdef BOOST_OLD_REGEX_H namespace re_detail{ template
int do_toi(BidiIterator i, BidiIterator j, char c, int radix) { std::string s(i, j); char* p; int result = std::strtol(s.c_str(), &p, radix); if(*p)raise_regex_exception("Bad sub-expression"); return result; } // // helper: template
int do_toi(I& i, I j, charT c) { int result = 0; while((i != j) && (isdigit(*i))) { result = result*10 + (*i - '0'); ++i; } return result; } } template
sub_match
::operator int()const { BidiIterator i = first; BidiIterator j = second; if(i == j)raise_regex_exception("Bad sub-expression"); int neg = 1; if((i != j) && (*i == '-')) { neg = -1; ++i; } neg *= re_detail::do_toi(i, j, *i); if(i != j)raise_regex_exception("Bad sub-expression"); return neg; } template
sub_match
::operator unsigned int()const { BidiIterator i = first; BidiIterator j = second; if(i == j) raise_regex_exception("Bad sub-expression"); return re_detail::do_toi(i, j, *first); } #endif } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif
sub_match.hpp
Page URL
File URL
Prev
39/43
Next
Download
( 22 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.