PublicNexusReader Class Reference
A NxsReader that uses clone factories to read public blocks.
More...
#include <nxspublicblocks.h>
List of all members.
Public Types |
enum | NexusBlocksToRead { ,
NEXUS_TREES_BLOCK_BIT = 0x02,
NEXUS_CHARACTERS_BLOCK_BIT = 0x04,
NEXUS_ASSUMPTIONS_BLOCK_BIT = 0x08,
NEXUS_SETS_BLOCK_BIT = 0x10,
NEXUS_UNALIGNED_BLOCK_BIT = 0x20,
NEXUS_DISTANCES_BLOCK_BIT = 0x40,
NEXUS_UNKNOWN_BLOCK_BIT = 0x80
} |
Public Member Functions |
| PublicNexusReader (const int blocksToRead=-1, NxsReader::WarningHandlingMode mode=NxsReader::WARNINGS_TO_STDERR) |
virtual void | Execute (NxsToken &token, bool notifyStartStop=true) |
NxsTaxaBlock * | RegisterTaxa (const std::vector< std::string > &tl) |
NxsAssumptionsBlock * | GetAssumptionsBlockTemplate () |
NxsCharactersBlock * | GetCharactersBlockTemplate () |
NxsDataBlock * | GetDataBlockTemplate () |
NxsDistancesBlock * | GetDistancesBlockTemplate () |
NxsTaxaBlock * | GetTaxaBlockTemplate () |
NxsTreesBlock * | GetTreesBlockTemplate () |
NxsUnalignedBlock * | GetUnalignedBlockTemplate () |
NxsStoreTokensBlockReader * | GetUnknownBlockTemplate () const |
unsigned | GetNumAssumptionsBlocks (const NxsTaxaBlock *taxa) const |
unsigned | GetNumAssumptionsBlocks (const NxsCharactersBlock *chars) const |
unsigned | GetNumAssumptionsBlocks (const NxsTreesBlock *trees) const |
NxsAssumptionsBlock * | GetAssumptionsBlock (const NxsTaxaBlock *taxa, unsigned index) const |
unsigned | GetNumUnknownBlocks () const |
NxsStoreTokensBlockReader * | GetUnknownBlock (unsigned index) const |
unsigned | GetNumCharactersBlocks (const NxsTaxaBlock *taxa) const |
NxsCharactersBlock * | GetCharactersBlock (const NxsTaxaBlock *taxa, unsigned index) const |
unsigned | GetNumDistancesBlocks (const NxsTaxaBlock *taxa) const |
NxsDistancesBlock * | GetDistancesBlock (const NxsTaxaBlock *taxa, unsigned index) const |
unsigned | GetNumTaxaBlocks () const |
NxsTaxaBlock * | GetTaxaBlock (unsigned index) const |
unsigned | GetNumTreesBlocks (const NxsTaxaBlock *taxa) const |
NxsTreesBlock * | GetTreesBlock (const NxsTaxaBlock *taxa, unsigned index) const |
unsigned | GetNumUnalignedBlocks (const NxsTaxaBlock *taxa) const |
NxsUnalignedBlock * | GetUnalignedBlock (const NxsTaxaBlock *taxa, unsigned index) const |
virtual void | DeleteBlocksFromFactories () |
virtual void | ClearUsedBlockList () |
virtual void | ClearContent () |
void | AddReadAssumptionsBlock (NxsAssumptionsBlock *block) |
void | AddReadCharactersBlock (NxsCharactersBlock *block) |
void | AddReadDataBlock (NxsDataBlock *block) |
void | AddReadDistancesBlock (NxsDistancesBlock *block) |
void | AddReadTaxaBlock (NxsTaxaBlock *block) |
void | AddReadTreesBlock (NxsTreesBlock *block) |
void | AddReadUnalignedBlock (NxsUnalignedBlock *block) |
void | AddReadUnknownBlock (NxsStoreTokensBlockReader *block) |
Static Public Member Functions |
static BlockReaderList | parseFileOrThrow (const char *filepath, NxsReader::WarningHandlingMode mode=NxsReader::WARNINGS_TO_STDERR, bool parsePrivateBlocks=true, bool storeTokenInfo=true) |
Public Attributes |
NxsConversionOutputRecord | conversionOutputRecord |
Protected Member Functions |
void | PostExecuteHook () |
virtual void | AddFactory (NxsBlockFactory *) |
Detailed Description
A NxsReader that uses clone factories to read public blocks.
The blocks created by reading a file MUST BE DELETED by the caller (either by a call to DeleteBlocksFromFactories() or by requesting each pointer to a block and then deleting the blocks).
Blocks are created by cloning a template block. If you would like to alter the default behavior of a block, you can request a reference to the "template" NxsBlock of the appropriate type, modify it, and then parse the file.
You may give the reader "context" programatically by adding "Read" blocks (which will mimic the behavior of those blocks having appeared in the file itself.
Commands in Non-public blocks are dealt with by creating a NxsStoreTokensBlockReader to store the commands.
After parsing, the client can request the number of TAXA blocks read, and the number of CHARACTERS, TREES, ... blocks that refer to a particular taxa block.
NOT COPYABLE
Definition at line 281 of file nxspublicblocks.h.
The documentation for this class was generated from the following files: