#include <fake_ofstream.hh>
Classes | |
struct | EnableIfKludge |
Public Member Functions | |
FakeOFStream (int out=-1, std::size_t buffer_size=1048576) | |
~FakeOFStream () | |
void | SetFD (int to) |
FakeOFStream & | write (const void *data, std::size_t length) |
FakeOFStream & | operator<< (StringPiece str) |
template<class T > | |
EnableIfKludge< ToStringBuf< T > ::kBytes >::type & | operator<< (const T value) |
FakeOFStream & | operator<< (char c) |
FakeOFStream & | operator<< (unsigned char c) |
FakeOFStream & | operator<< (std::size_t value) |
void | flush () |
void | Finish () |
Definition at line 19 of file fake_ofstream.hh.
util::FakeOFStream::FakeOFStream | ( | int | out = -1 , |
|
std::size_t | buffer_size = 1048576 | |||
) | [inline, explicit] |
Definition at line 27 of file fake_ofstream.hh.
util::FakeOFStream::~FakeOFStream | ( | ) | [inline] |
Definition at line 33 of file fake_ofstream.hh.
References flush().
void util::FakeOFStream::Finish | ( | ) | [inline] |
Definition at line 114 of file fake_ofstream.hh.
References flush(), util::FSyncOrThrow(), NULL, and util::scoped_base< T, Closer >::reset().
void util::FakeOFStream::flush | ( | ) | [inline] |
Definition at line 106 of file fake_ofstream.hh.
References util::scoped_base< T, Closer >::get(), and util::WriteOrThrow().
Referenced by Finish(), lm::ngram::QueryPrinter::Line(), SetFD(), lm::ngram::QueryPrinter::Summary(), lm::ngram::QueryPrinter::Word(), write(), and ~FakeOFStream().
FakeOFStream& util::FakeOFStream::operator<< | ( | std::size_t | value | ) | [inline] |
Definition at line 99 of file fake_ofstream.hh.
References util::ToStringBuf< uint64_t >::kBytes, and util::ToString().
FakeOFStream& util::FakeOFStream::operator<< | ( | unsigned char | c | ) | [inline] |
Definition at line 85 of file fake_ofstream.hh.
FakeOFStream& util::FakeOFStream::operator<< | ( | char | c | ) | [inline] |
Definition at line 79 of file fake_ofstream.hh.
EnableIfKludge<ToStringBuf<T>::kBytes>::type& util::FakeOFStream::operator<< | ( | const T | value | ) | [inline] |
Definition at line 72 of file fake_ofstream.hh.
References util::ToString().
FakeOFStream& util::FakeOFStream::operator<< | ( | StringPiece | str | ) | [inline] |
Definition at line 60 of file fake_ofstream.hh.
References StringPiece::data(), StringPiece::size(), and write().
void util::FakeOFStream::SetFD | ( | int | to | ) | [inline] |
Definition at line 38 of file fake_ofstream.hh.
References flush().
FakeOFStream& util::FakeOFStream::write | ( | const void * | data, | |
std::size_t | length | |||
) | [inline] |
Definition at line 43 of file fake_ofstream.hh.
References flush(), UTIL_LIKELY, and util::WriteOrThrow().
Referenced by operator<<().