diff options
author | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2013-03-04 11:30:34 +0000 |
---|---|---|
committer | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2013-03-04 11:30:34 +0000 |
commit | 5bf56ba7027cd5f22ff52d0138893f7a585135fb (patch) | |
tree | 19e17fc79b8873e66f211276d4dd169c480cede1 /src/include/fst/fst.h | |
parent | 3da1eb108d36da35333b2d655202791af854996b (diff) | |
parent | 5b6dc79427b8f7eeb6a7ff68034ab8548ce670ea (diff) | |
download | openfst-idea133-weekly-release.tar.gz |
Merge remote-tracking branch 'goog/ics-ub-google-tts' into jb-mr2-devandroid-sdk-4.4.2_r1.0.1android-sdk-4.4.2_r1android-cts-4.4_r4android-cts-4.4_r1android-4.4w_r1android-4.4_r1.2.0.1android-4.4_r1.2android-4.4_r1.1.0.1android-4.4_r1.1android-4.4_r1.0.1android-4.4_r1android-4.4_r0.9android-4.4_r0.8android-4.4_r0.7android-4.4.4_r2.0.1android-4.4.4_r2android-4.4.4_r1.0.1android-4.4.4_r1android-4.4.3_r1.1.0.1android-4.4.3_r1.1android-4.4.3_r1.0.1android-4.4.3_r1android-4.4.2_r2.0.1android-4.4.2_r2android-4.4.2_r1.0.1android-4.4.2_r1android-4.4.1_r1.0.1android-4.4.1_r1android-4.3_r3.1android-4.3_r3android-4.3_r2.3android-4.3_r2.2android-4.3_r2.1android-4.3_r2android-4.3_r1.1android-4.3_r1android-4.3_r0.9.1android-4.3_r0.9android-4.3.1_r1tools_r22.2kitkat-wearkitkat-releasekitkat-mr2.2-releasekitkat-mr2.1-releasekitkat-mr2-releasekitkat-mr1.1-releasekitkat-mr1-releasekitkat-devkitkat-cts-releasekitkat-cts-devjb-mr2.0.0-releasejb-mr2.0-releasejb-mr2-releasejb-mr2-devidea133-weekly-releaseidea133
Diffstat (limited to 'src/include/fst/fst.h')
-rw-r--r-- | src/include/fst/fst.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/include/fst/fst.h b/src/include/fst/fst.h index dd11e4f..150fc4e 100644 --- a/src/include/fst/fst.h +++ b/src/include/fst/fst.h @@ -53,6 +53,11 @@ template <class A> class ArcIteratorData; template <class A> class MatcherBase; struct FstReadOptions { + // FileReadMode(s) are advisory, there are many conditions than prevent a + // file from being mapped, READ mode will be selected in these cases with + // a warning indicating why it was chosen. + enum FileReadMode { READ, MAP }; + string source; // Where you're reading from const FstHeader *header; // Pointer to Fst header. If non-zero, use // this info (don't read a stream header) @@ -60,19 +65,20 @@ struct FstReadOptions { // this info (read and skip stream isymbols) const SymbolTable* osymbols; // Pointer to output symbols. If non-zero, use // this info (read and skip stream osymbols) + FileReadMode mode; // Read or map files (advisory, if possible) - explicit FstReadOptions(const string& src = "<unspecfied>", + explicit FstReadOptions(const string& src = "<unspecified>", const FstHeader *hdr = 0, const SymbolTable* isym = 0, - const SymbolTable* osym = 0) - : source(src), header(hdr), isymbols(isym), osymbols(osym) {} + const SymbolTable* osym = 0); explicit FstReadOptions(const string& src, const SymbolTable* isym, - const SymbolTable* osym = 0) - : source(src), header(0), isymbols(isym), osymbols(osym) {} -}; + const SymbolTable* osym = 0); + // Helper function to convert strings FileReadModes into their enum value. + static FileReadMode ReadMode(const string &mode); +}; struct FstWriteOptions { string source; // Where you're writing to |