2
3
4
5
6
7
8
9
10
11
12
13
16#ifndef _PCRE2CPP_PCRE2_DATA_HPP_
17 #define _PCRE2CPP_PCRE2_DATA_HPP_
19 #include <pcre2cpp/config.hpp>
22_PCRE2CPP_ERROR(
"This is only available for c++17 and greater!");
24 #include <pcre2cpp/types.hpp>
28
29
30
47
48
49
53 #elif _PCRE2CPP_HAS_UTF16
55 #elif _PCRE2CPP_HAS_UTF32
63
64
65
66
73
74
75
94 #pragma region PCRE2_STRING
101 #pragma region CPP_STRING
117 #pragma region SUB_MATCHES
122 #pragma region UTF_INFO
129 #pragma region CODE_FUNCTIONS
138 #pragma region MATCH_DATA_FUNCTIONS
146 #pragma region MATCH_FUNCTIONS
153 #pragma region OVECTOR_FUNCTIONS
162 #pragma region ERROR_FUNCTIONS
168 #pragma region PATTERN_INFO_FUNCTIONS
174 #pragma region SUBSTRING_FUNCTIONS
184 #pragma region UTF_16
188
189
190
209 #pragma region PCRE2_STRING
216 #pragma region CPP_STRING
225 #pragma region SUB_MATCHES
230 #pragma region UTF_INFO
237 #pragma region CODE_FUNCTIONS
246 #pragma region MATCH_DATA_FUNCTIONS
254 #pragma region MATCH_FUNCTIONS
261 #pragma region OVECTOR_FUNCTIONS
270 #pragma region ERROR_FUNCTIONS
276 #pragma region PATTERN_INFO_FUNCTIONS
282 #pragma region SUBSTRING_FUNCTIONS
292 #pragma region UTF_32
296
297
298
317 #pragma region PCRE2_STRING
324 #pragma region CPP_STRING
333 #pragma region SUB_MATCHES
338 #pragma region UTF_INFO
345 #pragma region CODE_FUNCTIONS
354 #pragma region MATCH_DATA_FUNCTIONS
362 #pragma region MATCH_FUNCTIONS
369 #pragma region OVECTOR_FUNCTIONS
378 #pragma region ERROR_FUNCTIONS
384 #pragma region PATTERN_INFO_FUNCTIONS
390 #pragma region SUBSTRING_FUNCTIONS
base pcre2cpp exception class
Definition exceptions.hpp:134
static constexpr auto default_utf_type
default utf type for types like regex etc...
Definition pcre2_data.hpp:50
utf_type
Enum with supported utf types.
Definition pcre2_data.hpp:31
@ UTF_16
value for UTF-16 support
Definition pcre2_data.hpp:38
@ UTF_32
value for UTF-32 support
Definition pcre2_data.hpp:42
@ UTF_8
value for UTF-8 support
Definition pcre2_data.hpp:34
#define _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17
adds constexpr to pcre2 function pointers only if pcre2 is static library
Definition config.hpp:270
#define _PCRE2CPP_CONSTEXPR17
constexpr for c++17 and higher
Definition config.hpp:236
#define _PCRE2CPP_HAS_UTF32
check if support for UTF-32 is enabled
Definition config.hpp:215
#define _PCRE2CPP_HAS_CXX17
check if compiler has c++ version greater or equal to c++17
Definition config.hpp:133
#define _PCRE2CPP_HAS_UTF8
check if support for UTF-8 is enabled
Definition config.hpp:203
#define _PCRE2CPP_HAS_UTF16
check if support for UTF-16 is enabled
Definition config.hpp:209
pcre2_data< utf_type::UTF_8 > u8pcre2_data
Definition pcre2_data.hpp:401
pcre2_data< utf_type::UTF_32 > u32pcre2_data
Definition pcre2_data.hpp:407
pcre2_data< utf_type::UTF_16 > u16pcre2_data
Definition pcre2_data.hpp:404
Specialization of Translation container from pcre2 library to pcre2cpp for UTF-16.
Definition pcre2_data.hpp:192
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< code_type *(sptr_type, size_t, uint32_t, int *, size_t *, compile_ctx_type *)> compile
pointer to pcre2_compile function for utf-16
Definition pcre2_data.hpp:241
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(int, uchar_type *, size_t)> get_error_message
pointer to pcre2_get_error_message function for utf-16
Definition pcre2_data.hpp:272
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< uint32_t(match_data_type *)> get_ovector_count
pointer to pcre2_get_ovector_count function for utf-16
Definition pcre2_data.hpp:266
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, uint32_t, void *)> get_info
pointer to pcre2_pattern_info function for utf-16
Definition pcre2_data.hpp:278
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< match_data_type *(const code_type *, general_ctx_type *)> match_data_from_pattern
pointer to pcre2_match_data_create_from_pattern function for utf-16
Definition pcre2_data.hpp:249
static _PCRE2CPP_CONSTEXPR17 utf_type uft
utf enum value for utf-16
Definition pcre2_data.hpp:232
static _PCRE2CPP_CONSTEXPR17 size_t utf_size
utf byte size for utf-16
Definition pcre2_data.hpp:234
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< size_t *(match_data_type *)> get_ovector_ptr
pointer to pcre2_get_ovector_pointer function for utf-16
Definition pcre2_data.hpp:263
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< void(match_data_type *)> match_data_free
pointer to pcre2_match_data_free function for utf-16
Definition pcre2_data.hpp:251
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< void(code_type *)> code_free
pointer to pcre2_code_free function for utf-16
Definition pcre2_data.hpp:243
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, sptr_type)> substring_number_from_name
pointer to pcre2_substring_number_from_name function for utf-16
Definition pcre2_data.hpp:284
std::u16string string_type
cpp string type for utf-16
Definition pcre2_data.hpp:218
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, sptr_type, size_t, size_t, uint32_t, match_data_type *, match_ctx_type *)> match
pointer to pcre2_match function for utf-16
Definition pcre2_data.hpp:258
Specialization of Translation container from pcre2 library to pcre2cpp for UTF-32.
Definition pcre2_data.hpp:300
static _PCRE2CPP_CONSTEXPR17 utf_type uft
utf enum value for utf-32
Definition pcre2_data.hpp:340
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< match_data_type *(const code_type *, general_ctx_type *)> match_data_from_pattern
pointer to pcre2_match_data_create_from_pattern function for utf-32
Definition pcre2_data.hpp:357
static _PCRE2CPP_CONSTEXPR17 size_t utf_size
utf byte size for utf-32
Definition pcre2_data.hpp:342
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, sptr_type)> substring_number_from_name
pointer to pcre2_substring_number_from_name function for utf-32
Definition pcre2_data.hpp:392
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< void(match_data_type *)> match_data_free
pointer to pcre2_match_data_free function for utf-32
Definition pcre2_data.hpp:359
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< void(code_type *)> code_free
pointer to pcre2_code_free function for utf-32
Definition pcre2_data.hpp:351
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, uint32_t, void *)> get_info
pointer to pcre2_pattern_info function for utf-32
Definition pcre2_data.hpp:386
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< size_t *(match_data_type *)> get_ovector_ptr
pointer to pcre2_get_ovector_pointer function for utf-32
Definition pcre2_data.hpp:371
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(int, uchar_type *, size_t)> get_error_message
pointer to pcre2_get_error_message function for utf-32
Definition pcre2_data.hpp:380
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, sptr_type, size_t, size_t, uint32_t, match_data_type *, match_ctx_type *)> match
pointer to pcre2_match function for utf-32
Definition pcre2_data.hpp:366
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< uint32_t(match_data_type *)> get_ovector_count
pointer to pcre2_get_ovector_count function for utf-32
Definition pcre2_data.hpp:374
std::u32string string_type
cpp string type for utf-32
Definition pcre2_data.hpp:326
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< code_type *(sptr_type, size_t, uint32_t, int *, size_t *, compile_ctx_type *)> compile
pointer to pcre2_compile function for utf-32
Definition pcre2_data.hpp:349
Specialization of Translation container from pcre2 library to pcre2cpp for UTF-8.
Definition pcre2_data.hpp:77
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< match_data_type *(const code_type *, general_ctx_type *)> match_data_from_pattern
pointer to pcre2_match_data_create_from_pattern function for utf-8
Definition pcre2_data.hpp:141
static _PCRE2CPP_CONSTEXPR17 size_t utf_size
utf byte size for utf-8
Definition pcre2_data.hpp:126
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< size_t *(match_data_type *)> get_ovector_ptr
pointer to pcre2_get_ovector_pointer function for utf-8
Definition pcre2_data.hpp:155
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(int, uchar_type *, size_t)> get_error_message
pointer to pcre2_get_error_message function for utf-8
Definition pcre2_data.hpp:164
static _PCRE2CPP_CONSTEXPR17 utf_type uft
utf enum value for utf-8
Definition pcre2_data.hpp:124
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< uint32_t(match_data_type *)> get_ovector_count
pointer to pcre2_get_ovector_count function for utf-8
Definition pcre2_data.hpp:158
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< code_type *(sptr_type, size_t, uint32_t, int *, size_t *, compile_ctx_type *)> compile
pointer to pcre2_compile function for utf-8
Definition pcre2_data.hpp:133
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, sptr_type)> substring_number_from_name
pointer to pcre2_substring_number_from_name function for utf-8
Definition pcre2_data.hpp:176
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< void(code_type *)> code_free
pointer to pcre2_code_free function for utf-8
Definition pcre2_data.hpp:135
std::string string_type
cpp string type for utf-8
Definition pcre2_data.hpp:110
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, sptr_type, size_t, size_t, uint32_t, match_data_type *, match_ctx_type *)> match
pointer to pcre2_match function for utf-8
Definition pcre2_data.hpp:150
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< void(match_data_type *)> match_data_free
pointer to pcre2_match_data_free function for utf-8
Definition pcre2_data.hpp:143
static _PCRE2CPP_PCRE2_FUNC_CONSTEXPR17 mstd::c_func_t< int(const code_type *, uint32_t, void *)> get_info
pointer to pcre2_pattern_info function for utf-8
Definition pcre2_data.hpp:170
Translation container from pcre2 library to pcre2cpp.
Definition pcre2_data.hpp:68