Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

WDFFile Class Reference

World Description File. More...

#include <WDFFile.h>

Inherits File.

Inheritance diagram for WDFFile:

Inheritance graph
[legend]
Collaboration diagram for WDFFile:

Collaboration graph
[legend]
List of all members.

Public Methods

 WDFFile ()
 ~WDFFile ()
 WDFFile (const string &name)
uint16 getVersion ()
void read (Chunk &ch)
bool readNext (Chunk &chunk)
Vertex3 readVertex ()
Color4 readColor ()
RefMaterial readMaterial (uint16 type)
void writeChunk (uint16 chunkId)
void openChunk ()
void closeChunk ()
void writeVertex (const Vertex3 &v)
void writeColor (const Color4 &c)
void writeMaterial (RefMaterial &material)
void open (const string &name)
 Opens a file for reading. More...

void create (const string &name)
 Creates a file for writing. More...


Protected Types

typedef File super
typedef stack< uint32 > ChukStack
typedef map< Material *, uint16 > MaterialID
typedef map< uint16, RefMaterial > MaterialPool

Protected Methods

void write (Chunk &ch)

Protected Attributes

uint16 version
bool reading
ChukStack chunkStack
MaterialID materialId
MaterialPool materialPool

Static Protected Attributes

const uint16 latestVersion = 1

Detailed Description

World Description File.


Member Function Documentation

void WDFFile::create const string &    name
 

Creates a file for writing.

Parameters:
name  Name of the file to create.
Precondition:
none.
Postcondition:
The file is created and open for writing.
Exceptions:
runtime_error  When the file could not be created.

Reimplemented from File.

void WDFFile::open const string &    name
 

Opens a file for reading.

Parameters:
name  Name of the file to open.
Precondition:
none.
Postcondition:
The file is open for reading.
Exceptions:
runtime_error  When the file could not be opened.

Reimplemented from File.


The documentation for this class was generated from the following files:
This documentation was generated using doxygen. If you have any comments or additions please mail me.