NEXUS CLASS LIBRARY home | classes | functions

Class MyToken

Data Members


Member Functions

MyToken, OutputComment

Class Description

MyToken is derived from NxsToken in order to provide a way to report printable NEXUS comments (the square-bracket comments in NEXUS files that begin with an exclamation point and are intended to be printed in the outout).

Key to symbols and colors

public, protected, private, A = abstract, C = constructor, D = destructor, I = inline, S = static, V = virtual, F = friend


Data Members
     ostream   &out
output file stream


Member Functions
C     MyToken(istream &is, ostream &os)
Takes an ostream reference in addition to the istream reference required by the base class NxsToken. The istream 'is' is passed along to the base class constructor, and 'os' is used to initialize the data member out.
    void   OutputComment(const NxsString &msg)
Overrides the base class version. When a NEXUS printable comment is encountered in a NEXUS file, the comment is passed to the virtual function OutputComment in its argument 'msg'. This version outputs 'msg' directly to both the standard output (cout) and the output file (out).