ICU-4881 Change exported class from iteratedChar to IteratedChar
X-SVN-Rev: 19843
This commit is contained in:
parent
4319aedb37
commit
13357a90ca
@ -112,12 +112,12 @@ static int32_t binarySearch(const int32_t *array, int32_t len, int32_t value)
|
||||
return -1;
|
||||
}
|
||||
|
||||
iteratedChar::iteratedChar():charValue(0), index(0), nextIndex(0), error(FALSE), done(FALSE)
|
||||
IteratedChar::IteratedChar():charValue(0), index(0), nextIndex(0), error(FALSE), done(FALSE)
|
||||
{
|
||||
// nothing else to do.
|
||||
}
|
||||
|
||||
void iteratedChar::reset()
|
||||
void IteratedChar::reset()
|
||||
{
|
||||
charValue = 0;
|
||||
index = -1;
|
||||
@ -126,7 +126,7 @@ void iteratedChar::reset()
|
||||
done = FALSE;
|
||||
}
|
||||
|
||||
int32_t iteratedChar::nextByte(InputText *det)
|
||||
int32_t IteratedChar::nextByte(InputText *det)
|
||||
{
|
||||
if (nextIndex >= det->fRawLength) {
|
||||
done = TRUE;
|
||||
@ -149,7 +149,7 @@ int32_t CharsetRecog_mbcs::match_mbcs(InputText *det, const int32_t commonChars[
|
||||
int badCharCount = 0;
|
||||
int totalCharCount = 0;
|
||||
int confidence = 0;
|
||||
iteratedChar *iter = new iteratedChar();
|
||||
IteratedChar *iter = new IteratedChar();
|
||||
|
||||
// {
|
||||
for (iter->reset(); nextChar(iter, det);) {
|
||||
@ -234,7 +234,7 @@ CharsetRecog_sjis::~CharsetRecog_sjis()
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
UBool CharsetRecog_sjis::nextChar(iteratedChar* it, InputText* det) {
|
||||
UBool CharsetRecog_sjis::nextChar(IteratedChar* it, InputText* det) {
|
||||
it->index = it->nextIndex;
|
||||
it->error = FALSE;
|
||||
|
||||
@ -282,7 +282,7 @@ CharsetRecog_euc::~CharsetRecog_euc()
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
UBool CharsetRecog_euc::nextChar(iteratedChar* it, InputText* det) {
|
||||
UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) {
|
||||
int32_t firstByte = 0;
|
||||
int32_t secondByte = 0;
|
||||
int32_t thirdByte = 0;
|
||||
@ -390,7 +390,7 @@ CharsetRecog_big5::~CharsetRecog_big5()
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
UBool CharsetRecog_big5::nextChar(iteratedChar* it, InputText* det)
|
||||
UBool CharsetRecog_big5::nextChar(IteratedChar* it, InputText* det)
|
||||
{
|
||||
int32_t firstByte;
|
||||
|
||||
@ -444,7 +444,7 @@ CharsetRecog_gb_18030::~CharsetRecog_gb_18030()
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
UBool CharsetRecog_gb_18030::nextChar(iteratedChar* it, InputText* det) {
|
||||
UBool CharsetRecog_gb_18030::nextChar(IteratedChar* it, InputText* det) {
|
||||
int32_t firstByte = 0;
|
||||
int32_t secondByte = 0;
|
||||
int32_t thirdByte = 0;
|
||||
|
@ -18,7 +18,7 @@ U_NAMESPACE_BEGIN
|
||||
|
||||
// "Character" iterated character class.
|
||||
// Recognizers for specific mbcs encodings make their "characters" available
|
||||
// by providing a nextChar() function that fills in an instance of iteratedChar
|
||||
// by providing a nextChar() function that fills in an instance of IteratedChar
|
||||
// with the next char from the input.
|
||||
// The returned characters are not converted to Unicode, but remain as the raw
|
||||
// bytes (concatenated into an int) from the codepage data.
|
||||
@ -27,7 +27,7 @@ U_NAMESPACE_BEGIN
|
||||
// stripped of markup. Detection only considers multi-byte chars, effectively
|
||||
// stripping markup anyway, and double byte chars do occur in markup too.
|
||||
//
|
||||
class iteratedChar
|
||||
class IteratedChar
|
||||
{
|
||||
public:
|
||||
int32_t charValue; // 1-4 bytes from the raw input data
|
||||
@ -37,7 +37,7 @@ public:
|
||||
UBool done;
|
||||
|
||||
public:
|
||||
iteratedChar();
|
||||
IteratedChar();
|
||||
void reset();
|
||||
int32_t nextByte(InputText* det);
|
||||
};
|
||||
@ -78,14 +78,14 @@ public:
|
||||
* Subclasses for specific charset encodings must implement this function
|
||||
* to get characters according to the rules of their encoding scheme.
|
||||
*
|
||||
* This function is not a method of class iteratedChar only because
|
||||
* This function is not a method of class IteratedChar only because
|
||||
* that would require a lot of extra derived classes, which is awkward.
|
||||
* @param it The iteratedChar "struct" into which the returned char is placed.
|
||||
* @param it The IteratedChar "struct" into which the returned char is placed.
|
||||
* @param det The charset detector, which is needed to get at the input byte data
|
||||
* being iterated over.
|
||||
* @return True if a character was returned, false at end of input.
|
||||
*/
|
||||
virtual UBool nextChar(iteratedChar *it, InputText *textIn) = 0;
|
||||
virtual UBool nextChar(IteratedChar *it, InputText *textIn) = 0;
|
||||
|
||||
};
|
||||
|
||||
@ -98,7 +98,7 @@ class CharsetRecog_sjis : public CharsetRecog_mbcs {
|
||||
public:
|
||||
virtual ~CharsetRecog_sjis();
|
||||
|
||||
UBool nextChar(iteratedChar *it, InputText *det);
|
||||
UBool nextChar(IteratedChar *it, InputText *det);
|
||||
|
||||
int32_t match(InputText *det);
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
* Character "value" is simply the raw bytes that make up the character
|
||||
* packed into an int.
|
||||
*/
|
||||
UBool nextChar(iteratedChar *it, InputText *det);
|
||||
UBool nextChar(IteratedChar *it, InputText *det);
|
||||
};
|
||||
|
||||
/**
|
||||
@ -172,7 +172,7 @@ class CharsetRecog_big5 : public CharsetRecog_mbcs
|
||||
public:
|
||||
virtual ~CharsetRecog_big5();
|
||||
|
||||
UBool nextChar(iteratedChar* it, InputText* det);
|
||||
UBool nextChar(IteratedChar* it, InputText* det);
|
||||
|
||||
const char *getName() const;
|
||||
const char *getLanguage() const;
|
||||
@ -191,7 +191,7 @@ class CharsetRecog_gb_18030 : public CharsetRecog_mbcs
|
||||
public:
|
||||
virtual ~CharsetRecog_gb_18030();
|
||||
|
||||
UBool nextChar(iteratedChar* it, InputText* det);
|
||||
UBool nextChar(IteratedChar* it, InputText* det);
|
||||
|
||||
const char *getName() const;
|
||||
const char *getLanguage() const;
|
||||
|
Loading…
Reference in New Issue
Block a user