bool NxsReader::ExecuteBlock ( NxsToken token,
const NxsString currBlockName,
NxsBlock currentBlock,
NxsBlockFactory sourceOfBlock 
) [protected]

Called internally when the NxsReader has found the correct NxsBlock to read a block in a file.

`token` will be at the block ID. `currBlockName` will be the block ID as a string. `currentBlock` will be the block reader to be used `sourceOfBlock` is the factory that created the block (or 0L). If sourceOfBlock is not NULL then it will be alerted if the block is skipped (BlockSkipped() method) or there was an error in the read (BlockError() method). The factory is expected to delete the block instances in these cases (NxsReader will not refer to those instances again).

The following steps occur:

  • the EnteringBlock hook is called (if it returns false, the block will be skipped by calling NxsReader::SkippingBlock
  • NxsBlock::Reset() is called on the reader block
  • NxsBlock::Read() method of the reader block is called
  • If an exception is generated, the NexusError is called.
  • If no exception is generated by Read then the block is processed:
    • if NxsReader::cullIdenticalTaxaBlocks(true) has been called before Execute and this is a repeated TAXA block, the block will be deleted.
    • the BlockReadHook() will store all of the implied blocks (by calling NxsBlock::GetImpliedBlocks()) and the block itself.
    • if one of the implied blocks is a repeated TAXA block and NxsReader::cullIdenticalTaxaBlocks(true) has been called, then the blocks NxsBlock::SwapEquivalentTaxaBlock() method will determine whether or not the duplicate taxa block can be deleted.
    • each stored block will generate a call to NxsReader::AddBlockToUsedBlockList()
  • ExitingBlock() is called
  • PostBlockReadingHook() is called

Definition at line 860 of file nxsreader.cpp.

 All Classes Functions Variables Enumerations Enumerator Friends
Generated on Mon Mar 29 16:37:13 2010 for NCL by  doxygen 1.6.3