1 |
#ifndef ASCXX_EXTMETHOD_H |
2 |
#define ASCXX_EXTMETHOD_H |
3 |
|
4 |
#include "config.h" |
5 |
|
6 |
#ifdef ASCXX_USE_PYTHON |
7 |
# include <Python.h> |
8 |
#endif |
9 |
|
10 |
extern "C"{ |
11 |
#include <ascend/general/platform.h> |
12 |
#include <ascend/compiler/compiler.h> |
13 |
#include <ascend/compiler/extfunc.h> |
14 |
#include <ascend/compiler/importhandler.h> |
15 |
} |
16 |
|
17 |
/** |
18 |
This is a wrapper for external methods as returned |
19 |
by the getExtMethods method of the Library object. At this stage it |
20 |
is purely for extracting meta-data about the ExtMethod. |
21 |
*/ |
22 |
class ExtMethod { |
23 |
private: |
24 |
const struct ExternalFunc *e; |
25 |
public: |
26 |
ExtMethod(); |
27 |
#ifdef ASCXX_USE_PYTHON |
28 |
ExtMethod(PyObject *); |
29 |
#endif |
30 |
ExtMethod(const struct ExternalFunc *); |
31 |
ExtMethod(const ExtMethod &); |
32 |
const char *getHelp() const; |
33 |
const char *getName() const; |
34 |
const unsigned long getNumInputs() const; |
35 |
const unsigned long getNumOutputs() const; |
36 |
}; |
37 |
|
38 |
#endif // ASCXX_EXTMETHOD_H |