// This file is part of BULL, a program for phylogenetic simulations // most of the code was written by Mark T. Holder. // It is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // // Some of the code is from publically available source by Paul Lewis, Ziheng Yang, // John Huelsenbeck, David Swofford , and others (as noted in the code). // In fact the main structure of the program was created by modifying Paul Lewis' // basiccmdline.cpp from his NCL // // This code was used in Mark's dissertation, some changes were made in order to // get it to compile on gcc. It is possible that this porting introduced bugs (very // little debugging has been done on UNIX platforms). I would suggest checking // the simulator by generating data on trees with short branches, etc. // This file is part of BULL, a program for phylogenetic simulations // most of the code was written by Mark T. Holder. // It is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // // Some of the code is from publically available source by Paul Lewis, Ziheng Yang, // John Huelsenbeck, David Swofford , and others (as noted in the code). // In fact the main structure of the program was created by modifying Paul Lewis' // basiccmdline.cpp from his NCL // // This code was used in Mark's dissertation, some changes were made in order to // get it to compile on gcc. It is possible that this porting introduced bugs (very // little debugging has been done on UNIX platforms). I would suggest checking // the simulator by generating data on trees with short branches, etc. #ifndef __TAXABLOCK_H #define __TAXABLOCK_H #if defined HAVE_CONFIG_H && HAVE_CONFIG_H # include #endif // // TaxaBlock class // class TaxaBlock : public NexusBlock { friend class DataBlock; friend class AllelesBlock; friend class CharactersBlock; friend class DistancesBlock; // Adding a new data member? Don't forget to: // 1. Describe it in the class header comment at the top of "taxablock.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 int ntax; LabelList taxonLabels; public: class nosuchtaxon {}; // exception potentially thrown by FindTaxon private: void SetNtax( int n ); protected: void Read( NexusToken& token ); void Reset(); public: TaxaBlock(); virtual ~TaxaBlock(); void AddTaxonLabel( std::string s ); void ChangeTaxonLabel( int i, std::string s ); int FindTaxon( std::string label ); bool IsAlreadyDefined( std::string label ); int GetMaxTaxonLabelLength(); int GetNumTaxonLabels(); std::string GetTaxonLabel( int i ); void Report(std::ostream& out ); }; #endif