source: cpp/frams/_demos/paramtree_paramlist_test.cpp @ 724

Last change on this file since 724 was 724, checked in by Maciej Komosinski, 7 years ago

Two sample programs demonstrating usage of param tree

File size: 1.5 KB
Line 
1#include <frams/util/sstringutils.h>
2#include <common/virtfile/stdiofile.h>
3#include <frams/genetics/preconfigured.h>
4#include <frams/param/paramtree.h>
5#include <frams/param/mutparamlist.h>
6#include <frams/vm/classes/genoobj.h>
7#include <frams/vm/classes/collectionobj.h>
8#include <frams/vm/classes/3dobject.h>
9#include <frams/neuro/neuroimpl.h>
10#include <frams/neuro/neurofactory.h>
11#include <frams/model/geometry/modelgeoclass.h>
12#include <frams/model/modelobj.h>
13#include "genotypeloader.h"
14#include "paramtree_print.h"
15
16// This program tests parameter tree construction for all paramtab's that are available in SDK.
17// See paramtree_test.cpp and app_group_names.txt for a more complete set (from Framsticks GUI) of paramtab objects.
18int main()
19{
20        StdioFILE::setStdio(); //setup VirtFILE::Vstdin/out/err
21        PreconfiguredGenetics genetics;
22
23        Param minigenotype_param(minigenotype_paramtab);
24        NeuroFactory neurofac;
25        neurofac.setStandardImplementation();
26        NeuroNetConfig nn_config(&neurofac);
27        ModelGeometry modelgeo;
28
29        MutableParamList combined;
30        combined += &genetics.genman.par;
31        combined += &GenoObj::getStaticParam();
32        combined += &ModelObj::getStaticParam();
33        combined += &VectorObject::getStaticParam();
34        combined += &DictionaryObject::getStaticParam();
35        combined += &Pt3D_Ext::getStaticParam();
36        combined += &Orient_Ext::getStaticParam();
37        combined += &minigenotype_param;
38        combined += &nn_config.par;
39        combined += &modelgeo.par;
40
41        ParamTree tree(combined);
42
43        printTree(&tree.root);
44}
Note: See TracBrowser for help on using the repository browser.