ICU-5128 Monomorphize ubrk.cpp and uset.cpp

X-SVN-Rev: 19856
This commit is contained in:
Deborah Goldsmith 2006-07-18 23:28:20 +00:00
parent d49dcbdc56
commit aa37b80065
2 changed files with 42 additions and 42 deletions

View File

@ -175,8 +175,8 @@ ubrk_setUText(UBreakIterator *bi,
UText *text,
UErrorCode *status)
{
BreakIterator *brit = (BreakIterator *)bi;
brit->setText(text, *status);
RuleBasedBreakIterator *brit = (RuleBasedBreakIterator *)bi;
brit->RuleBasedBreakIterator::setText(text, *status);
}
@ -187,35 +187,35 @@ U_CAPI int32_t U_EXPORT2
ubrk_current(const UBreakIterator *bi)
{
return ((BreakIterator*)bi)->current();
return ((RuleBasedBreakIterator*)bi)->RuleBasedBreakIterator::current();
}
U_CAPI int32_t U_EXPORT2
ubrk_next(UBreakIterator *bi)
{
return ((BreakIterator*)bi)->next();
return ((RuleBasedBreakIterator*)bi)->RuleBasedBreakIterator::next();
}
U_CAPI int32_t U_EXPORT2
ubrk_previous(UBreakIterator *bi)
{
return ((BreakIterator*)bi)->previous();
return ((RuleBasedBreakIterator*)bi)->RuleBasedBreakIterator::previous();
}
U_CAPI int32_t U_EXPORT2
ubrk_first(UBreakIterator *bi)
{
return ((BreakIterator*)bi)->first();
return ((RuleBasedBreakIterator*)bi)->RuleBasedBreakIterator::first();
}
U_CAPI int32_t U_EXPORT2
ubrk_last(UBreakIterator *bi)
{
return ((BreakIterator*)bi)->last();
return ((RuleBasedBreakIterator*)bi)->RuleBasedBreakIterator::last();
}
U_CAPI int32_t U_EXPORT2
@ -223,7 +223,7 @@ ubrk_preceding(UBreakIterator *bi,
int32_t offset)
{
return ((BreakIterator*)bi)->preceding(offset);
return ((RuleBasedBreakIterator*)bi)->RuleBasedBreakIterator::preceding(offset);
}
U_CAPI int32_t U_EXPORT2
@ -231,7 +231,7 @@ ubrk_following(UBreakIterator *bi,
int32_t offset)
{
return ((BreakIterator*)bi)->following(offset);
return ((RuleBasedBreakIterator*)bi)->RuleBasedBreakIterator::following(offset);
}
U_CAPI const char* U_EXPORT2
@ -252,20 +252,20 @@ ubrk_countAvailable()
U_CAPI UBool U_EXPORT2
ubrk_isBoundary(UBreakIterator *bi, int32_t offset)
{
return ((BreakIterator *)bi)->isBoundary(offset);
return ((RuleBasedBreakIterator *)bi)->RuleBasedBreakIterator::isBoundary(offset);
}
U_CAPI int32_t U_EXPORT2
ubrk_getRuleStatus(UBreakIterator *bi)
{
return ((RuleBasedBreakIterator *)bi)->getRuleStatus();
return ((RuleBasedBreakIterator *)bi)->RuleBasedBreakIterator::getRuleStatus();
}
U_CAPI int32_t U_EXPORT2
ubrk_getRuleStatusVec(UBreakIterator *bi, int32_t *fillInVec, int32_t capacity, UErrorCode *status)
{
return ((RuleBasedBreakIterator *)bi)->getRuleStatusVec(fillInVec, capacity, *status);
return ((RuleBasedBreakIterator *)bi)->RuleBasedBreakIterator::getRuleStatusVec(fillInVec, capacity, *status);
}

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 2002-2005, International Business Machines
* Copyright (C) 2002-2006, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -42,22 +42,22 @@ uset_close(USet* set) {
U_CAPI void U_EXPORT2
uset_set(USet* set,
UChar32 start, UChar32 end) {
((UnicodeSet*) set)->set(start, end);
((UnicodeSet*) set)->UnicodeSet::set(start, end);
}
U_CAPI void U_EXPORT2
uset_addAll(USet* set, const USet *additionalSet) {
((UnicodeSet*) set)->addAll(*((const UnicodeSet*)additionalSet));
((UnicodeSet*) set)->UnicodeSet::addAll(*((const UnicodeSet*)additionalSet));
}
U_CAPI void U_EXPORT2
uset_add(USet* set, UChar32 c) {
((UnicodeSet*) set)->add(c);
((UnicodeSet*) set)->UnicodeSet::add(c);
}
U_CAPI void U_EXPORT2
uset_addRange(USet* set, UChar32 start, UChar32 end) {
((UnicodeSet*) set)->add(start, end);
((UnicodeSet*) set)->UnicodeSet::add(start, end);
}
U_CAPI void U_EXPORT2
@ -68,108 +68,108 @@ uset_addString(USet* set, const UChar* str, int32_t strLen) {
// UnicodeString handles -1 for strLen
UnicodeString s(str, strLen);
((UnicodeSet*) set)->add(s);
((UnicodeSet*) set)->UnicodeSet::add(s);
}
U_CAPI void U_EXPORT2
uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen) {
// UnicodeString handles -1 for strLen
UnicodeString s(str, strLen);
((UnicodeSet*) set)->addAll(s);
((UnicodeSet*) set)->UnicodeSet::addAll(s);
}
U_CAPI void U_EXPORT2
uset_remove(USet* set, UChar32 c) {
((UnicodeSet*) set)->remove(c);
((UnicodeSet*) set)->UnicodeSet::remove(c);
}
U_CAPI void U_EXPORT2
uset_removeRange(USet* set, UChar32 start, UChar32 end) {
((UnicodeSet*) set)->remove(start, end);
((UnicodeSet*) set)->UnicodeSet::remove(start, end);
}
U_CAPI void U_EXPORT2
uset_removeString(USet* set, const UChar* str, int32_t strLen) {
UnicodeString s(strLen==-1, str, strLen);
((UnicodeSet*) set)->remove(s);
((UnicodeSet*) set)->UnicodeSet::remove(s);
}
U_CAPI void U_EXPORT2
uset_removeAll(USet* set, const USet* remove) {
((UnicodeSet*) set)->removeAll(*(const UnicodeSet*)remove);
((UnicodeSet*) set)->UnicodeSet::removeAll(*(const UnicodeSet*)remove);
}
U_CAPI void U_EXPORT2
uset_retain(USet* set, UChar32 start, UChar32 end) {
((UnicodeSet*) set)->retain(start, end);
((UnicodeSet*) set)->UnicodeSet::retain(start, end);
}
U_CAPI void U_EXPORT2
uset_retainAll(USet* set, const USet* retain) {
((UnicodeSet*) set)->retainAll(*(const UnicodeSet*)retain);
((UnicodeSet*) set)->UnicodeSet::retainAll(*(const UnicodeSet*)retain);
}
U_CAPI void U_EXPORT2
uset_compact(USet* set) {
((UnicodeSet*) set)->compact();
((UnicodeSet*) set)->UnicodeSet::compact();
}
U_CAPI void U_EXPORT2
uset_complement(USet* set) {
((UnicodeSet*) set)->complement();
((UnicodeSet*) set)->UnicodeSet::complement();
}
U_CAPI void U_EXPORT2
uset_complementAll(USet* set, const USet* complement) {
((UnicodeSet*) set)->complementAll(*(const UnicodeSet*)complement);
((UnicodeSet*) set)->UnicodeSet::complementAll(*(const UnicodeSet*)complement);
}
U_CAPI void U_EXPORT2
uset_clear(USet* set) {
((UnicodeSet*) set)->clear();
((UnicodeSet*) set)->UnicodeSet::clear();
}
U_CAPI UBool U_EXPORT2
uset_isEmpty(const USet* set) {
return ((const UnicodeSet*) set)->isEmpty();
return ((const UnicodeSet*) set)->UnicodeSet::isEmpty();
}
U_CAPI UBool U_EXPORT2
uset_contains(const USet* set, UChar32 c) {
return ((const UnicodeSet*) set)->contains(c);
return ((const UnicodeSet*) set)->UnicodeSet::contains(c);
}
U_CAPI UBool U_EXPORT2
uset_containsRange(const USet* set, UChar32 start, UChar32 end) {
return ((const UnicodeSet*) set)->contains(start, end);
return ((const UnicodeSet*) set)->UnicodeSet::contains(start, end);
}
U_CAPI UBool U_EXPORT2
uset_containsString(const USet* set, const UChar* str, int32_t strLen) {
UnicodeString s(strLen==-1, str, strLen);
return ((const UnicodeSet*) set)->contains(s);
return ((const UnicodeSet*) set)->UnicodeSet::contains(s);
}
U_CAPI UBool U_EXPORT2
uset_containsAll(const USet* set1, const USet* set2) {
return ((const UnicodeSet*) set1)->containsAll(* (const UnicodeSet*) set2);
return ((const UnicodeSet*) set1)->UnicodeSet::containsAll(* (const UnicodeSet*) set2);
}
U_CAPI UBool U_EXPORT2
uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen) {
// Create a string alias, since nothing is being added to the set.
UnicodeString s(strLen==-1, str, strLen);
return ((const UnicodeSet*) set)->containsAll(s);
return ((const UnicodeSet*) set)->UnicodeSet::containsAll(s);
}
U_CAPI UBool U_EXPORT2
uset_containsNone(const USet* set1, const USet* set2) {
return ((const UnicodeSet*) set1)->containsNone(* (const UnicodeSet*) set2);
return ((const UnicodeSet*) set1)->UnicodeSet::containsNone(* (const UnicodeSet*) set2);
}
U_CAPI UBool U_EXPORT2
uset_containsSome(const USet* set1, const USet* set2) {
return ((const UnicodeSet*) set1)->containsSome(* (const UnicodeSet*) set2);
return ((const UnicodeSet*) set1)->UnicodeSet::containsSome(* (const UnicodeSet*) set2);
}
U_CAPI UBool U_EXPORT2
@ -179,17 +179,17 @@ uset_equals(const USet* set1, const USet* set2) {
U_CAPI int32_t U_EXPORT2
uset_indexOf(const USet* set, UChar32 c) {
return ((UnicodeSet*) set)->indexOf(c);
return ((UnicodeSet*) set)->UnicodeSet::indexOf(c);
}
U_CAPI UChar32 U_EXPORT2
uset_charAt(const USet* set, int32_t index) {
return ((UnicodeSet*) set)->charAt(index);
return ((UnicodeSet*) set)->UnicodeSet::charAt(index);
}
U_CAPI int32_t U_EXPORT2
uset_size(const USet* set) {
return ((const UnicodeSet*) set)->size();
return ((const UnicodeSet*) set)->UnicodeSet::size();
}
U_NAMESPACE_BEGIN
@ -273,7 +273,7 @@ uprv_openRuleWhiteSpaceSet(UErrorCode* ec) {
// create a set with the Pattern_White_Space characters,
// without a pattern for fewer code dependencies
UnicodeSet *set=new UnicodeSet(9, 0xd);
set->add(0x20).add(0x85).add(0x200e, 0x200f).add(0x2028, 0x2029);
set->UnicodeSet::add(0x20).add(0x85).add(0x200e, 0x200f).add(0x2028, 0x2029);
return (USet *)set;
}
@ -301,7 +301,7 @@ uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode
return 0;
}
return ((const UnicodeSet*) set)->serialize(dest, destCapacity,* ec);
return ((const UnicodeSet*) set)->UnicodeSet::serialize(dest, destCapacity,* ec);
}
U_CAPI UBool U_EXPORT2