added equality operators to compare with pointers

This commit is contained in:
darkeye 2002-02-20 11:51:27 +00:00
parent ab8efd2d31
commit 63e7805dd7
1 changed files with 30 additions and 1 deletions

View File

@ -232,6 +232,19 @@ class Ref
return object;
}
/**
* Equality operator.
*
* @param other the pointer to compare this with.
* @return true is this Ref refers to the same object as other,
* false otherwise.
*/
inline bool
operator== ( const T * other ) const throw ()
{
return object == other;
}
/**
* Equality operator.
*
@ -245,6 +258,19 @@ class Ref
return object == other.object;
}
/**
* Unequality operator.
*
* @param other the pointer to compare this with.
* @return false is this Ref refers to a different object then other,
* true otherwise.
*/
inline bool
operator!= ( const T * other ) const throw ()
{
return object != other;
}
/**
* Unequality operator.
*
@ -274,6 +300,9 @@ class Ref
$Source$
$Log$
Revision 1.4 2002/02/20 11:51:27 darkeye
added equality operators to compare with pointers
Revision 1.3 2000/11/11 14:55:31 darkeye
minor bugfix