File: treesblock.h

package info (click to toggle)
treeviewx 0.5.1%2Bgit20100823.7e4d0e9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,688 kB
  • sloc: cpp: 14,362; xml: 82; makefile: 66
file content (51 lines) | stat: -rwxr-xr-x 1,420 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef __TREESBLOCK_H
#define __TREESBLOCK_H

//
// TreesBlock class
//
class TreesBlock : public NexusBlock
{
   // Adding a new data member? Don't forget to:
   // 1. Describe it in the class header comment at the top of "treesblock.cpp"
   // 2. Initialize it (unless it is self-initializing) in the constructor
   //    and reinitialize it in the Reset function
   // 3. Describe the initial state in the constructor documentation
   // 4. Delete memory allocated to it in both the destructor and Reset function
   // 5. Report it in some way in the Report function

   AssocList translateList;
   LabelList treeName;
   LabelList treeDescription;
   BoolVect rooted;
//   TaxaBlock& taxa;
   int ntrees;
   int defaultTree;
   std::vector <float> treeWeight;

protected:
	void Read( NexusToken& token );
	void Reset();
   TaxaBlock& taxa;

public:
	TreesBlock( TaxaBlock& tb );
	virtual ~TreesBlock();

   int   GetNumDefaultTree();
   int   GetNumTrees();
   nxsstring GetTreeName( int i );
   nxsstring GetTreeDescription( int i );
   double GetTreeWeight ( int i);
   nxsstring GetTranslatedTreeDescription( int i );
   bool HasTranslationTable () { return (translateList.size() > 0); };
   int   IsDefaultTree( int i );
   int   IsRootedTree( int i );
   void  Report( std::ostream& out );
   
   // rdmp
   // Return the translation of the token
   nxsstring GetTranslatedLabel (std::string skey);
};

#endif