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

FileCodec Class Reference

#include <filecodec.h>

Inheritance diagram for FileCodec:

Inheritance graph
[legend]
Collaboration diagram for FileCodec:

Collaboration graph
[legend]
List of all members.

Detailed Description

Loads custom file data from a package.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 FileCodec (const std::string &rstrFiletypeName)
virtual ~FileCodec ()
virtual int LoadFileData (File *pkFile, int iSrcSize, void *pDest, int *piSize)=0
virtual bool IsType (File *pkFile)=0
const std::string & GetTypeName () const
const std::vector< std::string > & GetExtensions () const

Public Attributes

ModulePtr m_pkModule
int m_iFileFlag

Protected Attributes

std::string m_strTypeName
std::vector< std::string > m_vstrExtensions


Constructor & Destructor Documentation

FileCodec const std::string &  rstrFiletypeName  ) 
 

Parameters:
rstrFiletypeName File type name

virtual ~FileCodec  )  [virtual]
 


Member Function Documentation

virtual int LoadFileData File pkFile,
int  iSrcSize,
void *  pDest,
int *  piSize
[pure virtual]
 

Loads data from file

Parameters:
pkFile File
iSrcSize Size of source data
pDest Pointer to destination buffer
piSize Pointer to integer holding size of destination buffer
Returns:
Error code, 0 if success

virtual bool IsType File pkFile  )  [pure virtual, inherited]
 

Check if file is type (must NOT change file offset!)

Parameters:
pkFile File
Returns:
true if type, false if not

const std::string& GetTypeName  )  const [inherited]
 

Returns:
Type name

const std::vector< std::string >& GetExtensions  )  const [inherited]
 

Returns:
Filetype extension


Member Data Documentation

ModulePtr m_pkModule
 

Library module

int m_iFileFlag
 

File flag we parse

std::string m_strTypeName [protected, inherited]
 

File type name

std::vector< std::string > m_vstrExtensions [protected, inherited]
 

File type extension


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:11 2004 for NeoEngine by doxygen 1.3.5