HFST - Helsinki Finite-State Transducer Technology API
version 3.7.1
|
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... | |
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.
MyTransducerLibraryOutputStream | ( | void | ) |
Create and open a stream to standard out.
MyTransducerLibraryOutputStream | ( | const std::string & | filename | ) |
Create and open a stream to file filename.
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.