Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TLDefaultOperators_Relational< T > Struct Template Reference

Relational operator template. More...

#include <defop.h>

Inheritance diagram for TLDefaultOperators_Relational< T >:

Inheritance graph
[legend]
List of all members.

Static Public Member Functions

template<typename T2> bool lt (T const &a, T2 const &b)
template<typename T2> bool le (T const &a, T2 const &b)
template<typename T2> bool gt (T const &a, T2 const &b)
template<typename T2> bool ge (T const &a, T2 const &b)
template<typename T2> bool eq (T const &a, T2 const &b)
template<typename T2> bool ne (T const &a, T2 const &b)

Detailed Description

template<typename T>
struct TLDefaultOperators_Relational< T >

Relational operator template.

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
Can be used as base for combined operator classes.

Definition at line 39 of file defop.h.


Member Function Documentation

template<typename T>
template<typename T2>
bool TLDefaultOperators_Relational< T >::eq T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 55 of file defop.h.

template<typename T>
template<typename T2>
bool TLDefaultOperators_Relational< T >::ge T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 54 of file defop.h.

template<typename T>
template<typename T2>
bool TLDefaultOperators_Relational< T >::gt T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 53 of file defop.h.

template<typename T>
template<typename T2>
bool TLDefaultOperators_Relational< T >::le T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 52 of file defop.h.

template<typename T>
template<typename T2>
bool TLDefaultOperators_Relational< T >::lt T const &  a,
T2 const &  b
[inline, static]
 

Relational operators. Only smaller and smaller/equal would be needed but in order to allow comparisons between different types, I also introduced greater and greater/equal since it is then possible to have the _other_ type as second argument always. This is useful for searching when the _other_ type is the key and the primary type is the node (T) and we only want to implement relational operators as member. (Simply define operator<(const KEY &), etc; no need to have operator<(KEY,T)!) There is a euqal and non-equal version since using !(a==b) instead of a!=b may be inefficient for some types.

Definition at line 51 of file defop.h.

template<typename T>
template<typename T2>
bool TLDefaultOperators_Relational< T >::ne T const &  a,
T2 const &  b
[inline, static]
 

Definition at line 56 of file defop.h.


The documentation for this struct was generated from the following file:
Generated on Sat Feb 19 22:35:50 2005 for Ray by doxygen 1.3.5