List of all members
moot::wasteAnnotatorWriter Class Reference

TokenWriter wrapper for wasteAnnotator.

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

Public Member Functions

Constructors etc.

underlying data sink

 wasteAnnotatorWriter (int fmt=tiofMediumRare, const std::string &name="wasteAnnotatorWriter")
 
 ~wasteAnnotatorWriter ()
 
TokenWriter API: Output Selection
virtual void to_mstream (mootio::mostream *mostreamp)
 
virtual void close (void)
 
TokenWriter API: Token Stream Access
virtual void put_token (const mootToken &token)
 
virtual void put_tokens (const mootSentence &tokens)
 
virtual void put_sentence (const mootSentence &sentence)
 
virtual void put_raw_buffer (const char *buf, size_t len)
 
wasteAnnotatorWriter: local methods
void to_writer (TokenWriter *sink)
 
void _put_token (const mootToken &token)
 
void _put_tokens (const mootSentence &tokens)
 
void _put_sentence (const mootSentence &sentence)
 
void _put_raw_buffer (const char *buf, size_t len)
 
- Public Member Functions inherited from moot::TokenWriter
 TokenWriter (int fmt=tiofWellDone, const std::string &name="TokenWriter")
 
virtual ~TokenWriter (void)
 
virtual void to_mstream (mootio::mostream &mos)
 
virtual void to_filename (const char *filename)
 
virtual void to_file (FILE *file)
 
virtual void to_fd (int fd)
 
virtual void to_cxxstream (std::ostream &os)
 
virtual bool opened (void)
 
virtual bool flush (void)
 
bool autoflush (mootio::mostream *os)
 
virtual void put_comment_block_begin (void)
 
virtual void put_comment_block_end (void)
 
virtual void put_comment_buffer (const char *buf, size_t len)
 
virtual void put_comment (const char *s)
 
virtual void put_comment_buffer (const std::string &s)
 
virtual void printf_comment (const char *fmt,...)
 
virtual void put_raw (const char *s)
 
virtual void put_raw (const std::string &s)
 
virtual void printf_raw (const char *fmt,...)
 
virtual void writer_name (const std::string &myname)
 
virtual void carp (const char *fmt,...)
 

Public Attributes

public data
wasteAnnotator waw_annotator
 
TokenWriterwaw_sink
 
- Public Attributes inherited from moot::TokenWriter
int tw_format
 
std::string tw_name
 
mootio::mostreamtw_ostream
 
bool tw_ostream_created
 
bool tw_is_comment_block
 
void * tw_data
 

Additional Inherited Members

- Static Public Member Functions inherited from moot::TokenIO
static int parse_format_string (const std::string &fmtString)
 
static int guess_filename_format (const char *filename)
 
static bool is_empty_format (int fmt)
 
static int sanitize_format (int fmt, int fmt_implied=tiofNone, int fmt_default=tiofNone)
 
static int parse_format_request (const char *request, const char *filename=__null, int fmt_implied=tiofNone, int fmt_default=tiofNone)
 
static std::string format_canonical_string (int fmt)
 
static class TokenReadernew_reader (int fmt)
 
static class TokenWriternew_writer (int fmt)
 
static class TokenReaderfile_reader (const char *filename, const char *fmt_request=__null, int fmt_implied=tiofNone, int fmt_default=tiofNone)
 
static class TokenWriterfile_writer (const char *filename, const char *fmt_request=__null, int fmt_implied=tiofNone, int fmt_default=tiofNone)
 
static size_t pipe_tokens (class TokenReader *reader, class TokenWriter *writer)
 
static size_t pipe_sentences (class TokenReader *reader, class TokenWriter *writer)
 

Constructor & Destructor Documentation

◆ wasteAnnotatorWriter()

moot::wasteAnnotatorWriter::wasteAnnotatorWriter ( int  fmt = tiofMediumRare,
const std::string &  name = "wasteAnnotatorWriter" 
)
inline

Default constructor

◆ ~wasteAnnotatorWriter()

moot::wasteAnnotatorWriter::~wasteAnnotatorWriter ( )

destructor calls close()

Member Function Documentation

◆ to_mstream()

virtual void moot::wasteAnnotatorWriter::to_mstream ( mootio::mostream mostreamp)
virtual

Select output to a mootio::mostream pointer; just wraps sink->to_mstream()

Reimplemented from moot::TokenWriter.

◆ close()

virtual void moot::wasteAnnotatorWriter::close ( void  )
virtual

Finish output to currently selected sink & perform any required cleanup operations. wasteAnnotatorWriter override force-fluses buffer and unsets sink.

Reimplemented from moot::TokenWriter.

◆ put_token()

virtual void moot::wasteAnnotatorWriter::put_token ( const mootToken token)
inlinevirtual

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

Reimplemented from moot::TokenWriter.

◆ put_tokens()

virtual void moot::wasteAnnotatorWriter::put_tokens ( const mootSentence tokens)
inlinevirtual

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

Reimplemented from moot::TokenWriter.

◆ put_sentence()

virtual void moot::wasteAnnotatorWriter::put_sentence ( const mootSentence sentence)
inlinevirtual

Write a single sentence to the currently selected output sink. Descendants may override this method. Default implementation just calls put_sentence().

Reimplemented from moot::TokenWriter.

◆ put_raw_buffer()

virtual void moot::wasteAnnotatorWriter::put_raw_buffer ( const char *  buf,
size_t  len 
)
inlinevirtual

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

Reimplemented from moot::TokenWriter.

◆ to_writer()

void moot::wasteAnnotatorWriter::to_writer ( TokenWriter sink)

Select output to subordinate TokenWriter

◆ _put_token()

void moot::wasteAnnotatorWriter::_put_token ( const mootToken token)

◆ _put_tokens()

void moot::wasteAnnotatorWriter::_put_tokens ( const mootSentence tokens)

◆ _put_sentence()

void moot::wasteAnnotatorWriter::_put_sentence ( const mootSentence sentence)

◆ _put_raw_buffer()

void moot::wasteAnnotatorWriter::_put_raw_buffer ( const char *  buf,
size_t  len 
)

Member Data Documentation

◆ waw_annotator

wasteAnnotator moot::wasteAnnotatorWriter::waw_annotator

◆ waw_sink

TokenWriter* moot::wasteAnnotatorWriter::waw_sink

wrapped annotator


The documentation for this class was generated from the following file: