InStream Class Reference
Input Stream for reading files.
More...
#include <DPXStream.h>
List of all members.
Public Types |
| enum | Origin { kStart,
kCurrent,
kEnd
} |
| | file pointing positioning offset
More...
|
Public Member Functions |
| | InStream () |
| | Constructor.
|
| virtual | ~InStream () |
| | Destructor.
|
| virtual bool | Open (const char *fn) |
| | Open file.
|
| virtual void | Close () |
| | Close file.
|
| virtual void | Rewind () |
| | Rewind file pointer to beginning of file.
|
| virtual size_t | Read (void *buf, const size_t size) |
| | Read data from file.
|
| virtual size_t | ReadDirect (void *buf, const size_t size) |
| | Read data from file without any buffering as fast as possible.
|
| virtual bool | EndOfFile () const |
| | Query if end of file has been reached.
|
| virtual bool | Seek (long offset, Origin origin) |
| | Seek to a position in the file.
|
Protected Attributes |
| FILE * | fp |
Detailed Description
Input Stream for reading files.
Member Enumeration Documentation
file pointing positioning offset
- Enumerator:
| kStart |
beginning of the file
|
| kCurrent |
current file pointer
|
| kEnd |
end of the file
|
Constructor & Destructor Documentation
| InStream::~InStream |
( |
|
) |
[virtual] |
Member Function Documentation
| void InStream::Close |
( |
|
) |
[virtual] |
| bool InStream::EndOfFile |
( |
|
) |
const [virtual] |
Query if end of file has been reached.
- Returns:
- end of file true/false
| bool InStream::Open |
( |
const char * |
fn |
) |
[virtual] |
Open file.
- Parameters:
-
- Returns:
- success true/false
| size_t InStream::Read |
( |
void * |
buf, |
|
|
const size_t |
size | |
|
) |
| | [virtual] |
Read data from file.
- Parameters:
-
| buf | data buffer |
| size | bytes to read |
- Returns:
- number of bytes read
| size_t InStream::ReadDirect |
( |
void * |
buf, |
|
|
const size_t |
size | |
|
) |
| | [virtual] |
Read data from file without any buffering as fast as possible.
- Parameters:
-
| buf | data buffer |
| size | bytes to read |
- Returns:
- number of bytes read
| void InStream::Rewind |
( |
|
) |
[virtual] |
Rewind file pointer to beginning of file.
| bool InStream::Seek |
( |
long |
offset, |
|
|
Origin |
origin | |
|
) |
| | [virtual] |
Seek to a position in the file.
- Parameters:
-
| offset | offset from originating position |
| origin | originating position |
- Returns:
- success true/false
Member Data Documentation
The documentation for this class was generated from the following files: