TuttleOFX  1
OutStream Class Reference

Output Stream for writing files. More...

#include <DPXStream.h>

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.

Definition at line 135 of file DPXStream.h.


Member Enumeration Documentation

file pointing positioning offset

Enumerator:
kStart 

beginning of the file

kCurrent 

current file pointer

kEnd 

end of the file

Definition at line 144 of file DPXStream.h.


Constructor & Destructor Documentation

OutStream::OutStream ( )

Constructor.

Definition at line 41 of file OutStream.cpp.

OutStream::~OutStream ( ) [virtual]

Destructor.

Definition at line 46 of file OutStream.cpp.


Member Function Documentation

void OutStream::Close ( ) [virtual]

Close file.

Definition at line 62 of file OutStream.cpp.

References fp.

Referenced by Open(), and tuttle::plugin::dpx::writer::DPXWriterPlugin::render().

void OutStream::Flush ( ) [virtual]

Flush any buffers.

Definition at line 102 of file OutStream.cpp.

References fp.

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

Open file.

Parameters:
fnFile name
Returns:
success true/false

Definition at line 51 of file OutStream.cpp.

References Close(), and fp.

Referenced by tuttle::plugin::dpx::writer::DPXWriterPlugin::render().

Here is the call graph for this function:

bool OutStream::Seek ( long  offset,
Origin  origin 
) [virtual]

Seek to a position in the file.

Parameters:
offsetoffset from originating position
originoriginating position
Returns:
success true/false

Definition at line 80 of file OutStream.cpp.

References fp, kCurrent, kEnd, and kStart.

Referenced by dpx::Header::WriteOffsetData().

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

Write data to file.

Parameters:
bufdata buffer
sizebytes to write
Returns:
number of bytes written

Definition at line 72 of file OutStream.cpp.

References fp.

Referenced by dpx::Header::Write(), dpx::WriteBuffer(), dpx::WriteFloatBuffer(), and dpx::Header::WriteOffsetData().


Field Documentation

FILE* OutStream::fp [protected]

Definition at line 196 of file DPXStream.h.

Referenced by Close(), Flush(), Open(), Seek(), and Write().


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