#include <IFStream.h>
Inheritance diagram for IFStream:
Public Member Functions | |
| IFStream () | |
| IFStream (const char *filename) | |
| virtual | ~IFStream () |
| void | close () |
| ifstream-like interfaces | |
| void | open (const char *filename) |
| bool | is_open () const |
| bool | good () const |
| bool | operator! () const |
| Not operator. !stream returns true if in bad/failed state. | |
| IFStream & | read (char *s, int n) |
| IFStream & | ignore (int n=1) |
Private Attributes | |
| std::ifstream | m_ifstream |
Definition at line 15 of file IFStream.h.
| IFStream::IFStream | ( | ) | [inline] |
| IFStream::IFStream | ( | const char * | filename | ) |
| IFStream::~IFStream | ( | ) | [virtual] |
| void IFStream::close | ( | ) | [virtual] |
ifstream-like interfaces
Implements IInputStream.
Definition at line 16 of file IFStream.cc.
00017 { 00018 m_ifstream.close(); 00019 }
| void IFStream::open | ( | const char * | filename | ) | [virtual] |
Implements IInputStream.
Definition at line 22 of file IFStream.cc.
00023 { 00024 m_ifstream.open(filename, ios::in | ios::binary); 00025 }
| bool IFStream::is_open | ( | ) | const [virtual] |
Implements IInputStream.
Definition at line 27 of file IFStream.cc.
00028 { 00029 return m_ifstream.is_open(); 00030 }
| bool IFStream::good | ( | ) | const [virtual] |
Implements IInputStream.
Definition at line 32 of file IFStream.cc.
00033 { 00034 return m_ifstream.good(); 00035 }
| bool IFStream::operator! | ( | ) | const [virtual] |
Not operator. !stream returns true if in bad/failed state.
Implements IInputStream.
Definition at line 37 of file IFStream.cc.
00038 { 00039 return m_ifstream.fail(); 00040 }
| IFStream & IFStream::read | ( | char * | s, | |
| int | n | |||
| ) | [virtual] |
Implements IInputStream.
Definition at line 43 of file IFStream.cc.
00044 { 00045 streamsize ss = n; 00046 m_ifstream.read(s,ss); 00047 return *this; 00048 }
| IFStream & IFStream::ignore | ( | int | n = 1 |
) | [virtual] |
Implements IInputStream.
Definition at line 50 of file IFStream.cc.
00051 { 00052 streamsize ss = n; 00053 m_ifstream.ignore(ss,EOF); 00054 return *this; 00055 }
std::ifstream IFStream::m_ifstream [mutable, private] |
Definition at line 34 of file IFStream.h.
1.4.7