Пример #1
0
/** Equality operator. Just compares by nickname.
 */
bool User::operator ==(const User &rhs) const
{
	return (m_nickName == rhs.GetNickName());
}
Пример #2
0
/** Base sorting operator for Users. This just sorts alphabetically.
 * @param[in] rhs	Right-hand side of the operator.
 * @return	True if "this" object precedes the right-hand object.
 */
bool User::operator <(const User &rhs) const
{
	// Generic Users are sorted alphabetically
	return (m_nickName < rhs.GetNickName());
}