From: <dhu...@us...> - 2006-12-05 18:37:59
|
Revision: 53 http://svn.sourceforge.net/qcell/?rev=53&view=rev Author: dhubleizh Date: 2006-12-05 10:37:10 -0800 (Tue, 05 Dec 2006) Log Message: ----------- - divided implementation from header Modified Paths: -------------- trunk/qcell/baseheaders/GenericParserPlugin.h Added Paths: ----------- trunk/qcell/basesources/GenericParserPlugin.cpp Modified: trunk/qcell/baseheaders/GenericParserPlugin.h =================================================================== --- trunk/qcell/baseheaders/GenericParserPlugin.h 2006-12-05 17:07:21 UTC (rev 52) +++ trunk/qcell/baseheaders/GenericParserPlugin.h 2006-12-05 18:37:10 UTC (rev 53) @@ -39,10 +39,7 @@ * * @return A list of plugin types provided by this plugin */ - inline QStringList parserTypes() const - { - return supported_parser_types; - } + inline QStringList parserTypes() const; /** * @brief Which file types this plugin parses * @@ -50,70 +47,10 @@ * * @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() - ); + inline QStringList fileTypes(const QString type) const; - return QStringList(); - } - } + QString parse(const QByteArray content, const QString type, const QString subtype=""); - QString parse(const QByteArray content, const QString type, const QString subtype="") - { - if(!supported_parser_types.contains(type)) - { - // Constructing supported parser types - QString types; - for(int i =0 ; i < supported_parser_types.count()-1; i++) - { - types.append(supported_parser_types[i]); - types.append(','); - - }; - types.append(supported_parser_types.last()); - - qDebug(tr("This plugin doesn't support parsing of type %1. It supports %2.") - .arg(type) - .arg(types) - .toAscii() - ); - - return QString(); - } - else if(!supported_file_types.contains(subtype)){ - - // Constructing supported file types - QString subtypes; - for(int i =0 ; i < supported_file_types.count()-1; i++) - { - subtypes.append(supported_file_types[i]); - subtypes.append(','); - - }; - subtypes.append(supported_file_types.last()); - - qDebug(tr("This plugin doesn't support parsing of type %1. It supports %2.") - .arg(type) - .arg(subtypes) - .toAscii() - ); - - return QString(); - - } - - return realParser(content, type, subtype); - - } - }; #endif Added: trunk/qcell/basesources/GenericParserPlugin.cpp =================================================================== --- trunk/qcell/basesources/GenericParserPlugin.cpp (rev 0) +++ trunk/qcell/basesources/GenericParserPlugin.cpp 2006-12-05 18:37:10 UTC (rev 53) @@ -0,0 +1,79 @@ +/**@file GenericParserPlugin.cpp + * @author czarny + * @version \xABversion\xBB + * @date + * Created: wto 05 gru 2006 20:23:24 CET \n + * Last Update: wto 05 gru 2006 20:23:24 CET + */ + +#include "GenericParserPlugin.h" + +inline QStringList GenericParserPlugin::parserTypes() const +{ + return supported_parser_types; +} + +inline QStringList GenericParserPlugin::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(); + } +} + +QString GenericParserPlugin::parse(const QByteArray content, const QString type, const QString subtype) +{ + if(!supported_parser_types.contains(type)) + { + // Constructing supported parser types + QString types; + for(int i =0 ; i < supported_parser_types.count()-1; i++) + { + types.append(supported_parser_types[i]); + types.append(','); + + }; + types.append(supported_parser_types.last()); + + qDebug(tr("This plugin doesn't support parsing of type %1. It supports %2.") + .arg(type) + .arg(types) + .toAscii() + ); + + return QString(); + } + else if(!supported_file_types.contains(subtype)){ + + // Constructing supported file types + QString subtypes; + for(int i =0 ; i < supported_file_types.count()-1; i++) + { + subtypes.append(supported_file_types[i]); + subtypes.append(','); + + }; + subtypes.append(supported_file_types.last()); + + qDebug(tr("This plugin doesn't support parsing of type %1. It supports %2.") + .arg(type) + .arg(subtypes) + .toAscii() + ); + + return QString(); + + } + + return realParser(content, type, subtype); + +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |