Changeset 726 for cpp/frams/model/model.h
- Timestamp:
- 01/19/18 19:37:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/model.h
r660 r726 75 75 SList parts, joints, neurons; 76 76 char partmappingchanged; 77 78 #ifdef MODEL_V1_COMPATIBLE79 /** NeuroCount value.80 compatibility_neurocount = -1 if its value is unknown and the layout is not compatible81 @see reorderToOldLayout()82 */83 int oldneurocount;84 char oldconnections;85 86 /** calculate oldNeuroCount */87 void calcOldNeuroCount();88 /** some new calls can invalidate old compatibility data */89 void invalidateOldNeuroCount() {oldneurocount=-1;}90 /**91 for compatibility with old NeuroClass the layout of Neurons92 is changed when old 'Neuro' accessing methods are in use.93 Neurons:94 0 .. compatibility_neurocount-1 : old Neurons (class "N")95 compatibility_neurocount .. neurons.size()-1 : other units96 */97 int reorderToOldLayout();98 99 /** check if compatibility should be preserved */100 int hasOldNeuroLayout() {return oldneurocount>=0;}101 102 /** add inputs to the old "-" units.103 @return 1=ok, 0=invalid input detected */104 int addOldConnectionsInputs();105 #endif106 77 107 78 void internalCopy(const Model &mod); … … 284 255 void clear(); 285 256 257 enum ItemType { UnknownType,ModelType,PartType,JointType,NeuronType,NeuronConnectionType }; 258 static ItemType itemTypeFromLinePrefix(const char* line); 286 259 /** Execute single line of <B>f0</B> genotype. 287 260 Return value is non-negative reference number of the created item, … … 291 264 @param srcrange source genotype range which will be mapped to this element 292 265 */ 293 int singleStepBuild(const SString &singleline, int line_num, const MultiRange* srcrange = NULL);266 int addFromString(ItemType item_type,const SString &singleline, int line_num, const MultiRange* srcrange = NULL); 294 267 /** Execute single line of <B>f0</B> genotype - compatiblity variant */ 295 int singleStepBuild(const SString &singleline, const MultiRange* srcrange = NULL);268 int addFromString(ItemType item_type,const SString &singleline, const MultiRange* srcrange = NULL); 296 269 /** Execute single line of <B>f0</B> genotype - low level variant, used by Model::build(), error messages returned as string instead of calling logger */ 297 int singleStepBuildNoLog(const SString &singleline, SString& error_message, const MultiRange* srcrange = 0);270 int addFromStringNoLog(ItemType item_type,const SString &singleline, SString& error_message, const MultiRange* srcrange = 0); 298 271 299 272 /// separate build stages (for future use) … … 346 319 /// you can access neurons 0 .. getNeuroCount()-1. 347 320 Neuro *getNeuro(int i) const; 348 349 #ifdef MODEL_V1_COMPATIBLE350 /* compatibility calls for accessing old Neuro objects */351 352 /// @deprecated Neuro class will be removed soon353 /// @see compat354 int old_getNeuroCount();355 /// you can access neurons 0 .. getNeuroCount()-1.356 /// @deprecated Neuro class will be removed soon357 Neuro *old_getNeuro(int i);358 /// @see addNewNeuro, addNeuro359 /// @deprecated Neuro class will be removed soon360 Neuro *old_addNewNeuro();361 /// @return neuro index or -1 if not found362 /// @deprecated Neuro class will be removed soon363 int old_findNeuro(Neuro* n);364 #endif365 321 366 322 /** create new Part and add it to the model. @see addPart() */
Note: See TracChangeset
for help on using the changeset viewer.