NxsBlockFactory Class Reference

This abstract class defines the interface for a factory that can generate NxsBlocks. More...

#include <nxsblock.h>

List of all members.

Public Member Functions

virtual NxsBlockGetBlockReaderForID (const std::string &id, NxsReader *reader, NxsToken *token)=0
virtual void BlockError (NxsBlock *b)
virtual void BlockSkipped (NxsBlock *b)

Detailed Description

This abstract class defines the interface for a factory that can generate NxsBlocks.

When the NxsReader::Execute() method encounters a block that it needs to handle, it will first check the registered "singelton" blocks (a block that has been added to it using NxsReader::Add(), those NxsBlock instances are recycled). If no singleton block says that it can read that block of NEXUS (see NxsBlock::CanReadBlockType()), then the NxsReader will walk through its list of factories calling NxsBlockFactory::GetBlockReaderForID() for each until it gets a non-NULL pointer.

If there is an exception during the parsing of that block BlockError will be called for the factory instance that generated the block

If the block returns "false" from NxsBlock::IsEnabled() method, then BlockSkipped will be called by the NxsReader using the factory instance that generated the block

Blocks generated by factories but used successfully in a parse have to be deleted by the client code (See Managing Memory discussion).

Definition at line 299 of file nxsblock.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator Friends
Generated on Mon Mar 29 16:37:12 2010 for NCL by  doxygen 1.6.3