source: cpp/frams/model/modelobj.h @ 839

Last change on this file since 839 was 732, checked in by Maciej Komosinski, 6 years ago

Added support for "checkpoints" (intermediate phases of development of the Model when converting between genetic encodings). See Model.checkpoint() and conv_f1.cpp for an example.

File size: 1.2 KB
Line 
1#ifndef _MODELOBJ_H_
2#define _MODELOBJ_H_
3
4#include "model.h"
5
6extern ParamEntry modelobj_paramtab[];
7
8class ModelObj : public Model
9{
10public:
11#define STATRICKCLASS ModelObj
12
13        PARAMGETDEF(geno);
14        PARAMPROCDEF(p_newfromstring);
15        PARAMPROCDEF(p_newfromgeno);
16        PARAMPROCDEF(p_newwithcheckpoints);
17
18#define GETDELEGATE(name,type,value) PARAMGETDEF(name) {arg1->set ## type (value);}
19        GETDELEGATE(numparts, Int, getPartCount())
20        GETDELEGATE(numjoints, Int, getJointCount())
21        GETDELEGATE(numneurons, Int, getNeuroCount())
22        GETDELEGATE(numconnections, Int, getConnectionCount())
23        GETDELEGATE(numcheckpoints, Int, getCheckpointCount())
24#undef GETDELEGATE
25
26        PARAMPROCDEF(p_getpart);
27        PARAMPROCDEF(p_getjoint);
28        PARAMPROCDEF(p_getneuro);
29        PARAMGETDEF(bboxsize);
30        PARAMPROCDEF(p_getcheckpoint);
31        PARAMGETDEF(shape_type);
32        PARAMGETDEF(solid_model);
33
34#undef STATRICKCLASS
35
36        static ExtObject makeStaticObject(Model* g);
37        static ExtObject makeDynamicObject(Model* g);
38        static Model* fromObject(const ExtValue& v, bool warn = true);
39        static ParamInterface* getInterface();
40        static Param& getStaticParam();
41        static Param& getDynamicParam();
42};
43
44#endif
Note: See TracBrowser for help on using the repository browser.