Changeset 124
- Timestamp:
- 02/10/14 17:09:58 (11 years ago)
- Location:
- cpp/frams
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/multiline_f0_test.cpp
r121 r124 50 50 51 51 modelparam.select(&m); 52 modelparam.save(&f, &SString("m"));52 modelparam.save(&f,"m"); 53 53 54 54 Part *p; … … 59 59 { 60 60 partparam.select(p); 61 partparam.save(&f, &SString("p"));61 partparam.save(&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, &SString("j"));67 jointparam.save(&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, &SString("n"));72 neuroparam.save(&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, &SString("c"));85 connparam.save(&f,"c"); 86 86 } 87 87 } -
cpp/frams/param/param.cpp
r121 r124 200 200 {int i=findId(prop); if (i>=0) return set(i,v); else return PSET_NOPROPERTY;} 201 201 202 int ParamInterface::save(VirtFILE* f,const SString* altname,bool force)202 int ParamInterface::save(VirtFILE* f,const char* altname,bool force) 203 203 { 204 204 const char *p; … … 206 206 int err=0,i; 207 207 bool withname=false; 208 if (( !altname)||(altname->len()))209 { 210 err|=(fputs(altname? ((const char*)(*altname)):getName(),f)==EOF);208 if ((altname==NULL)||(altname[0]!=0)) 209 { 210 err|=(fputs(altname?altname:getName(),f)==EOF); 211 211 err|=(fputs(":\n",f)==EOF); 212 212 withname=true; -
cpp/frams/param/param.h
r121 r124 152 152 void quickCopyFrom(ParamInterface *src); 153 153 154 int save(VirtFILE*,const SString* altname=0,bool force=0);154 int save(VirtFILE*,const char* altname=NULL,bool force=0); 155 155 int saveprop(VirtFILE*,int i,const char* p,bool force=0); 156 156 void load(VirtFILE*);
Note: See TracChangeset
for help on using the changeset viewer.