Definition at line 276 of file kaldi-io.cc.
◆ PipeOutputImpl()
◆ ~PipeOutputImpl()
◆ Close()
◆ Open()
virtual bool Open |
( |
const std::string & |
wxfilename, |
|
|
bool |
binary |
|
) |
| |
|
inlinevirtual |
Implements OutputImplBase.
Definition at line 280 of file kaldi-io.cc.
References KALDI_ASSERT, and KALDI_WARN.
283 KALDI_ASSERT(wxfilename.length() != 0 && wxfilename[0] ==
'|');
285 std::string cmd_name(wxfilename, 1);
286 #if defined(_MSC_VER) || defined(__CYGWIN__) 287 f_ = popen(cmd_name.c_str(), (binary ?
"wb" :
"w"));
289 f_ = popen(cmd_name.c_str(),
"w");
292 KALDI_WARN <<
"Failed opening pipe for writing, command is: " 293 << cmd_name <<
", errno is " << strerror(errno);
300 (binary ? std::ios_base::out|
301 std::ios_base::binary
302 :std::ios_base::out));
304 os_ =
new std::ostream(
fb_);
306 os_ =
new std::ofstream(
f_);
basic_pipebuf< char > PipebufType
#define KALDI_ASSERT(cond)
◆ Stream()
virtual std::ostream& Stream |
( |
| ) |
|
|
inlinevirtual |
◆ f_
◆ fb_
◆ filename_
◆ os_
The documentation for this class was generated from the following file: