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) 2004 * 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 regex_traits_defaults.hpp * VERSION see
* DESCRIPTION: Declares API's for access to regex_traits default properties. */ #ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED #define BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED #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 #ifndef BOOST_REGEX_SYNTAX_TYPE_HPP #include
#endif #ifndef BOOST_REGEX_ERROR_TYPE_HPP #include
#endif #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::strlen; } #endif namespace boost{ namespace re_detail{ // // helpers to suppress warnings: // template
inline bool is_extended(charT c) { return c > 256; } inline bool is_extended(char) { return false; } BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_type n); BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n); BOOST_REGEX_DECL regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(char c); BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_syntax_type(char c); // is charT c a combining character? BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining_implementation(uint_least16_t s); template
inline bool is_combining(charT c) { return (c <= static_cast
(0)) ? false : ((c >= static_cast
((std::numeric_limits
::max)())) ? false : is_combining_implementation(static_cast
(c))); } template <> inline bool is_combining
(char) { return false; } template <> inline bool is_combining
(signed char) { return false; } template <> inline bool is_combining
(unsigned char) { return false; } #ifndef __hpux // can't use WCHAR_MAX/MIN in pp-directives #ifdef _MSC_VER template<> inline bool is_combining
(wchar_t c) { return is_combining_implementation(static_cast
(c)); } #elif !defined(__DECCXX) && !defined(__osf__) && !defined(__OSF__) && defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) #if defined(WCHAR_MAX) && (WCHAR_MAX <= USHRT_MAX) template<> inline bool is_combining
(wchar_t c) { return is_combining_implementation(static_cast
(c)); } #else template<> inline bool is_combining
(wchar_t c) { return (c >= (std::numeric_limits
::max)()) ? false : is_combining_implementation(static_cast
(c)); } #endif #endif #endif // // is a charT c a line separator? // template
inline bool is_separator(charT c) { return BOOST_REGEX_MAKE_BOOL( (c == static_cast
('\n')) || (c == static_cast
('\r')) || (c == static_cast
('\f')) || (static_cast
(c) == 0x2028u) || (static_cast
(c) == 0x2029u) || (static_cast
(c) == 0x85u)); } template <> inline bool is_separator
(char c) { return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r') || (c == '\f')); } // // get a default collating element: // BOOST_REGEX_DECL std::string BOOST_REGEX_CALL lookup_default_collate_name(const std::string& name); // // get the id of a character clasification, the individual // traits classes then transform that id into a bitmask: // template
struct character_pointer_range { const charT* p1; const charT* p2; bool operator < (const character_pointer_range& r)const { return std::lexicographical_compare(p1, p2, r.p1, r.p2); } bool operator == (const character_pointer_range& r)const { // Not only do we check that the ranges are of equal size before // calling std::equal, but there is no other algorithm available: // not even a non-standard MS one. So forward to unchecked_equal // in the MS case. return ((p2 - p1) == (r.p2 - r.p1)) && re_detail::equal(p1, p2, r.p1); } }; template
int get_default_class_id(const charT* p1, const charT* p2) { static const charT data[72] = { 'a', 'l', 'n', 'u', 'm', 'a', 'l', 'p', 'h', 'a', 'b', 'l', 'a', 'n', 'k', 'c', 'n', 't', 'r', 'l', 'd', 'i', 'g', 'i', 't', 'g', 'r', 'a', 'p', 'h', 'l', 'o', 'w', 'e', 'r', 'p', 'r', 'i', 'n', 't', 'p', 'u', 'n', 'c', 't', 's', 'p', 'a', 'c', 'e', 'u', 'n', 'i', 'c', 'o', 'd', 'e', 'u', 'p', 'p', 'e', 'r', 'w', 'o', 'r', 'd', 'x', 'd', 'i', 'g', 'i', 't', }; static const character_pointer_range
ranges[19] = { {data+0, data+5,}, // alnum {data+5, data+10,}, // alpha {data+10, data+15,}, // blank {data+15, data+20,}, // cntrl {data+20, data+21,}, // d {data+20, data+25,}, // digit {data+25, data+30,}, // graph {data+30, data+31,}, // l {data+30, data+35,}, // lower {data+35, data+40,}, // print {data+40, data+45,}, // punct {data+45, data+46,}, // s {data+45, data+50,}, // space {data+57, data+58,}, // u {data+50, data+57,}, // unicode {data+57, data+62,}, // upper {data+62, data+63,}, // w {data+62, data+66,}, // word {data+66, data+72,}, // xdigit }; static const character_pointer_range
* ranges_begin = ranges; static const character_pointer_range
* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0])); character_pointer_range
t = { p1, p2, }; const character_pointer_range
* p = std::lower_bound(ranges_begin, ranges_end, t); if((p != ranges_end) && (t == *p)) return static_cast
(p - ranges); return -1; } // // helper functions: // template
std::ptrdiff_t global_length(const charT* p) { std::ptrdiff_t n = 0; while(*p) { ++p; ++n; } return n; } template<> inline std::ptrdiff_t global_length
(const char* p) { return (std::strlen)(p); } #ifndef BOOST_NO_WREGEX template<> inline std::ptrdiff_t global_length
(const wchar_t* p) { return (std::wcslen)(p); } #endif template
inline charT BOOST_REGEX_CALL global_lower(charT c) { return c; } template
inline charT BOOST_REGEX_CALL global_upper(charT c) { return c; } BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_lower(char c); BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_upper(char c); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_lower(wchar_t c); BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c); #endif #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_lower(unsigned short c); BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_upper(unsigned short c); #endif // // This sucks: declare template specialisations of global_lower/global_upper // that just forward to the non-template implementation functions. We do // this because there is one compiler (Compaq Tru64 C++) that doesn't seem // to differentiate between templates and non-template overloads.... // what's more, the primary template, plus all overloads have to be // defined in the same translation unit (if one is inline they all must be) // otherwise the "local template instantiation" compiler option can pick // the wrong instantiation when linking: // template<> inline char BOOST_REGEX_CALL global_lower
(char c){ return do_global_lower(c); } template<> inline char BOOST_REGEX_CALL global_upper
(char c){ return do_global_upper(c); } #ifndef BOOST_NO_WREGEX template<> inline wchar_t BOOST_REGEX_CALL global_lower
(wchar_t c){ return do_global_lower(c); } template<> inline wchar_t BOOST_REGEX_CALL global_upper
(wchar_t c){ return do_global_upper(c); } #endif #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T template<> inline unsigned short BOOST_REGEX_CALL global_lower
(unsigned short c){ return do_global_lower(c); } template<> inline unsigned short BOOST_REGEX_CALL global_upper
(unsigned short c){ return do_global_upper(c); } #endif template
int global_value(charT c) { static const charT zero = '0'; static const charT nine = '9'; static const charT a = 'a'; static const charT f = 'f'; static const charT A = 'A'; static const charT F = 'F'; if(c > f) return -1; if(c >= a) return 10 + (c - a); if(c > F) return -1; if(c >= A) return 10 + (c - A); if(c > nine) return -1; if(c >= zero) return c - zero; return -1; } template
int global_toi(const charT*& p1, const charT* p2, int radix, const traits& t) { (void)t; // warning suppression int next_value = t.value(*p1, radix); if((p1 == p2) || (next_value < 0) || (next_value >= radix)) return -1; int result = 0; while(p1 != p2) { next_value = t.value(*p1, radix); if((next_value < 0) || (next_value >= radix)) break; result *= radix; result += next_value; ++p1; } return result; } } // re_detail } // 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
regex_traits_defaults.hpp
Page URL
File URL
Prev
36/43
Next
Download
( 9 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.