observer::PriorityComparator< T > Struct Template Reference

#include <observer.h>

List of all members.

Public Member Functions

bool operator() (const T &value1, const T &value2) const

Detailed Description

template<typename T>
struct observer::PriorityComparator< T >

Priority comparator functor.

T template parameter stands for elements which priority should be compared. It has to provide getPriority method and has to be pointer compatible type (pointer or kind of smart pointer).


Member Function Documentation

template<typename T>
bool observer::PriorityComparator< T >::operator() ( const T &  value1,
const T &  value2 
) const [inline]

Comparator functor.

Parameters:
value1 Value to compare.
value2 Value to compare.
Returns:
value1->getPriority() < value2->getPriority()

The documentation for this struct was generated from the following file: