Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
enable grass provider/plugin and pggeoprocessing plugin in windows
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7330 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 5, 2007
1 parent 09d289c commit 435b944
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/plugins/geoprocessing/qgspggeoprocessing.cpp
Expand Up @@ -440,37 +440,37 @@ void QgsPgGeoprocessing::unload()
* of the plugin class
*/
// Class factory to return a new instance of the plugin class
extern "C" QgisPlugin * classFactory(QgisInterface * qI)
QGISEXTERN QgisPlugin * classFactory(QgisInterface * qI)
{
return new QgsPgGeoprocessing(qI);
}

// Return the name of the plugin
extern "C" QString name()
QGISEXTERN QString name()
{
return name_;
}

// Return the description
extern "C" QString description()
QGISEXTERN QString description()
{
return description_;
}

// Return the type (either UI or MapLayer plugin)
extern "C" int type()
QGISEXTERN int type()
{
return type_;
}

// Return the version number for the plugin
extern "C" QString version()
QGISEXTERN QString version()
{
return version_;
}

// Delete ourself
extern "C" void unload(QgisPlugin * p)
QGISEXTERN void unload(QgisPlugin * p)
{
delete p;
}
12 changes: 6 additions & 6 deletions src/plugins/grass/qgsgrassplugin.cpp
Expand Up @@ -826,38 +826,38 @@ void QgsGrassPlugin::unload()
* of the plugin class
*/
// Class factory to return a new instance of the plugin class
extern "C" QgisPlugin * classFactory(QgisInterface * theQgisInterfacePointer)
QGISEXTERN QgisPlugin * classFactory(QgisInterface * theQgisInterfacePointer)
{
return new QgsGrassPlugin(theQgisInterfacePointer);
}

// Return the name of the plugin - note that we do not user class members as
// the class may not yet be insantiated when this method is called.
extern "C" QString name()
QGISEXTERN QString name()
{
return QObject::tr("GRASS");
}

// Return the description
extern "C" QString description()
QGISEXTERN QString description()
{
return QObject::tr("GRASS layer");
}

// Return the type (either UI or MapLayer plugin)
extern "C" int type()
QGISEXTERN int type()
{
return QgisPlugin::UI;
}

// Return the version number for the plugin
extern "C" QString version()
QGISEXTERN QString version()
{
return pluginVersion;
}

// Delete ourself
extern "C" void unload(QgisPlugin * thePluginPointer)
QGISEXTERN void unload(QgisPlugin * thePluginPointer)
{
delete thePluginPointer;
}
9 changes: 9 additions & 0 deletions src/providers/grass/provider.cpp
Expand Up @@ -27,12 +27,21 @@
#include "qgsfield.h"
#include "qgsrect.h"

#ifdef _MSC_VER
// enables prototype in GRASS headers
#define __STDC__ 1
#endif

extern "C" {
#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/Vect.h>
}

#ifdef _MSC_VER
#undef __STDC__
#endif

#include "qgsgrass.h"
#include "qgsgrassprovider.h"

Expand Down
9 changes: 9 additions & 0 deletions src/providers/grass/qgsgrassprovider.cpp
Expand Up @@ -36,13 +36,22 @@
#include "qgsrect.h"
#include "qgsspatialrefsys.h"

#ifdef _MSC_VER
// enable grass prototypes
#define __STDC__ 1
#endif

extern "C" {
#include <grass/gprojects.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/Vect.h>
}

#ifdef _MSC_VER
#undef __STDC__
#endif

#include "qgsgrass.h"
#include "qgsgrassprovider.h"

Expand Down

0 comments on commit 435b944

Please sign in to comment.