1 # See www.openfst.org for extensive documentation on this weighted
2 # finite-state transducer library.
5 from google3 cimport string
6 from basictypes cimport int8
7 from basictypes cimport int16
8 from basictypes cimport int32
9 from basictypes cimport int64
10 from basictypes cimport uint8
11 from basictypes cimport uint16
12 from basictypes cimport uint32
13 from basictypes cimport uint64
16 cdef extern from "<iostream>" namespace "std" nogil:
18 cdef cppclass iostream:
22 cdef cppclass istream(iostream):
26 cdef cppclass ostream(iostream):
31 # We are ignoring openmodes for the moment.
34 cdef extern from "<fstream>" namespace "std" nogil:
36 cdef cppclass ifstream(istream):
38 ifstream(const string &)
40 cdef cppclass ofstream(ostream):
42 ofstream(const string &)
45 cdef extern from "<sstream>" namespace "std" nogil:
47 cdef cppclass stringstream(istream, ostream):
53 stringstream &operator<<(const string &)
55 stringstream &operator<<(bool)
57 # We define these in terms of the Google basictypes.
59 stringstream &operator<<(int8)
61 stringstream &operator<<(uint8)
63 stringstream &operator<<(int16)
65 stringstream &operator<<(uint16)
67 stringstream &operator<<(int32)
69 stringstream &operator<<(uint32)
71 stringstream &operator<<(int64)
73 stringstream &operator<<(uint64)
75 stringstream &operator<<(double)
77 stringstream &operator<<(long double)