# OutStream Class Reference

Output Stream for writing files. More...

`#include <DPXStream.h>`

List of all members.

## Public Types
enum | Origin { kStart, kCurrent, kEnd }
| file pointing positioning offset More...
## Public Member Functions
| OutStream ()
| Constructor.
virtual | ~OutStream ()
| Destructor.
virtual bool | Open (const char *fn)
| Open file.
virtual void | Close ()
| Close file.
virtual size_t | Write (void *buf, const size_t size)
| Write data to file.
virtual bool | Seek (long offset, Origin origin)
| Seek to a position in the file.
virtual void | Flush ()
| Flush any buffers.
## Protected Attributes
FILE * | fp

## Detailed Description

Output Stream for writing files.

## Member Enumeration Documentation

enum OutStream::Origin

file pointing positioning offset

Enumerator:

  kStart | beginning of the file
  kCurrent | current file pointer
  kEnd | end of the file

## Constructor & Destructor Documentation

OutStream::OutStream | ( |  | ) |

Constructor.

OutStream::~OutStream | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

void OutStream::Close | ( |  | ) | `[virtual]`

Close file.

void OutStream::Flush | ( |  | ) | `[virtual]`

Flush any buffers.

bool OutStream::Open | ( | const char * | fn | ) | `[virtual]`

Open file.

Parameters:

  | fn | File name

Returns:
  success true/false

bool OutStream::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

size_t OutStream::Write | ( | void * | buf,
|  | const size_t | size |
| ) |  |  | `[virtual]`

Write data to file.

Parameters:

  | buf | data buffer
  | size | bytes to write

Returns:
  number of bytes written

## Member Data Documentation

FILE* OutStream::fp`[protected]`

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

- /Users/patrick/Development/DPX/svn/source/DPXStream.h
- /Users/patrick/Development/DPX/svn/source/OutStream.cpp