From: <dhu...@us...> - 2006-12-01 13:22:18
|
Revision: 46 http://svn.sourceforge.net/qcell/?rev=46&view=rev Author: dhubleizh Date: 2006-12-01 05:22:13 -0800 (Fri, 01 Dec 2006) Log Message: ----------- - additional tweaking of the GenericPlugin class - some docs to ease the writting - some more KIParserPlugin twaeking Modified Paths: -------------- trunk/qcell/baseheaders/GenericParserPlugin.h trunk/qcell/parsers/KI/KIParserPlugin.h Modified: trunk/qcell/baseheaders/GenericParserPlugin.h =================================================================== --- trunk/qcell/baseheaders/GenericParserPlugin.h 2006-12-01 13:11:52 UTC (rev 45) +++ trunk/qcell/baseheaders/GenericParserPlugin.h 2006-12-01 13:22:13 UTC (rev 46) @@ -23,15 +23,38 @@ QStringList supported_file_types; public: + /** + * @brief What types of parsing does this plugin do + * + * @return A list of plugin types provided by this plugin + */ inline QStringList parserTypes() const { return supported_parser_types; - }; -// inline QStringList fileTypes(const QString type) const -// { -// return supported_file_types; -// } + } + /** + * @brief Which file types this plugin parses + * + * @param type The type of plugin to output results for + * + * @return A list of file types (extensions) parsed by this plugin + */ + inline QStringList fileTypes(const QString type) const + { + if(supported_parser_types.contains(type)) + { + return supported_file_types; + } + else { + qDebug(tr("The plugin type %1 is not supported by this plugin.") + .arg(type) + .toAscii() + ); + return QStringList(); + } + } + }; #endif Modified: trunk/qcell/parsers/KI/KIParserPlugin.h =================================================================== --- trunk/qcell/parsers/KI/KIParserPlugin.h 2006-12-01 13:11:52 UTC (rev 45) +++ trunk/qcell/parsers/KI/KIParserPlugin.h 2006-12-01 13:22:13 UTC (rev 46) @@ -20,9 +20,6 @@ public: KIParserPlugin(); - QStringList parserTypes() const; - QStringList fileTypes(const QString type) const; - QString parse(const QByteArray content, const QString type); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |