HFST - Helsinki Finite-State Transducer Technology - C++ API  version 3.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
MyTransducerLibraryOutputStream Class Reference

A skeleton class for writing a new type of binary transducers to a stream. More...

#include <MyTransducerLibraryTransducer.h>

Public Member Functions

void append_implementation_specific_header_data (std::vector< char > &header, MyFst *t)
 Optional: if you want to store implementation specific data to the binary transducer header. More...
 
void close (void)
 Close the stream. If it points to standard out, nothing is done. More...
 
 MyTransducerLibraryOutputStream (void)
 Create and open a stream to standard out. More...
 
 MyTransducerLibraryOutputStream (const std::string &filename)
 Create and open a stream to file filename. More...
 
void write (const char &c)
 Write a char to the stream. More...
 
void write_transducer (MyFst *transducer)
 Write a MyFst to the stream. More...
 

Detailed Description

A skeleton class for writing a new type of binary transducers to a stream.

If your transducer write function uses C FILEs, see class SfstOutputStream or FomaOutputStream for an example how to implement the functions in class MyTransducerLibraryOutputStream. If your transducer write function uses C++ streams, see class TropicalWeightOutputStream or LogWeightOutputStream.

Constructor & Destructor Documentation

Create and open a stream to standard out.

MyTransducerLibraryOutputStream ( const std::string &  filename)

Create and open a stream to file filename.

Member Function Documentation

void append_implementation_specific_header_data ( std::vector< char > &  header,
MyFst *  t 
)

Optional: if you want to store implementation specific data to the binary transducer header.

void close ( void  )

Close the stream. If it points to standard out, nothing is done.

void write ( const char &  c)

Write a char to the stream.

void write_transducer ( MyFst *  transducer)

Write a MyFst to the stream.


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