[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue May 13 20:16:53 CEST 2003


CVS commit by staikos: 

API to call the plugin function


  M +16 -0     plugin.cpp   1.7
  M +7 -0      plugin.h   1.8


--- kdeextragear-2/kst/kst/plugin.cpp  #1.6:1.7
@@ -22,4 +22,6 @@
 
 
+const int Plugin::CallError = -424242;
+
 Plugin::Plugin() {
   _lib = 0L;
@@ -45,4 +47,18 @@ const QString& Plugin::xmlFile() const {
 const QString& Plugin::soFile() const {
   return _soFile;
+}
+
+
+int Plugin::call(const double *const inArrays[], const int inArrayLens[],
+                 const double inScalars[], double *outArrays[],
+                 int outArrayLens[], double outScalars[]) const {
+  if (!_symbol) {
+    return CallError;
+  }
+
+  return ((int(*)(const double *const[], const int[],
+                  const double[], double *[], int[],
+                  double[]))_symbol)
+    (inArrays, inArrayLens, inScalars, outArrays, outArrayLens, outScalars);
 }
 

--- kdeextragear-2/kst/kst/plugin.h  #1.7:1.8
@@ -93,4 +93,11 @@ public:
   const QString& soFile() const;
   
+  int call(const double *const inArrays[], const int inArrayLens[],
+            const double inScalars[],
+            double *outArrays[], int outArrayLens[],
+            double outScalars[]) const;
+
+  static const int CallError;
+
 protected:
   Plugin();




More information about the Kst mailing list