Declarations for Comparer objects. More...
Go to the source code of this file.
Classes | |
| class | ogdf::StdComparer< E > |
| Standard comparer (valid as a static comparer). More... | |
| class | ogdf::StdComparer< bool > |
| Generates a specialization of the standard static comparer for booleans. More... | |
| class | ogdf::TargetComparer< CONTENTTYPE, STATICCONTENTCOMPARER > |
| A static comparer which compares the target of pointers ("content"), instead of the pointer's adresses. More... | |
| class | ogdf::VComparer< E > |
| Abstract base class for comparer classes. More... | |
Namespaces | |
| namespace | ogdf |
| The namespace for all OGDF objects. | |
Macros | |
| #define | OGDF_AUGMENT_COMPARER(type) |
| Add this macro to your class to turn it into a full comparer. | |
| #define | OGDF_AUGMENT_STATICCOMPARER(type) |
| Add this macro to your class to turn it into a full static comparer. | |
| #define | OGDF_COMPARER_H |
| #define | OGDF_STD_COMPARER(type) |
| Generates a specialization of the standard static comparer for type based on compare operators. | |
Declarations for Comparer objects.
Definition in file comparer.h.
| #define OGDF_AUGMENT_COMPARER | ( | type | ) |
Add this macro to your class to turn it into a full comparer.
It is assumed that your class has a method "compare(const type &x, const type &y)", which returns 0 if the two elements are equal, a negative value if x is smaller, and a positive value if x is greater.
Note: If the compare function of your class requires no additional data other than the two elements to compare, your should usually use the more general OGDF_AUGMENT_STATICCOMPARER: A static comparer is also always valid as a normal comparer.
Usage in Definition:
Use the Comparer:
Definition at line 171 of file comparer.h.
| #define OGDF_AUGMENT_STATICCOMPARER | ( | type | ) |
Add this macro to your class to turn it into a full static comparer.
It is assumed that your class has a static method "compare(const type &x, const type &y)", which returns 0 if the two elements are equal, a negative value if x is smaller, and a positive value if x is greater.
Note: You should use this macro instead of OGDF_AUGMENT_COMPARER whenever your compare function requires no additional data stored in the object, other than the two elements to compare. A static comparer is also always valid as a normal comparer.
Usage in Definition:
Use the Comparer:
Definition at line 215 of file comparer.h.
| #define OGDF_COMPARER_H |
Definition at line 49 of file comparer.h.
| #define OGDF_STD_COMPARER | ( | type | ) |
Generates a specialization of the standard static comparer for type based on compare operators.
Definition at line 91 of file comparer.h.