Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

moot::TokenWriter Class Reference

Abstract class for token output.

#include <mootTokenIO.h>

Inheritance diagram for moot::TokenWriter:

Inheritance graph
[legend]
Collaboration diagram for moot::TokenWriter:

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors etc.
Output Selection
Output Methods: Token-level
Output Methods: Comments
Output Methods: Raw
Diagnostics

Public Attributes


Constructor & Destructor Documentation

moot::TokenWriter::TokenWriter int    fmt = tiofWellDone,
const std::string &    name = "TokenWriter"
[inline]
 

Default constructor

Parameters:
fmt  output format: should be a bitmask of TokenIO::TokenIOFormat flags
name  name of TokenWriter subtype for diagnostics

virtual moot::TokenWriter::~TokenWriter void    [inline, virtual]
 

Default destructor


Member Function Documentation

virtual void moot::TokenWriter::carp const char *    fmt,
...   
[virtual]
 

Complain

virtual void moot::TokenWriter::close void    [inline, virtual]
 

Finish output to currently selected sink & perform any required cleanup operations. This method should always be called before selecting a new output sink. The current output stream is only closed if it was created locally.

Descendants may override this method.

Reimplemented in moot::TokenWriterExpat.

virtual void moot::TokenWriter::printf_comment const char *    fmt,
...   
[virtual]
 

Write a comment to the currently selected output sink, printf() style. Descendants may override this method.

virtual void moot::TokenWriter::printf_raw const char *    fmt,
...   
[virtual]
 

Write some data to the currently selected output sink, printf() style. Descendants may override this method.

virtual void moot::TokenWriter::put_comment const char *    s [inline, virtual]
 

Write a single comment to the currently selected output sink Descendants may override this method.

virtual void moot::TokenWriter::put_comment_block_begin void    [inline, virtual]
 

Begin a comment block. This may effect behavior of subsequent put_raw_*() calls. Descendants using comments should override this method.

Reimplemented in moot::TokenWriterExpat.

virtual void moot::TokenWriter::put_comment_block_end void    [inline, virtual]
 

End a comment block. This may effect behavior of subsequent put_raw() calls. Descendants using comments should override this method.

Reimplemented in moot::TokenWriterExpat.

virtual void moot::TokenWriter::put_comment_buffer const std::string &    s [inline, virtual]
 

Write a single comment to the currently selected output sink Descendants may override this method.

virtual void moot::TokenWriter::put_comment_buffer const char *    buf,
size_t    len
[inline, virtual]
 

Write a single comment to the currently selected output sink Descendants may override this method.

virtual void moot::TokenWriter::put_raw const std::string &    s [inline, virtual]
 

Write some data to the currently selected output sink Descendants may override this method.

virtual void moot::TokenWriter::put_raw const char *    s [inline, virtual]
 

Write some data to the currently selected output sink Descendants may override this method.

virtual void moot::TokenWriter::put_raw_buffer const char *    buf,
size_t    len
[inline, virtual]
 

Write some data to the currently selected output sink Descendants may override this method.

Reimplemented in moot::TokenWriterExpat, and moot::TokenWriterNative.

virtual void moot::TokenWriter::put_sentence const mootSentence   sentence [inline, virtual]
 

Write a single sentence to the currently selected output sink. Descendants may override this method. Default implementation just calls putToken() for every element of sentence.

Reimplemented in moot::TokenWriterExpat, and moot::TokenWriterNative.

virtual void moot::TokenWriter::put_token const mootToken   token [inline, virtual]
 

Write a single token to the currently selected output sink. Descendants must override this method.

Reimplemented in moot::TokenWriterExpat, and moot::TokenWriterNative.

virtual void moot::TokenWriter::to_cxxstream std::ostream &    os [inline, virtual]
 

Select output to a C++ stream. Caller is responsible for allocation and de-allocation. Descendants using C++ stream input may override this method. Default implementation calls from_mstream().

virtual void moot::TokenWriter::to_fd int    fd [inline, virtual]
 

Select output to a file descriptor. Caller is responsible for opening and closing the stream. Descendants using file descriptor may override this method. No default implementation.

virtual void moot::TokenWriter::to_file FILE *    file [inline, virtual]
 

Select output to a C stream. Caller is responsible for opening and closing the stream. Descendants using C stream output may override this method. Default implementation calls to_fd().

virtual void moot::TokenWriter::to_filename const char *    filename [inline, virtual]
 

Select output to a named file. Descendants using named file output may override this method. The filename "-" may be used to specify stdout.

virtual void moot::TokenWriter::to_mstream mootio::mostream   mos [inline, virtual]
 

Select output to a mootio::mistream object, reference version. Default implementation just calls to_mstream(&mos).

virtual void moot::TokenWriter::to_mstream mootio::mostream   mostreamp [inline, virtual]
 

Select output to a mootio::mostream object, pointer version. This is the basic case. Descendendant classes may override this method.

Reimplemented in moot::TokenWriterExpat.

virtual void moot::TokenWriter::writer_name const std::string &    myname [inline, virtual]
 

Set writer subtype name to use for diagnostics. Descendants may override this method.


Member Data Documentation

int moot::TokenWriter::tw_format
 

Format flags: bitmask of TokenIO::TokenIOFormat flags

bool moot::TokenWriter::tw_is_comment_block
 

Whether we're in a comment-block

std::string moot::TokenWriter::tw_name
 

Name of TokenWriter subtype for diagnostics

mootio::mostream* moot::TokenWriter::tw_ostream
 

Pointer to underlying mootio::mostream used for output

bool moot::TokenWriter::tw_ostream_created
 

Whether we created @tw_ostream ourselves


The documentation for this class was generated from the following file:
Generated on Mon Sep 11 16:10:37 2006 for libmoot by doxygen1.2.18