Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

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

Get the relative rank of the two strings. The system standard function, eg strcmp(), is used.

Returns:
comparison of the two objects, EqualTo# for same, LessThan# for obj# logically less than the object and GreaterThan# for obj# logically greater than the object.
Parameters:
obj  Other PString to compare against.

Reimplemented from PObject.

Reimplemented in PMemoryFile, PFile, PIndirectChannel, and PPipeChannel.

Definition at line 306 of file pchannel.cxx.

References PChannel::GetHandle().

{
  PAssert(PIsDescendant(&obj, PChannel), PInvalidCast);
  int h1 = GetHandle();
  int h2 = ((const PChannel&)obj).GetHandle();
  if (h1 < h2)
    return LessThan;
  if (h1 > h2)
    return GreaterThan;
  return EqualTo;
}


Generated by  Doxygen 1.6.0   Back to index