CFile Class Reference

Abstract class for handling files. Needed for generic use in CScriptparser. More...

#include <cfile.h>

Inheritance diagram for CFile:

CBitmap CPixmap CWindowsBitmap

List of all members.

Public Member Functions

virtual ~CFile ()
 Default dtor (virtual).
virtual void read (std::ifstream &in)=0
 Pure virtual method (interface). Should read data from filestream.
virtual void write (std::ofstream &out)=0
 Pure virtual method (interface). Should write data to filestream.
virtual void callFunc (const std::string &func, const std::list< std::string > &params)=0
 Pure virtual method (interface). Should delegate the function and its parameters to the correct internal method.
bool supportsType (const std::string &type)
 Check if filetype is supported by this implementation.

Protected Attributes

std::set< std::string > m_types

Classes

class  FileError
 Exception thrown by implemententations of CFile. More...


Detailed Description

Abstract class for handling files. Needed for generic use in CScriptparser.

Modulname:
cfile
Author:
Guenther Neuwirth (0626638), Manuel Mausz (0728348)
Date:
17.04.2009
Abstract class for handling files. Needed for generic use in CScriptparser.

In order for CScriptparser to determine which instance of CFile supports which filetype, every implemententation need to insert their filetypes to the member m_types in their constructor.

On error throw FileError.


Constructor & Destructor Documentation

virtual CFile::~CFile (  )  [inline, virtual]

Default dtor (virtual).

Methodname:
~CFile
Parameters:
- 
Returns:
-
Global variables used:
none
Exceptions:
none 
Conditions:
none


Member Function Documentation

virtual void CFile::read ( std::ifstream &  in  )  [pure virtual]

Pure virtual method (interface). Should read data from filestream.

Methodname:
read
Parameters:
in filestream to read data from
Returns:
-
Global variables used:
none
Exceptions:
FileError 
Conditions:
none

Implemented in CBitmap, CPixmap, and CWindowsBitmap.

virtual void CFile::write ( std::ofstream &  out  )  [pure virtual]

Pure virtual method (interface). Should write data to filestream.

Methodname:
write
Parameters:
out filestream to write data to
Returns:
-
Global variables used:
none
Exceptions:
FileError 
Conditions:
none

Implemented in CBitmap, CPixmap, and CWindowsBitmap.

virtual void CFile::callFunc ( const std::string &  func,
const std::list< std::string > &  params 
) [pure virtual]

Pure virtual method (interface). Should delegate the function and its parameters to the correct internal method.

Methodname:
callFunc
Parameters:
func function name
params function parameters as list
Returns:
-
Global variables used:
none
Exceptions:
FileError 
Conditions:
none

Implemented in CBitmap.

bool CFile::supportsType ( const std::string &  type  )  [inline]

Check if filetype is supported by this implementation.

Methodname:
supportsType
Parameters:
type filetype
Returns:
true if filetype is supported. false otherwise
Global variables used:
none
Exceptions:
none 
Conditions:
none


Member Data Documentation

std::set<std::string> CFile::m_types [protected]

set of filetypes suppported by this implementation


The documentation for this class was generated from the following file:
Generated on Sat May 2 18:58:11 2009 for imgsynth2 by  doxygen 1.5.3