Changeset 745
- Timestamp:
- 02/27/18 17:12:25 (7 years ago)
- Location:
- cpp/frams
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/loader_test_param.cpp
r520 r745 51 51 { "notchanged", 0, PARAM_READONLY, "Read only field", "d", FIELD(notchanged), }, // neither load() nor setDefault() can change this field 52 52 { "notloaded", 0, PARAM_DONTLOAD, "Non-loadable field", "d", FIELD(notloaded), }, // load() does not change this field 53 { "notsaved", 0, PARAM_DONTSAVE, "Non-saveable field", "d", FIELD(notsaved), }, // save () skips this field53 { "notsaved", 0, PARAM_DONTSAVE, "Non-saveable field", "d", FIELD(notsaved), }, // saveSingle/MultiLine() skips this field 54 54 { 0, 0, 0, }, 55 55 }; … … 102 102 fprintf(stderr, "type of 'x2' is: %s\n", data.x2.typeDescription().c_str()); 103 103 fprintf(stderr, "-----\n\n"); 104 param.save (&virt_stdout);104 param.saveMultiLine(&virt_stdout); 105 105 break; 106 106 -
cpp/frams/_demos/multiline_f0_test.cpp
r534 r745 39 39 printf("Converted to f0:\n%s\n",m.getF0Geno().getGenes().c_str()); 40 40 41 printf("\nusing Param::save () to create the \"expanded\" form of the f0 genotype...\n(MultiParamLoader should be able to load this)");41 printf("\nusing Param::saveMultiLine() to create the \"expanded\" form of the f0 genotype...\n(MultiParamLoader should be able to load this)"); 42 42 43 43 StringFILE2 f; … … 50 50 51 51 modelparam.select(&m); 52 modelparam.save (&f,"m");52 modelparam.saveMultiLine(&f,"m"); 53 53 54 54 Part *p; … … 59 59 { 60 60 partparam.select(p); 61 partparam.save (&f,"p");61 partparam.saveMultiLine(&f,"p"); 62 62 } 63 63 for (int i=0;j=(Joint*)m.getJoint(i);i++) … … 65 65 jointparam.select(j); 66 66 jointparam.setParamTab(j->usedelta?f0_joint_paramtab:f0_nodeltajoint_paramtab); 67 jointparam.save (&f,"j");67 jointparam.saveMultiLine(&f,"j"); 68 68 } 69 69 for (int i=0;n=(Neuro*)m.getNeuro(i);i++) 70 70 { 71 71 neuroparam.select(n); 72 neuroparam.save (&f,"n");72 neuroparam.saveMultiLine(&f,"n"); 73 73 } 74 74 for (int a=0;n=(Neuro*)m.getNeuro(a);a++) … … 83 83 nc.info=n->getInputInfo(b); 84 84 connparam.select(&nc); 85 connparam.save (&f,"c");85 connparam.saveMultiLine(&f,"c"); 86 86 } 87 87 } … … 107 107 108 108 109 using Param::save () to create the "expanded" form of the f0 genotype...109 using Param::saveMultiLine() to create the "expanded" form of the f0 genotype... 110 110 (MultiParamLoader should be able to load this) 111 111 ============================ -
cpp/frams/_demos/saver_test_geno.cpp
r732 r745 40 40 g.info = "Saved by saver_test_geno.cpp"; 41 41 g.is_valid = 1; 42 p.save (f, "org");42 p.saveMultiLine(f, "org"); 43 43 } 44 44 delete f; -
cpp/frams/param/param.cpp
r743 r745 275 275 } 276 276 277 int ParamInterface::save (VirtFILE* f, const char* altname, bool force)277 int ParamInterface::saveMultiLine(VirtFILE* f, const char* altname, bool force) 278 278 { 279 279 const char *p; -
cpp/frams/param/param.h
r743 r745 176 176 }; 177 177 178 int save (VirtFILE*, const char* altname = NULL, bool force = 0);178 int saveMultiLine(VirtFILE*, const char* altname = NULL, bool force = 0); 179 179 int saveprop(VirtFILE*, int i, const char* p, bool force = 0); 180 180 -
cpp/frams/param/paramobj.h
r490 r745 47 47 void* obj2=ParamObject::makeObject(tab); 48 48 Param par(tab,obj); 49 par.set(...), par.get(...), par.load(...), par.save (...);49 par.set(...), par.get(...), par.load(...), par.saveSingle/MultiLine(...); 50 50 par.select(obj); 51 51 par.select(obj2);
Note: See TracChangeset
for help on using the changeset viewer.