YGP::FileTypeCheckerByExtension Class Reference

Class to check for the type of a file (e.g. More...

Inherits YGP::FileTypeChecker.

Inherited by YGP::FileTypeCheckerByCaseExt.

List of all members.

Public Member Functions

 FileTypeCheckerByExtension ()
 ~FileTypeCheckerByExtension ()
virtual unsigned int getType (const char *file) const
void addType (const char *ext, unsigned int value)

Protected Member Functions

unsigned int getType4Extension (const char *extension) const


Detailed Description

Class to check for the type of a file (e.g.

MS Office document) by the extension of the file

Further types can be added by the addType()-member


Constructor & Destructor Documentation

YGP::FileTypeCheckerByExtension::FileTypeCheckerByExtension (  ) 

Defaultconstructor.

YGP::FileTypeCheckerByExtension::~FileTypeCheckerByExtension (  ) 

Destructor.


Member Function Documentation

void YGP::FileTypeCheckerByExtension::addType ( const char *  ext,
unsigned int  value 
)

Adds a type to the handled file-types.

Parameters:
ext Extension, which is handled
vaule ID identifying the file-type

unsigned int YGP::FileTypeCheckerByExtension::getType ( const char *  file  )  const [virtual]

Gets the type of the passed file.

Returns the type of the file (e.g.

Parameters:
file File to analyse
Returns:
unsigned int Type of file
MS Word document) according to passed file-name
Parameters:
file File to inspect
Returns:
unsigned int Type of file

Implements YGP::FileTypeChecker.

Reimplemented in YGP::FileTypeCheckerByCaseExt.

unsigned int YGP::FileTypeCheckerByExtension::getType4Extension ( const char *  extension  )  const [protected]

Gets the file-type defined by the passed extension.

Returns the type of the file (e.g.

Parameters:
file Extension of file to analyse
Returns:
unsigned int Type of file
MS Word document) according to passed extension
Parameters:
file File to inspect
Returns:
unsigned int Type of file


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

YGP Version 0.9.31 - Generated on Wed Nov 18 11:25:27 2009 by doxygen 1.5.8