예제 #1
0
UBool
TimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
    return ((this == &other) ||
            (getDynamicClassID() == other.getDynamicClassID() &&
            fRawOffset == other.fRawOffset &&
            fDSTSavings == other.fDSTSavings));
}
예제 #2
0
UBool
TimeZoneRule::operator==(const TimeZoneRule& that) const {
    return ((this == &that) ||
            (getDynamicClassID() == that.getDynamicClassID() &&
            fName == that.fName &&
            fRawOffset == that.fRawOffset &&
            fDSTSavings == that.fDSTSavings));
}
예제 #3
0
파일: calendar.cpp 프로젝트: gitpan/ponie
UBool 
Calendar::isEquivalentTo(const Calendar& other) const
{
    return getDynamicClassID() == other.getDynamicClassID() &&
        fLenient                == other.fLenient &&
        fFirstDayOfWeek         == other.fFirstDayOfWeek &&
        fMinimalDaysInFirstWeek == other.fMinimalDaysInFirstWeek &&
        *fZone                  == *other.fZone;
}
예제 #4
0
UBool
InitialTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
    if (this == &other) {
        return TRUE;
    }
    if (getDynamicClassID() != other.getDynamicClassID() ||
        TimeZoneRule::isEquivalentTo(other) == FALSE) {
        return FALSE;
    }
    return TRUE;
}
예제 #5
0
UBool
DateTimeRule::operator==(const DateTimeRule& that) const {
    return ((this == &that) ||
            (getDynamicClassID() == that.getDynamicClassID() &&
            fMonth == that.fMonth &&
            fDayOfMonth == that.fDayOfMonth &&
            fDayOfWeek == that.fDayOfWeek &&
            fWeekInMonth == that.fWeekInMonth &&
            fMillisInDay == that.fMillisInDay &&
            fDateRuleType == that.fDateRuleType &&
            fTimeRuleType == that.fTimeRuleType));
}
예제 #6
0
UBool
AnnualTimeZoneRule::operator==(const TimeZoneRule& that) const {
    if (this == &that) {
        return TRUE;
    }
    if (getDynamicClassID() != that.getDynamicClassID()) {
        return FALSE;
    }
    AnnualTimeZoneRule *atzr = (AnnualTimeZoneRule*)&that;
    return (*fDateTimeRule == *(atzr->fDateTimeRule) &&
            fStartYear == atzr->fStartYear &&
            fEndYear == atzr->fEndYear);
}
예제 #7
0
UBool
AnnualTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
    if (this == &other) {
        return TRUE;
    }
    if (getDynamicClassID() != other.getDynamicClassID() ||
        TimeZoneRule::isEquivalentTo(other) == FALSE) {
        return FALSE;
    }
    AnnualTimeZoneRule* that = (AnnualTimeZoneRule*)&other;
    return (*fDateTimeRule == *(that->fDateTimeRule) &&
            fStartYear == that->fStartYear &&
            fEndYear == that->fEndYear);
}
예제 #8
0
/**
 * Compares two substitutions for equality
 * @param The substitution to compare this one to
 * @return true if the two substitutions are functionally equivalent
 */
UBool
NFSubstitution::operator==(const NFSubstitution& rhs) const
{
  // compare class and all of the fields all substitutions have
  // in common
  // this should be called by subclasses before their own equality tests
  return getDynamicClassID() == rhs.getDynamicClassID()
  && pos == rhs.pos
  && (ruleSet == NULL) == (rhs.ruleSet == NULL)
  // && ruleSet == rhs.ruleSet causes circularity, other checks to make instead?
  && (numberFormat == NULL
      ? (rhs.numberFormat == NULL)
      : (*numberFormat == *rhs.numberFormat));
}
예제 #9
0
파일: numfmt.cpp 프로젝트: gitpan/ponie
UBool
NumberFormat::operator==(const Format& that) const
{
    NumberFormat* other = (NumberFormat*)&that;

    return ((this == &that) ||
            ((Format::operator==(that) &&
              getDynamicClassID()== that.getDynamicClassID() &&
              fMaxIntegerDigits == other->fMaxIntegerDigits &&
              fMinIntegerDigits == other->fMinIntegerDigits &&
              fMaxFractionDigits == other->fMaxFractionDigits &&
              fMinFractionDigits == other->fMinFractionDigits &&
              fGroupingUsed == other->fGroupingUsed &&
              fParseIntegerOnly == other->fParseIntegerOnly)));
}
예제 #10
0
파일: uchriter.cpp 프로젝트: gitpan/ponie
UBool
UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const {
    if (this == &that) {
        return TRUE;
    }
    
    if (getDynamicClassID() != that.getDynamicClassID()) {
        return FALSE;
    }

    UCharCharacterIterator&    realThat = (UCharCharacterIterator&)that;

    return text == realThat.text
        && textLength == realThat.textLength
        && pos == realThat.pos
        && begin == realThat.begin
        && end == realThat.end;
}
예제 #11
0
UBool
TimeZoneTransition::operator==(const TimeZoneTransition& that) const {
    if (this == &that) {
        return TRUE;
    }
    if (getDynamicClassID() != that.getDynamicClassID()) {
        return FALSE;
    }
    if (fTime != that.fTime) {
        return FALSE;
    }
    if (fFrom == NULL && that.fFrom == NULL
            || fFrom != NULL && that.fFrom != NULL && *fFrom == *(that.fFrom)) {
        if (fTo == NULL && that.fTo == NULL
                || fTo != NULL && that.fTo != NULL && *fTo == *(that.fTo)) {
            return TRUE;
        }
    }
    return FALSE;
}
예제 #12
0
UBool RuleBasedCollator::operator==(const Collator& that) const
{
  /* only checks for address equals here */
  if (Collator::operator==(that))
    return TRUE;

  if (getDynamicClassID() != that.getDynamicClassID())
    return FALSE;  /* not the same class */

  RuleBasedCollator& thatAlias = (RuleBasedCollator&)that;

  // weiv: use C function, commented code below is wrong
  return ucol_equals(this->ucollator, thatAlias.ucollator);
  /*
  synwee : orginal code does not check for data compatibility
  */
  /*
  if (ucollator != thatAlias.ucollator)
    return FALSE;

  return TRUE;
  */
}
예제 #13
0
UBool
TimeArrayTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
    if (this == &other) {
        return TRUE;
    }
    if (getDynamicClassID() != other.getDynamicClassID()
        || TimeZoneRule::isEquivalentTo(other) == FALSE) {
        return FALSE;
    }
    TimeArrayTimeZoneRule* that = (TimeArrayTimeZoneRule*)&other;
    if (fTimeRuleType != that->fTimeRuleType ||
        fNumStartTimes != that->fNumStartTimes) {
        return FALSE;
    }
    // Compare start times
    UBool res = TRUE;
    for (int32_t i = 0; i < fNumStartTimes; i++) {
        if (fStartTimes[i] != that->fStartTimes[i]) {
            res = FALSE;
            break;
        }
    }
    return res;
}
예제 #14
0
UBool
TimeArrayTimeZoneRule::operator==(const TimeZoneRule& that) const {
    if (this == &that) {
        return TRUE;
    }
    if (getDynamicClassID() != that.getDynamicClassID()
        || TimeZoneRule::operator==(that) == FALSE) {
        return FALSE;
    }
    TimeArrayTimeZoneRule *tatzr = (TimeArrayTimeZoneRule*)&that;
    if (fTimeRuleType != tatzr->fTimeRuleType ||
        fNumStartTimes != tatzr->fNumStartTimes) {
        return FALSE;
    }
    // Compare start times
    UBool res = TRUE;
    for (int32_t i = 0; i < fNumStartTimes; i++) {
        if (fStartTimes[i] != tatzr->fStartTimes[i]) {
            res = FALSE;
            break;
        }
    }
    return res;
}
예제 #15
0
UBool
InitialTimeZoneRule::operator==(const TimeZoneRule& that) const {
    return ((this == &that) ||
            (getDynamicClassID() == that.getDynamicClassID() &&
            TimeZoneRule::operator==(that)));
}
예제 #16
0
 // dummy implementations of other pure virtual base class functions
 virtual UBool operator==(const ForwardCharacterIterator &that) const {
     return
         this==&that ||
         getDynamicClassID()==that.getDynamicClassID() && pos==((SubCharIter &)that).pos;
 }
예제 #17
0
UBool
TimeZone::operator==(const TimeZone& that) const
{
    return getDynamicClassID() == that.getDynamicClassID() &&
        fID == that.fID;
}
예제 #18
0
파일: format.cpp 프로젝트: mason105/red5cpp
UBool
Format::operator==(const Format& that) const
{
    // Subclasses: Call this method and then add more specific checks.
    return getDynamicClassID() == that.getDynamicClassID();
}