NxsBlock Class Reference

This is the base class from which all block classes are derived. More...

#include <nxsblock.h>

List of all members.

Public Member Functions

 NxsBlock ()
virtual ~NxsBlock ()
virtual void SetNexus (NxsReader *nxsptr)
NxsReaderGetNexus () const
NxsString GetID () const
bool IsEmpty () NCL_COULD_BE_CONST
void Enable ()
void Disable ()
bool IsEnabled () NCL_COULD_BE_CONST
bool IsUserSupplied () NCL_COULD_BE_CONST
virtual unsigned CharLabelToNumber (NxsString s) NCL_COULD_BE_CONST
virtual unsigned TaxonLabelToNumber (NxsString s) const
virtual void SkippingCommand (NxsString commandName)
virtual void HandleBlockIDCommand (NxsToken &token)
virtual void HandleEndblock (NxsToken &token)
virtual void HandleLinkCommand (NxsToken &token)
virtual void HandleTitleCommand (NxsToken &token)
virtual void Report (std::ostream &out) NCL_COULD_BE_CONST
virtual void Reset ()
virtual VecBlockPtr GetImpliedBlocks ()
virtual VecConstBlockPtr GetImpliedBlocksConst () const
virtual NxsBlockCloneBlock (NxsBlockMapper &memo) const
bool ImplementsLinkAPI () const
void SetImplementsLinkAPI (bool v)
virtual void WriteAsNexus (std::ostream &out) const
virtual void WriteLinkCommand (std::ostream &out) const
std::string GetBlockIDCommandString () const

Protected Member Functions

NxsCommandResult HandleBasicBlockCommands (NxsToken &token)
void DemandEquals (NxsToken &token, const char *contextString) const
void DemandIsAtEquals (NxsToken &token, const char *contextString) const
unsigned DemandPositiveInt (NxsToken &token, const char *contextString) const
void GenerateNxsException (NxsToken &token, const char *message=NULL) const
void GenerateUnexpectedTokenNxsException (NxsToken &token, const char *expected=NULL) const
virtual void Read (NxsToken &token)

Detailed Description

This is the base class from which all block classes are derived.

A NxsBlock-derived class encapsulates a Nexus block (e.g. DATA block, TREES block, etc.). The abstract virtual function Read must be overridden for each derived class to provide the ability to read everything following the block name (which is read by the NxsReader object) to the end or endblock statement. Derived classes must provide their own data storage and access functions. The abstract virtual function Report must be overridden to provide some feedback to user on contents of block. The abstract virtual function Reset must be overridden to empty the block of all its contents, restoring it to its just-constructed state.

Definition at line 97 of file nxsblock.h.

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