util::FileStream Class Reference

#include <file_stream.hh>

Inheritance diagram for util::FileStream:

Inheritance graph
[legend]
Collaboration diagram for util::FileStream:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FileStream (int out=-1, std::size_t buffer_size=8192)
 ~FileStream ()
void SetFD (int to)
FileStreamflush ()
FileStreamwrite (const void *data, std::size_t length)
FileStreamseekp (uint64_t to)

Protected Member Functions

char * Ensure (std::size_t amount)
void AdvanceTo (char *to)

Friends

class FakeOStream< FileStream >


Detailed Description

Definition at line 18 of file file_stream.hh.


Constructor & Destructor Documentation

util::FileStream::FileStream ( int  out = -1,
std::size_t  buffer_size = 8192 
) [inline]

Definition at line 20 of file file_stream.hh.

util::FileStream::~FileStream (  )  [inline]

Definition at line 26 of file file_stream.hh.

References flush().

Here is the call graph for this function:


Member Function Documentation

void util::FileStream::AdvanceTo ( char *  to  )  [inline, protected]

Definition at line 77 of file file_stream.hh.

References current_.

char* util::FileStream::Ensure ( std::size_t  amount  )  [inline, protected]

Definition at line 69 of file file_stream.hh.

References current_, flush(), and UTIL_UNLIKELY.

Here is the call graph for this function:

FileStream& util::FileStream::flush (  )  [inline]

Definition at line 35 of file file_stream.hh.

References util::scoped_base< T, Closer >::get(), and util::WriteOrThrow().

Referenced by Ensure(), lm::ARPAOutput::Finish(), lm::ngram::QueryPrinter::Line(), seekp(), SetFD(), lm::ngram::QueryPrinter::Summary(), lm::ngram::QueryPrinter::Word(), write(), and ~FileStream().

Here is the call graph for this function:

Here is the caller graph for this function:

FileStream& util::FileStream::seekp ( uint64_t  to  )  [inline]

Definition at line 60 of file file_stream.hh.

References flush(), and util::SeekOrThrow().

Referenced by lm::ARPAOutput::Finish().

Here is the call graph for this function:

Here is the caller graph for this function:

void util::FileStream::SetFD ( int  to  )  [inline]

Definition at line 30 of file file_stream.hh.

References flush().

Here is the call graph for this function:

FileStream& util::FileStream::write ( const void *  data,
std::size_t  length 
) [inline]

Definition at line 44 of file file_stream.hh.

References flush(), UTIL_LIKELY, and util::WriteOrThrow().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class FakeOStream< FileStream > [friend]

Definition at line 67 of file file_stream.hh.


The documentation for this class was generated from the following file:

Generated on Thu Jul 6 00:34:49 2017 for Moses by  doxygen 1.5.9