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

moot::TokenWriterExpat Class Reference

Experimental XML writer class for use with expat-parsed XML or vanilla input.

#include <mootTokenExpatIO.h>

Inheritance diagram for moot::TokenWriterExpat:

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

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors and Such
Output Selection
Overrides
Output Utilities

Public Attributes

Output Parameters
Internal Data

Constructor & Destructor Documentation

moot::TokenWriterExpat::TokenWriterExpat int    fmt = tiofXML,
bool    got_raw_xml = false,
const std::string &    encoding = ""
 

Default constructor: \fmt: output format, a bitmask of TokenIOFormat flags \got_raw_xml: whether this object is part of a lossless XML I/O chain: useful but cryptic -- see use_raw_xml for details. \encoding: destination encoding. still somewhat buggy.

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

Default destructor


Member Function Documentation

void moot::TokenWriterExpat::_put_comment_block_begin mootio::mostream   os
 

Begin a comment block.

void moot::TokenWriterExpat::_put_comment_block_end mootio::mostream   os
 

End a comment block, if one is active.

void moot::TokenWriterExpat::_put_raw_buffer const char *    buf,
size_t    len,
mootio::mostream   os
 

Write some raw data to the current sink. No recoding is performed.

void moot::TokenWriterExpat::_put_sentence const mootSentence   sentence,
mootio::mostream   os
[inline]
 

Write a single sentence to a C stream, obeying use_raw_xml flag

void moot::TokenWriterExpat::_put_token const mootToken   token,
mootio::mostream   os
[inline]
 

Write a single token to a mootio::mostream

void moot::TokenWriterExpat::_put_token_gen const mootToken   token,
mootio::mostream   os
 

Write a single token to a mootio::mostream, gen mode

void moot::TokenWriterExpat::_put_token_raw const mootToken   token,
mootio::mostream   os
 

Write a single token to a mootio::mostream, raw mode

virtual void moot::TokenWriterExpat::close void    [virtual]
 

Close currently selected output sink

Reimplemented from moot::TokenWriter.

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

Begin a comment block.

Reimplemented from moot::TokenWriter.

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

End a comment block, if one is active.

Reimplemented from moot::TokenWriter.

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

Write some raw data to the current sink. No recoding is performed.

Reimplemented from moot::TokenWriter.

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

Write a whole sentence to the current output sink.

Reimplemented from moot::TokenWriter.

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

Write a single token to the current output sink.

Reimplemented from moot::TokenWriter.

void moot::TokenWriterExpat::setEncoding const std::string &    encoding = "" [inline]
 

Set default output encoding. Still somewhat buggy

virtual void moot::TokenWriterExpat::to_mstream mootio::mostream   os [virtual]
 

Select output to a mootio::mostream

Reimplemented from moot::TokenWriter.


Member Data Documentation

std::string moot::TokenWriterExpat::analysis_elt
 

std::string moot::TokenWriterExpat::besttag_elt
 

std::string moot::TokenWriterExpat::eos_elt
 

int moot::TokenWriterExpat::lastc
 

Last character written

std::string moot::TokenWriterExpat::postag_attr
 

std::string moot::TokenWriterExpat::root_elt
 

std::string moot::TokenWriterExpat::text_elt
 

std::string moot::TokenWriterExpat::token_elt
 

std::string moot::TokenWriterExpat::twx_encoding
 

Name of destination encoding. See setEncoding()

mootXMLRecoder moot::TokenWriterExpat::twx_recoder
 

Recoder object: handles text (re-)coding

bool moot::TokenWriterExpat::use_raw_xml
 

Whether the data to write contains raw XML as generated by TokenReaderExpat with save_raw_xml=true. Useful for lossless XML I/O.

Warning:
If this flag is set, arguments to put_* methods must provide tokens of type TokTypeXMLRaw for all document content except the following:
  • sentence boundary markers (TokTypeEOS)
  • 'vanilla' tokens (TokTypeVanilla) In 'use_raw_xml' mode, only the 'besttag' element will be written for 'vanilla' tokens -- in other words, TokTypeXMLRaw tokens are expected for token start- and end- elements, as well as for text, analyses, etc., although no checking is performed for the presence of such elements.
If the flag is false (the default), a document will be generated with a default structure (see root_elt, eos_elt, token_elt, etc.), which should be compatible with the default behavior of TokenReaderExpat.


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