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. |
---|
4 | |
---|
5 | #ifndef _NEUROLIBPARAM_H_ |
---|
6 | #define _NEUROLIBPARAM_H_ |
---|
7 | |
---|
8 | #include <frams/param/mutparamiface.h> |
---|
9 | #include <frams/model/modelparts.h> |
---|
10 | |
---|
11 | class NeuroLibParam : public MutableParamInterface |
---|
12 | { |
---|
13 | const char* mygroup; |
---|
14 | const char* myname; |
---|
15 | const char* myprefix; |
---|
16 | CallbackNode *anode, *dnode; |
---|
17 | |
---|
18 | public: |
---|
19 | NeuroLibParam(const char* gr = 0, const char* name = 0, const char* pref = 0); |
---|
20 | ~NeuroLibParam(); |
---|
21 | |
---|
22 | #define STATRICKCLASS NeuroLibParam |
---|
23 | VIRTCALLBACKDEF(neuroclassAdded); |
---|
24 | VIRTCALLBACKDEF(neuroclassRemoved); |
---|
25 | #undef STATRICKCLASS |
---|
26 | |
---|
27 | int getGroupCount() { return 1; } |
---|
28 | int getPropCount() { return Neuro::getClassCount(); } |
---|
29 | |
---|
30 | const char* getName() { return myname; } |
---|
31 | const char *grname(int gi) { return (gi == 0) ? mygroup : 0; } |
---|
32 | |
---|
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) {} |
---|
41 | |
---|
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; } |
---|
50 | }; |
---|
51 | |
---|
52 | #endif |
---|