[286] | 1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
---|
| 2 | // Copyright (C) 1999-2015 Maciej Komosinski and Szymon Ulatowski. |
---|
| 3 | // See LICENSE.txt for details. |
---|
[138] | 4 | |
---|
| 5 | #ifndef _NEUROLIBPARAM_H_ |
---|
| 6 | #define _NEUROLIBPARAM_H_ |
---|
| 7 | |
---|
| 8 | #include <frams/param/mutparamiface.h> |
---|
| 9 | #include <frams/model/modelparts.h> |
---|
| 10 | |
---|
[790] | 11 | class NeuroLibParam : public MutableParamInterface |
---|
[138] | 12 | { |
---|
[790] | 13 | const char* mygroup; |
---|
| 14 | const char* myname; |
---|
| 15 | const char* myprefix; |
---|
| 16 | CallbackNode *anode, *dnode; |
---|
[138] | 17 | |
---|
[790] | 18 | public: |
---|
| 19 | NeuroLibParam(const char* gr = 0, const char* name = 0, const char* pref = 0); |
---|
| 20 | ~NeuroLibParam(); |
---|
[138] | 21 | |
---|
| 22 | #define STATRICKCLASS NeuroLibParam |
---|
[790] | 23 | VIRTCALLBACKDEF(neuroclassAdded); |
---|
| 24 | VIRTCALLBACKDEF(neuroclassRemoved); |
---|
[138] | 25 | #undef STATRICKCLASS |
---|
| 26 | |
---|
[790] | 27 | int getGroupCount() { return 1; } |
---|
| 28 | int getPropCount() { return Neuro::getClassCount(); } |
---|
[138] | 29 | |
---|
[790] | 30 | const char* getName() { return myname; } |
---|
| 31 | const char *grname(int gi) { return (gi == 0) ? mygroup : 0; } |
---|
[138] | 32 | |
---|
[790] | 33 | const char *id(int i); |
---|
| 34 | const char *name(int i); |
---|
| 35 | const char *help(int i); |
---|
| 36 | const char *type(int i) { return "d 0 1"; } |
---|
| 37 | int flags(int i) { return 0; } |
---|
| 38 | int group(int i) { return 0; } |
---|
| 39 | int grmember(int gi, int n); |
---|
| 40 | void call(int i, ExtValue* args, ExtValue *ret) {} |
---|
[138] | 41 | |
---|
[790] | 42 | SString getString(int i) { return SString(); } |
---|
| 43 | double getDouble(int) { return 0; } |
---|
| 44 | ExtObject getObject(int i) { return ExtObject(); } |
---|
| 45 | ExtValue getExtValue(int i) { return ExtValue(); } |
---|
| 46 | int setDouble(int i, double) { return 0; } |
---|
| 47 | int setString(int i, const SString &v) { return 0; } |
---|
| 48 | int setObject(int i, const ExtObject &v) { return 0; } |
---|
| 49 | int setExtValue(int i, const ExtValue &v) { return 0; } |
---|
[138] | 50 | }; |
---|
| 51 | |
---|
| 52 | #endif |
---|