Changeset 745 for cpp


Ignore:
Timestamp:
02/27/18 17:12:25 (7 years ago)
Author:
Maciej Komosinski
Message:

Renamed ParamInterface::save() -> saveMultiLine()

Location:
cpp/frams
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/loader_test_param.cpp

    r520 r745  
    5151        { "notchanged", 0, PARAM_READONLY, "Read only field", "d", FIELD(notchanged), }, // neither load() nor setDefault() can change this field
    5252        { "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 field
     53        { "notsaved", 0, PARAM_DONTSAVE, "Non-saveable field", "d", FIELD(notsaved), }, // saveSingle/MultiLine() skips this field
    5454        { 0, 0, 0, },
    5555};
     
    102102                        fprintf(stderr, "type of 'x2' is: %s\n", data.x2.typeDescription().c_str());
    103103                        fprintf(stderr, "-----\n\n");
    104                         param.save(&virt_stdout);
     104                        param.saveMultiLine(&virt_stdout);
    105105                        break;
    106106
  • cpp/frams/_demos/multiline_f0_test.cpp

    r534 r745  
    3939printf("Converted to f0:\n%s\n",m.getF0Geno().getGenes().c_str());
    4040
    41 printf("\nusing Param::save() to create the \"expanded\" form of the f0 genotype...\n(MultiParamLoader should be able to load this)");
     41printf("\nusing Param::saveMultiLine() to create the \"expanded\" form of the f0 genotype...\n(MultiParamLoader should be able to load this)");
    4242
    4343StringFILE2 f;
     
    5050
    5151modelparam.select(&m);
    52 modelparam.save(&f,"m");
     52modelparam.saveMultiLine(&f,"m");
    5353
    5454Part *p;
     
    5959        {
    6060        partparam.select(p);
    61         partparam.save(&f,"p");
     61        partparam.saveMultiLine(&f,"p");
    6262        }
    6363for (int i=0;j=(Joint*)m.getJoint(i);i++)
     
    6565        jointparam.select(j);
    6666        jointparam.setParamTab(j->usedelta?f0_joint_paramtab:f0_nodeltajoint_paramtab);
    67         jointparam.save(&f,"j");
     67        jointparam.saveMultiLine(&f,"j");
    6868        }
    6969for (int i=0;n=(Neuro*)m.getNeuro(i);i++)
    7070        {
    7171        neuroparam.select(n);
    72         neuroparam.save(&f,"n");
     72        neuroparam.saveMultiLine(&f,"n");
    7373        }
    7474for (int a=0;n=(Neuro*)m.getNeuro(a);a++)
     
    8383                nc.info=n->getInputInfo(b);
    8484                connparam.select(&nc);
    85                 connparam.save(&f,"c");
     85                connparam.saveMultiLine(&f,"c");
    8686                }
    8787        }
     
    107107
    108108
    109 using Param::save() to create the "expanded" form of the f0 genotype...
     109using Param::saveMultiLine() to create the "expanded" form of the f0 genotype...
    110110(MultiParamLoader should be able to load this)
    111111============================
  • cpp/frams/_demos/saver_test_geno.cpp

    r732 r745  
    4040                        g.info = "Saved by saver_test_geno.cpp";
    4141                        g.is_valid = 1;
    42                         p.save(f, "org");
     42                        p.saveMultiLine(f, "org");
    4343                }
    4444                delete f;
  • cpp/frams/param/param.cpp

    r743 r745  
    275275}
    276276
    277 int ParamInterface::save(VirtFILE* f, const char* altname, bool force)
     277int ParamInterface::saveMultiLine(VirtFILE* f, const char* altname, bool force)
    278278{
    279279        const char *p;
  • cpp/frams/param/param.h

    r743 r745  
    176176        };
    177177
    178         int save(VirtFILE*, const char* altname = NULL, bool force = 0);
     178        int saveMultiLine(VirtFILE*, const char* altname = NULL, bool force = 0);
    179179        int saveprop(VirtFILE*, int i, const char* p, bool force = 0);
    180180
  • cpp/frams/param/paramobj.h

    r490 r745  
    4747                void* obj2=ParamObject::makeObject(tab);
    4848                Param par(tab,obj);
    49                 par.set(...), par.get(...), par.load(...), par.save(...);
     49                par.set(...), par.get(...), par.load(...), par.saveSingle/MultiLine(...);
    5050                par.select(obj);
    5151                par.select(obj2);
Note: See TracChangeset for help on using the changeset viewer.