KaldiObjectHolder works for Kaldi objects that have the "standard" Read and Write functions, and a copy constructor. More...
#include <kaldi-holder-inl.h>
Public Types | |
typedef KaldiType | T |
Public Member Functions | |
KaldiObjectHolder () | |
void | Clear () |
bool | Read (std::istream &is) |
T & | Value () |
void | Swap (KaldiObjectHolder< T > *other) |
bool | ExtractRange (const KaldiObjectHolder< T > &other, const std::string &range) |
~KaldiObjectHolder () | |
Static Public Member Functions | |
static bool | Write (std::ostream &os, bool binary, const T &t) |
static bool | IsReadInBinary () |
Private Member Functions | |
KALDI_DISALLOW_COPY_AND_ASSIGN (KaldiObjectHolder) | |
Private Attributes | |
T * | t_ |
KaldiObjectHolder works for Kaldi objects that have the "standard" Read and Write functions, and a copy constructor.
Definition at line 45 of file kaldi-holder-inl.h.
typedef KaldiType T |
Definition at line 47 of file kaldi-holder-inl.h.
|
inline |
Definition at line 49 of file kaldi-holder-inl.h.
|
inline |
Definition at line 115 of file kaldi-holder-inl.h.
References KaldiObjectHolder< KaldiType >::KALDI_DISALLOW_COPY_AND_ASSIGN(), and KaldiObjectHolder< KaldiType >::t_.
|
inline |
|
inline |
Definition at line 106 of file kaldi-holder-inl.h.
References kaldi::ExtractObjectRange(), KALDI_ASSERT, and KaldiObjectHolder< KaldiType >::t_.
|
inlinestatic |
Definition at line 93 of file kaldi-holder-inl.h.
|
private |
Referenced by TokenHolder::ExtractRange(), TokenVectorHolder::ExtractRange(), HtkMatrixHolder::ExtractRange(), SphinxMatrixHolder< kFeatDim >::ExtractRange(), BasicHolder< BasicType >::~BasicHolder(), BasicPairVectorHolder< BasicType >::~BasicPairVectorHolder(), BasicVectorHolder< BasicType >::~BasicVectorHolder(), BasicVectorVectorHolder< BasicType >::~BasicVectorVectorHolder(), and KaldiObjectHolder< KaldiType >::~KaldiObjectHolder().
|
inline |
Definition at line 70 of file kaldi-holder-inl.h.
References kaldi::InitKaldiInputStream(), KALDI_WARN, and KaldiObjectHolder< KaldiType >::t_.
|
inline |
Definition at line 101 of file kaldi-holder-inl.h.
References kaldi::swap(), and KaldiObjectHolder< KaldiType >::t_.
|
inline |
Definition at line 95 of file kaldi-holder-inl.h.
References KALDI_ERR, and KaldiObjectHolder< KaldiType >::t_.
Definition at line 51 of file kaldi-holder-inl.h.
References kaldi::InitKaldiOutputStream(), and KALDI_WARN.
|
private |
Definition at line 118 of file kaldi-holder-inl.h.
Referenced by KaldiObjectHolder< KaldiType >::Clear(), BasicVectorHolder< BasicType >::Clear(), BasicVectorVectorHolder< BasicType >::Clear(), BasicPairVectorHolder< BasicType >::Clear(), TokenHolder::Clear(), TokenVectorHolder::Clear(), HtkMatrixHolder::Clear(), KaldiObjectHolder< KaldiType >::ExtractRange(), KaldiObjectHolder< KaldiType >::Read(), BasicHolder< BasicType >::Read(), BasicVectorHolder< BasicType >::Read(), BasicVectorVectorHolder< BasicType >::Read(), BasicPairVectorHolder< BasicType >::Read(), TokenHolder::Read(), TokenVectorHolder::Read(), HtkMatrixHolder::Read(), KaldiObjectHolder< KaldiType >::Swap(), BasicHolder< BasicType >::Swap(), BasicVectorHolder< BasicType >::Swap(), BasicVectorVectorHolder< BasicType >::Swap(), BasicPairVectorHolder< BasicType >::Swap(), TokenHolder::Swap(), TokenVectorHolder::Swap(), HtkMatrixHolder::Swap(), KaldiObjectHolder< KaldiType >::Value(), BasicHolder< BasicType >::Value(), BasicVectorHolder< BasicType >::Value(), BasicVectorVectorHolder< BasicType >::Value(), BasicPairVectorHolder< BasicType >::Value(), TokenHolder::Value(), TokenVectorHolder::Value(), HtkMatrixHolder::Value(), and KaldiObjectHolder< KaldiType >::~KaldiObjectHolder().