| Line | |
|---|
| 1 | // ========================================================= // |
|---|
| 2 | // // |
|---|
| 3 | // File : TreeLabeler.h // |
|---|
| 4 | // Purpose : Generate labels for TreeNode // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in Aug 21 // |
|---|
| 7 | // http://www.arb-home.de/ // |
|---|
| 8 | // // |
|---|
| 9 | // ========================================================= // |
|---|
| 10 | |
|---|
| 11 | #ifndef TREELABELER_H |
|---|
| 12 | #define TREELABELER_H |
|---|
| 13 | |
|---|
| 14 | // ----------------------------------------- |
|---|
| 15 | // TreeLabeler and specialisations |
|---|
| 16 | |
|---|
| 17 | struct TreeLabeler { |
|---|
| 18 | virtual ~TreeLabeler() {} |
|---|
| 19 | virtual const char *generate(GBDATA *gb_main, GBDATA *gbd, TreeNode *species, const char *tree_name) const = 0; |
|---|
| 20 | }; |
|---|
| 21 | |
|---|
| 22 | struct Node_ID_Labeler : public TreeLabeler { |
|---|
| 23 | // simply returns the 'name' of the node |
|---|
| 24 | // (=species ID if !zombie; zombie ID; group ID or NULp for inner nodes which are no group) |
|---|
| 25 | |
|---|
| 26 | const char *generate(GBDATA *, GBDATA *, TreeNode *species, const char *) const OVERRIDE; |
|---|
| 27 | }; |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | #else |
|---|
| 32 | #error TreeLabeler.h included twice |
|---|
| 33 | #endif // TREELABELER_H |
|---|
Note: See
TracBrowser
for help on using the repository browser.