00001 #ifndef _RAASPECIESTREE_H_
00002 #define _RAASPECIESTREE_H_
00003
00004 extern "C" {
00005 #include "RAA_acnuc.h"
00006 }
00007
00008 #include <string>
00009
00010 namespace bpp {
00011
00021 class RaaSpeciesTree {
00022 friend class RAA;
00023 public:
00024
00033 int findNode(const std::string &taxon, bool allowsynonym = false);
00034
00041 int findNode(int tid);
00042
00049 std::string getName(int rank);
00050
00057 int parent(int rank);
00058
00065 int getTid(int rank);
00066
00073 int count(int rank);
00074
00083 std::string label(int rank);
00084
00091 int firstChild(int rank);
00092
00100 int nextChild(int parent, int child);
00101
00109 bool isChild(int parent, int child);
00110
00120 int nextSynonym(int rank);
00121
00128 int getMajor(int rank);
00129
00130 private:
00131 raa_db_access *raa_data;
00132 raa_node **sp_tree;
00133 int *tid_to_rank;
00134 int max_tid;
00135 int max_sp;
00136 };
00137
00138 }
00139
00140 #endif // _RAASPECIESTREE_H_
00141