activemq-cpp-3.4.0
|
This implementation of Comparator is designed to allows objects in a Collection to be sorted or tested for equality based on the value of the Object being Pointed to and not the value of the contained pointer in the Pointer instance. More...
#include <src/main/decaf/lang/Pointer.h>
Public Member Functions | |
virtual | ~PointerComparator () |
virtual bool | operator() (const Pointer< T, R > &left, const Pointer< T, R > &right) const |
virtual int | compare (const Pointer< T, R > &left, const Pointer< T, R > &right) const |
This implementation of Comparator is designed to allows objects in a Collection to be sorted or tested for equality based on the value of the Object being Pointed to and not the value of the contained pointer in the Pointer instance.
This can be useful in the case where a series of values in a Collection is more efficiently accessed in the Objects Natural Order and not the underlying pointers location in memory.
Also this allows Pointer objects that Point to different instances of the same type to be compared based on the comparison of the object itself and not just the value of the pointer.
virtual decaf::lang::PointerComparator< T, R >::~PointerComparator | ( | ) | [inline, virtual] |
virtual int decaf::lang::PointerComparator< T, R >::compare | ( | const Pointer< T, R > & | left, |
const Pointer< T, R > & | right | ||
) | const [inline, virtual] |
virtual bool decaf::lang::PointerComparator< T, R >::operator() | ( | const Pointer< T, R > & | left, |
const Pointer< T, R > & | right | ||
) | const [inline, virtual] |