Binary item I/O template class, used for binary HMM model files.
Public Member Functions | |
bool | load (mootio::mistream *is, T &x) const |
bool | save (mootio::mostream *os, const T &x) const |
bool | load_n (mootio::mistream *is, T *&x, size_t &n) const |
bool | save_n (mootio::mostream *os, const T *x, size_t n) const |
|
inline |
Load a single item
Referenced by mootBinIO::Item< vector< ValT > >::load(), mootBinIO::Item< set< ValT > >::load(), mootBinIO::Item< hash_set< ValT > >::load(), mootBinIO::Item< map< KeyT, ValT > >::load(), mootBinIO::Item< hash_map< KeyT, ValT, HashFuncT, EqualFuncT > >::load(), mootBinIO::Item< std::pair< T1, T2 > >::load(), mootBinIO::Item< mootHMM::Trigram >::load(), mootBinIO::Item< mootEnum< NameT, HashFunc, NameEqlFunc > >::load(), mootBinIO::Item< AssocVector< KeyT, ValT > >::load(), mootBinIO::Item< TrieVectorNode< DataT, CharT, UCharT > >::load(), mootBinIO::Item< SuffixTrie >::load(), mootBinIO::Item< mootTaster::Rule >::load(), and mootBinIO::Item< mootTaster >::load().
|
inline |
Save a single item
Referenced by mootBinIO::Item< vector< ValT > >::save(), mootBinIO::Item< set< ValT > >::save(), mootBinIO::Item< hash_set< ValT > >::save(), mootBinIO::Item< map< KeyT, ValT > >::save(), mootBinIO::Item< hash_map< KeyT, ValT, HashFuncT, EqualFuncT > >::save(), mootBinIO::Item< std::pair< T1, T2 > >::save(), mootBinIO::Item< mootHMM::Trigram >::save(), mootBinIO::Item< mootEnum< NameT, HashFunc, NameEqlFunc > >::save(), mootBinIO::Item< AssocVector< KeyT, ValT > >::save(), mootBinIO::Item< TrieVectorNode< DataT, CharT, UCharT > >::save(), mootBinIO::Item< SuffixTrie >::save(), mootBinIO::Item< mootTaster::Rule >::save(), and mootBinIO::Item< mootTaster >::save().
|
inline |
Load a C-array of items. 'n' should hold the currently allocated length of 'x'. If the saved length is > n, 'x' will be re-allocated. The new size of the array will be stored in 'n' at completion.
Referenced by mootBinIO::Item< char * >::load(), and mootBinIO::Item< string >::load().
|
inline |
Save a C-array of items. 'n' should hold the number of items in 'x', it will be written first.
Referenced by mootBinIO::Item< char * >::save(), and mootBinIO::Item< string >::save().