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

PObject::Comparison PASN_BitString::Compare ( const PObject obj  )  const [virtual]

Compare the two objects and return their relative rank. This function is usually overridden by descendent classes to yield the ranking according to the semantics of the object.

The default function is to use the CompareObjectMemoryDirect()# function to do a byte wise memory comparison of the two objects.

LessThan#, EqualTo# or GreaterThan# according to the relative rank of the objects.

Reimplemented from PObject.

Definition at line 1253 of file asner.cxx.

References bitData, and totalBits.

  PAssert(PIsDescendant(&obj, PASN_BitString), PInvalidCast);
  const PASN_BitString & other = (const PASN_BitString &)obj;
  if (totalBits < other.totalBits)
    return LessThan;
  if (totalBits > other.totalBits)
    return GreaterThan;
  return bitData.Compare(other.bitData);

Generated by  Doxygen 1.6.0   Back to index