#include "unicode/utypes.h"
#if !UCONFIG_NO_BREAK_ITERATION
#include "unicode/ucptrie.h"
#include "unicode/utypes.h"
#include "rbbidata.h"
#include "rbbirb.h"
#include "udatamem.h"
#include "cmemory.h"
#include "cstring.h"
#include "umutex.h"
#include "uassert.h"
U_NAMESPACE_BEGIN
RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, UErrorCode &status) { … }
RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, enum EDontAdopt, UErrorCode &status) { … }
RBBIDataWrapper::RBBIDataWrapper(UDataMemory* udm, UErrorCode &status) { … }
UBool RBBIDataWrapper::isDataVersionAcceptable(const UVersionInfo version) { … }
void RBBIDataWrapper::init0() { … }
void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) { … }
RBBIDataWrapper::~RBBIDataWrapper() { … }
bool RBBIDataWrapper::operator ==(const RBBIDataWrapper &other) const { … }
int32_t RBBIDataWrapper::hashCode() { … }
void RBBIDataWrapper::removeReference() { … }
RBBIDataWrapper *RBBIDataWrapper::addReference() { … }
const UnicodeString &RBBIDataWrapper::getRuleSourceString() const { … }
#ifdef RBBI_DEBUG
void RBBIDataWrapper::printTable(const char *heading, const RBBIStateTable *table) {
uint32_t c;
uint32_t s;
RBBIDebugPrintf("%s\n", heading);
RBBIDebugPrintf(" fDictCategoriesStart: %d\n", table->fDictCategoriesStart);
RBBIDebugPrintf(" fLookAheadResultsSize: %d\n", table->fLookAheadResultsSize);
RBBIDebugPrintf(" Flags: %4x RBBI_LOOKAHEAD_HARD_BREAK=%s RBBI_BOF_REQUIRED=%s RBBI_8BITS_ROWS=%s\n",
table->fFlags,
table->fFlags & RBBI_LOOKAHEAD_HARD_BREAK ? "T" : "F",
table->fFlags & RBBI_BOF_REQUIRED ? "T" : "F",
table->fFlags & RBBI_8BITS_ROWS ? "T" : "F");
RBBIDebugPrintf("\nState | Acc LA TagIx");
for (c=0; c<fHeader->fCatCount; c++) {RBBIDebugPrintf("%3d ", c);}
RBBIDebugPrintf("\n------|---------------"); for (c=0;c<fHeader->fCatCount; c++) {
RBBIDebugPrintf("----");
}
RBBIDebugPrintf("\n");
if (table == nullptr) {
RBBIDebugPrintf(" N U L L T A B L E\n\n");
return;
}
UBool use8Bits = table->fFlags & RBBI_8BITS_ROWS;
for (s=0; s<table->fNumStates; s++) {
RBBIStateTableRow *row = (RBBIStateTableRow *)
(table->fTableData + (table->fRowLen * s));
if (use8Bits) {
RBBIDebugPrintf("%4d | %3d %3d %3d ", s, row->r8.fAccepting, row->r8.fLookAhead, row->r8.fTagsIdx);
for (c=0; c<fHeader->fCatCount; c++) {
RBBIDebugPrintf("%3d ", row->r8.fNextState[c]);
}
} else {
RBBIDebugPrintf("%4d | %3d %3d %3d ", s, row->r16.fAccepting, row->r16.fLookAhead, row->r16.fTagsIdx);
for (c=0; c<fHeader->fCatCount; c++) {
RBBIDebugPrintf("%3d ", row->r16.fNextState[c]);
}
}
RBBIDebugPrintf("\n");
}
RBBIDebugPrintf("\n");
}
#endif
void RBBIDataWrapper::printData() { … }
U_NAMESPACE_END
U_NAMESPACE_USE
U_CAPI int32_t U_EXPORT2
ubrk_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outData,
UErrorCode *status) { … }
#endif