FormatDetector Class Reference

Class used to identify the format of a file. More...

#include <formatdetector.h>

Inherited by CompositeFormatDetector, ExtensionFormatDetector, MagicFormatDetector, and SyncbyteFormatDetector.

List of all members.

Public Member Functions

std::string getFormat (File &file) const
 Identify the format of the file.

Protected Member Functions

virtual std::string doGetFormat (File &file) const =0

Detailed Description

Class used to identify the format of a file.

The format is a string, which is used by the module loader to assign a module to a file.

The class must be subclassed to implement a detection method.


Member Function Documentation

virtual std::string FormatDetector::doGetFormat ( File file) const [protected, pure virtual]

Implemented in SyncbyteFormatDetector.

std::string FormatDetector::getFormat ( File file) const

Identify the format of the file.

Return an empty string if the format hasn't been detected.


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