Logo Search packages:      
Sourcecode: pwlib version File versions

PObject::Comparison PTimeInterval::Compare ( const PObject obj  )  const [virtual, inherited]

Rank the two time intervals. This ranks the intervals as you would expect for two integers.

Returns:
EqualTo#, LessThan# or GreaterThan# depending on their relative rank.
Parameters:
obj  Time interval to compare against.

Reimplemented from PObject.

Definition at line 204 of file ptime.cxx.

References PTimeInterval::milliseconds.

{
  PAssert(PIsDescendant(&obj, PTimeInterval), PInvalidCast);
  const PTimeInterval & other = (const PTimeInterval &)obj;
  return milliseconds < other.milliseconds ? LessThan :
         milliseconds > other.milliseconds ? GreaterThan : EqualTo;
}


Generated by  Doxygen 1.6.0   Back to index