Return true if this hzEmaddr instance is lexically greater than or equal to the operand. Note that comparison is first done on the domain part (the RHS of the @) and then done on the address part (the LHS of the @)
| Return Type | Function name | Arguments |
|---|---|---|
| bool | hzEmaddr::operator>= | (hzEmaddr&,) |
Declared in file: hzEmaddr.h
Defined in file : hzEmaddr.cpp
Function Logic:
Function body:
bool hzEmaddr::operator>= (hzEmaddr& E)
{
// Return true if this hzEmaddr instance is lexically greater than or equal to the operand. Note that comparison is first done on the domain
// part (the RHS of the @) and then done on the address part (the LHS of the @)
//
// Arguments: 1) E Test email address
//
// Returns: True If this addesss is lexically greater than or equal to the supplied test email address
// False Otherwise
_hzfunc("hzEmaddr::operator>=") ;
int32_t res ; // Comparison result
// Are this and the operand connected?
if (m_addr == E.m_addr) return true ;
if (m_addr && E.m_addr == 0)return true ;
if (E.m_addr && m_addr == 0)return false ;
// Compare domains first
res = strcmp(GetDomain(), E.GetDomain()) ;
if (res > 0)
return true ;
if (res < 0)
return false ;
// Domains are equal so compare LHS
res = _lhscompare(GetAddress(), E) ;
return res >&eq; 0? true : false ;
}