|
From: <dhu...@us...> - 2006-12-11 10:50:59
|
Revision: 60
http://svn.sourceforge.net/qcell/?rev=60&view=rev
Author: dhubleizh
Date: 2006-12-11 02:50:57 -0800 (Mon, 11 Dec 2006)
Log Message:
-----------
- no more const functions (problems compiling later)
- inline functions need to be implemented in .h (WTF? This should work with cpp files as well!)
Modified Paths:
--------------
trunk/qcell/baseheaders/GenericParserPlugin.h
trunk/qcell/baseheaders/interfaces.h
trunk/qcell/basesources/GenericParserPlugin.cpp
Modified: trunk/qcell/baseheaders/GenericParserPlugin.h
===================================================================
--- trunk/qcell/baseheaders/GenericParserPlugin.h 2006-12-11 10:14:36 UTC (rev 59)
+++ trunk/qcell/baseheaders/GenericParserPlugin.h 2006-12-11 10:50:57 UTC (rev 60)
@@ -39,7 +39,10 @@
*
* @return A list of plugin types provided by this plugin
*/
- inline QStringList parserTypes() const;
+ inline QStringList parserTypes()
+ {
+ return supported_parser_types;
+ }
/**
* @brief Which file types this plugin parses
*
@@ -47,8 +50,23 @@
*
* @return A list of file types (extensions) parsed by this plugin
*/
- inline QStringList fileTypes(const QString type) const;
+ inline QStringList fileTypes(const QString type)
+ {
+ 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 parse(const QByteArray content, const QString type, const QString subtype="");
};
Modified: trunk/qcell/baseheaders/interfaces.h
===================================================================
--- trunk/qcell/baseheaders/interfaces.h 2006-12-11 10:14:36 UTC (rev 59)
+++ trunk/qcell/baseheaders/interfaces.h 2006-12-11 10:50:57 UTC (rev 60)
@@ -28,7 +28,7 @@
*
* @return A list of types supported by the parser
*/
- virtual QStringList parserTypes() const = 0;
+ virtual QStringList parserTypes() = 0;
/**
* @brief File types the plugin is able to parse
*
@@ -36,7 +36,7 @@
*
* @return A list of types(extensions) of files types parsed by the plugin
*/
- virtual QStringList fileTypes(const QString type) const = 0;
+ virtual QStringList fileTypes(const QString type) = 0;
/**
* @brief The main parsing function
Modified: trunk/qcell/basesources/GenericParserPlugin.cpp
===================================================================
--- trunk/qcell/basesources/GenericParserPlugin.cpp 2006-12-11 10:14:36 UTC (rev 59)
+++ trunk/qcell/basesources/GenericParserPlugin.cpp 2006-12-11 10:50:57 UTC (rev 60)
@@ -1,6 +1,6 @@
/**@file GenericParserPlugin.cpp
* @author czarny
- * @version \xABversion\xBB
+ * @version 0.1
* @date
* Created: wto 05 gru 2006 20:23:24 CET \n
* Last Update: wto 05 gru 2006 20:23:24 CET
@@ -8,27 +8,27 @@
#include "GenericParserPlugin.h"
-inline QStringList GenericParserPlugin::parserTypes() const
-{
- return supported_parser_types;
-}
+//QStringList GenericParserPlugin::parserTypes()
+//{
+// return supported_parser_types;
+//}
+//
+//QStringList GenericParserPlugin::fileTypes(const QString type)
+//{
+// 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();
+// }
+//}
-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))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|