Provides support for comparer classes. More...
Classes | |
| class | ogdf::EdgeComparer |
| The EdgeComparer compares adjacency entries on base of the position of the nodes given by an Attributed Graph's layout information. More... | |
| class | ogdf::IndexComparer< T > |
| The IndexComparer compares entities like nodes, edges, adjacency entries, based on their index. More... | |
| class | ogdf::NodeComparer< sorterType > |
| class | ogdf::StdComparer< E > |
| Standard comparer (valid as a static comparer). 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... | |
Macros | |
| #define | OGDF_AUGMENT_COMPARER(type) |
| Add this macro to your class to turn it into a full comparer. More... | |
| #define | OGDF_AUGMENT_STATICCOMPARER(type) |
| Add this macro to your class to turn it into a full static comparer. More... | |
| #define | OGDF_STD_COMPARER(type) |
Generates a specialization of the standard static comparer for type based on compare operators. More... | |
Provides support for comparer classes.
| #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 155 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 201 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 70 of file comparer.h.