php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
codepointiterator_internal.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | This source file is subject to version 3.01 of the PHP license, |
4 | that is bundled with this package in the file LICENSE, and is |
5 | available through the world-wide-web at the following url: |
6 | https://www.php.net/license/3_01.txt |
7 | If you did not receive a copy of the PHP license and are unable to |
8 | obtain it through the world-wide-web, please send a note to |
9 | license@php.net so we can mail you a copy immediately. |
10 +----------------------------------------------------------------------+
11 | Authors: Gustavo Lopes <cataphract@php.net> |
12 +----------------------------------------------------------------------+
13 */
14
15#ifndef CODEPOINTITERATOR_INTERNAL_H
16#define CODEPOINTITERATOR_INTERNAL_H
17
18#include <unicode/brkiter.h>
19#include <unicode/unistr.h>
20
21using icu::BreakIterator;
22using icu::CharacterIterator;
23using icu::UnicodeString;
24
25namespace PHP {
26
28
29 public:
30 static UClassID getStaticClassID();
31
33
35
37
39
40#if U_ICU_VERSION_MAJOR_NUM >= 70
41 bool operator==(const BreakIterator& that) const override;
42#else
43 UBool operator==(const BreakIterator& that) const override;
44#endif
45
46 CodePointBreakIterator* clone(void) const override;
47
48 UClassID getDynamicClassID(void) const override;
49
50 CharacterIterator& getText(void) const override;
51
52 UText *getUText(UText *fillIn, UErrorCode &status) const override;
53
54 void setText(const UnicodeString &text) override;
55
56 void setText(UText *text, UErrorCode &status) override;
57
58 void adoptText(CharacterIterator* it) override;
59
60 int32_t first(void) override;
61
62 int32_t last(void) override;
63
64 int32_t previous(void) override;
65
66 int32_t next(void) override;
67
68 int32_t current(void) const override;
69
70 int32_t following(int32_t offset) override;
71
72 int32_t preceding(int32_t offset) override;
73
74 UBool isBoundary(int32_t offset) override;
75
76 int32_t next(int32_t n) override;
77
79 int32_t &BufferSize,
80 UErrorCode &status) override;
81
82 CodePointBreakIterator &refreshInputText(UText *input, UErrorCode &status) override;
83
84 inline UChar32 getLastCodePoint()
85 {
86 return this->lastCodePoint;
87 }
88
89 private:
90 UText *fText;
91 UChar32 lastCodePoint;
92 mutable CharacterIterator *fCharIter;
93
94 inline void clearCurrentCharIter()
95 {
96 delete this->fCharIter;
97 this->fCharIter = NULL;
98 this->lastCodePoint = U_SENTINEL;
99 }
100 };
101}
102
103#endif
void BreakIterator
int32_t following(int32_t offset) override
UText * getUText(UText *fillIn, UErrorCode &status) const override
int32_t previous(void) override
UClassID getDynamicClassID(void) const override
CodePointBreakIterator & refreshInputText(UText *input, UErrorCode &status) override
static UClassID getStaticClassID()
int32_t last(void) override
void setText(const UnicodeString &text) override
CodePointBreakIterator * createBufferClone(void *stackBuffer, int32_t &BufferSize, UErrorCode &status) override
int32_t next(void) override
CharacterIterator & getText(void) const override
int32_t current(void) const override
int32_t next(int32_t n) override
int32_t preceding(int32_t offset) override
UBool operator==(const BreakIterator &that) const override
CodePointBreakIterator * clone(void) const override
void adoptText(CharacterIterator *it) override
int32_t first(void) override
CodePointBreakIterator & operator=(const CodePointBreakIterator &that)
UBool isBoundary(int32_t offset) override
void setText(UText *text, UErrorCode &status) override
CodePointBreakIterator(const CodePointBreakIterator &other)
DNS_STATUS status
Definition dns_win32.c:49
zend_long n
Definition ffi.c:4979
zend_long offset
#define NULL
Definition gdcache.h:45
unsigned const char * text
Definition php_ffi.h:53