ft_stream Class Reference

#include <fstream.hpp>

Inheritance diagram for ft_stream:

Inheritance graph
[legend]
Collaboration diagram for ft_stream:

Collaboration graph
[legend]

List of all members.


Detailed Description

A text stream on a file.

Definition at line 83 of file fstream.hpp.


Public Member Functions

bool at_end () const
 ft_stream (const gsgl::string &fname, gsgl::flags_t mode=FILE_OPEN_READ)
wchar_t get ()
const gsgl::stringget_fname () const
text_streamoperator<< (const char *)
text_streamoperator<< (const double &)
text_streamoperator<< (const float &)
text_streamoperator<< (const int &)
text_streamoperator<< (const wchar_t &)
text_streamoperator<< (const wchar_t *)
text_streamoperator>> (double &)
text_streamoperator>> (float &)
text_streamoperator>> (int &)
text_streamoperator>> (wchar_t &)
wchar_t peek ()
gsgl::index_t read (wchar_t *, const gsgl::index_t)
void unget (wchar_t)
gsgl::index_t write (const wchar_t *, const gsgl::index_t)
virtual ~ft_stream ()

Static Public Attributes

static ft_stream err
static ft_stream in
static ft_stream out

Protected Attributes

gsgl::string fname
void * fp
int mode

Private Member Functions

 ft_stream (void *fp, gsgl::flags_t mode)

Constructor & Destructor Documentation

ft_stream ( void *  fp,
gsgl::flags_t  mode 
) [private]

Definition at line 135 of file fstream.cpp.

ft_stream ( const gsgl::string fname,
gsgl::flags_t  mode = FILE_OPEN_READ 
)

Definition at line 141 of file fstream.cpp.

~ft_stream (  )  [virtual]

Definition at line 146 of file fstream.cpp.


Member Function Documentation

bool at_end (  )  const

Reimplemented from file_stream.

Definition at line 189 of file fstream.cpp.

References file_stream::at_end().

Referenced by material_file::load_mtl_file(), mesh_file::load_obj_file(), and shader_base::read_file().

wchar_t get (  )  [virtual]

Implements text_stream.

Definition at line 164 of file fstream.cpp.

References gsgl::io::FILE_OPEN_READ, file_stream::fp, and file_stream::mode.

const gsgl::string& get_fname (  )  const [inline, inherited]

Definition at line 78 of file fstream.hpp.

Referenced by file_log_target::~file_log_target().

text_stream & operator<< ( const char *  str  )  [inherited]

Definition at line 102 of file stream.cpp.

text_stream & operator<< ( const double &  n  )  [inherited]

Definition at line 84 of file stream.cpp.

References text_stream::write().

text_stream & operator<< ( const float n  )  [inherited]

Definition at line 93 of file stream.cpp.

References text_stream::write().

text_stream & operator<< ( const int &  n  )  [inherited]

Definition at line 75 of file stream.cpp.

References text_stream::write().

text_stream & operator<< ( const wchar_t &  ch  )  [inherited]

Todo:
Implement UTF coding.

Definition at line 68 of file stream.cpp.

References text_stream::write().

text_stream & operator<< ( const wchar_t *  str  )  [inherited]

Definition at line 62 of file stream.cpp.

References text_stream::write().

text_stream & operator>> ( double &  n  )  [inherited]

Definition at line 141 of file stream.cpp.

References text_stream::at_end(), and text_stream::read().

text_stream & operator>> ( float n  )  [inherited]

Definition at line 158 of file stream.cpp.

text_stream & operator>> ( int &  n  )  [inherited]

Definition at line 124 of file stream.cpp.

References text_stream::at_end(), and text_stream::read().

text_stream & operator>> ( wchar_t &  ch  )  [inherited]

Todo:
Implement UTF coding.

Definition at line 117 of file stream.cpp.

References text_stream::read().

wchar_t peek (  )  [virtual]

gsgl::index_t read ( wchar_t *  buf,
const gsgl::index_t  num 
) [virtual]

Todo:
Implement UTF-8 for file streams.

Implements text_stream.

Definition at line 194 of file fstream.cpp.

References gsgl::io::FILE_OPEN_READ, file_stream::fp, and file_stream::mode.

void unget ( wchar_t  ch  )  [virtual]

Implements text_stream.

Definition at line 177 of file fstream.cpp.

References gsgl::io::FILE_OPEN_READ, file_stream::fp, and file_stream::mode.

gsgl::index_t write ( const wchar_t *  buf,
const gsgl::index_t  num 
) [virtual]

Todo:
Implement UTF-8 for file streams.

Implements text_stream.

Definition at line 211 of file fstream.cpp.

References gsgl::io::FILE_OPEN_WRITE, file_stream::fp, and file_stream::mode.


Member Data Documentation

ft_stream err [static]

Definition at line 100 of file fstream.hpp.

gsgl::string fname [protected, inherited]

Definition at line 65 of file fstream.hpp.

Referenced by ft_stream::peek().

void* fp [protected, inherited]

ft_stream in [static]

Definition at line 101 of file fstream.hpp.

int mode [protected, inherited]

ft_stream out [static]


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

Generated on Sat Mar 1 13:50:06 2008 for Periapsis Project by  doxygen 1.5.5