void NxsReader::Execute ( NxsToken token,
bool  notifyStartStop = true 
) [virtual]

Reads the NxsReader data file from the input stream provided by `token'.

This function is responsible for reading through the name of a each block. Once it has read a block name, it searches for a block reader to handle reading the remainder of the block's contents.

The block object's Read() method is responsible for reading the END or ENDBLOCK command as well as the trailing semicolon.

Execute() handles reading comments that are outside of blocks, as well as the initial "#NEXUS" keyword.

As discussed in Errors in NEXUS files exceptions raised during parsing result in calls to NexusError()

If `notifyStartStop' is false then ExecuteStart and ExecuteStop functions will not to be called.

The order of operations is:

  1. Read until next Begin command.
  2. Search through the registered block instances to find one that returns true from NxsBlock::CanReadBlockType()
  3. If none is found then CreateBlockFromFactories is called.
  4. If no appropriate block reader has been created, then SkippingBlock hook will be called (and the NxsReader will call ReadUntilEndblock to read until the END of the block before returning to step 1.
  5. If an appropriate block reader was found in steps 2 or 3 then ExecuteBlock() will be called.
token the token object used to grab NxsReader tokens
notifyStartStop if true, ExecuteStarting and ExecuteStopping will be called

Reimplemented in PublicNexusReader.

Definition at line 608 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