Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
FileWriteStream Class Reference

Wrapper of C file stream for output using fwrite(). More...

#include <filewritestream.h>

Public Types

typedef char Ch
 Character type. Only support char. More...
 

Public Member Functions

 FileWriteStream (std::FILE *fp, char *buffer, size_t bufferSize)
 
void Flush ()
 
char Peek () const
 
void Put (char c)
 
char * PutBegin ()
 
size_t PutEnd (char *)
 
void PutN (char c, size_t n)
 
char Take ()
 
size_t Tell () const
 

Private Member Functions

 FileWriteStream (const FileWriteStream &)
 
FileWriteStreamoperator= (const FileWriteStream &)
 

Private Attributes

char * buffer_
 
char * bufferEnd_
 
char * current_
 
std::FILE * fp_
 

Detailed Description

Wrapper of C file stream for output using fwrite().

Note
implements Stream concept

Definition at line 32 of file filewritestream.h.

Member Typedef Documentation

typedef char FileWriteStream::Ch

Character type. Only support char.

Definition at line 35 of file filewritestream.h.

Constructor & Destructor Documentation

FileWriteStream::FileWriteStream ( std::FILE *  fp,
char *  buffer,
size_t  bufferSize 
)
inline

Definition at line 37 of file filewritestream.h.

FileWriteStream::FileWriteStream ( const FileWriteStream )
private

Member Function Documentation

void FileWriteStream::Flush ( )
inline

Definition at line 70 of file filewritestream.h.

FileWriteStream& FileWriteStream::operator= ( const FileWriteStream )
private
char FileWriteStream::Peek ( ) const
inline

Definition at line 85 of file filewritestream.h.

void FileWriteStream::Put ( char  c)
inline

Definition at line 43 of file filewritestream.h.

char* FileWriteStream::PutBegin ( )
inline

Definition at line 100 of file filewritestream.h.

size_t FileWriteStream::PutEnd ( char *  )
inline

Definition at line 105 of file filewritestream.h.

void FileWriteStream::PutN ( char  c,
size_t  n 
)
inline

Definition at line 51 of file filewritestream.h.

char FileWriteStream::Take ( )
inline

Definition at line 90 of file filewritestream.h.

size_t FileWriteStream::Tell ( ) const
inline

Definition at line 95 of file filewritestream.h.

Member Data Documentation

char* FileWriteStream::buffer_
private

Definition at line 117 of file filewritestream.h.

char* FileWriteStream::bufferEnd_
private

Definition at line 118 of file filewritestream.h.

char* FileWriteStream::current_
private

Definition at line 119 of file filewritestream.h.

std::FILE* FileWriteStream::fp_
private

Definition at line 116 of file filewritestream.h.


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


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:54