Changeset 726 for cpp/frams/model/modelparts.h
- Timestamp:
- 01/19/18 19:37:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/modelparts.h
r714 r726 19 19 20 20 #include <stdio.h> 21 22 //#define MODEL_V1_COMPATIBLE23 21 24 22 class Model; … … 289 287 class Neuro; 290 288 291 #ifdef MODEL_V1_COMPATIBLE292 class NeuroItem;293 294 /** for compatibility with old Neuro/NeuroItem */295 class OldItems296 {297 Neuro &neuro;298 SList syntitems; ///< to be deleted299 SList items;300 int listok;301 public:302 OldItems(Neuro &n):neuro(n),listok(0) {}303 ~OldItems() {freelist();}304 void buildlist();305 void freelist();306 307 int getItemCount();308 NeuroItem *getNeuroItem(int i);309 NeuroItem *addNewNeuroItem();310 int findNeuroItem(NeuroItem *n);311 };312 #endif313 314 289 /** Single processing unit in Framsticks NN. */ 315 290 class Neuro : public PartBase … … 482 457 static int getClassIndex(const NeuroClass*nc); 483 458 484 #ifdef MODEL_V1_COMPATIBLE485 friend class OldItems;486 paInt neuro_refno; ///< parent ref# (called neuro_refno for compatibility with old Neuro class), @see moredata487 paInt conn_refno; ///< the other neuron ref# in N-N connections, can be used by some other items488 double weight; ///< weight of the N-N connection and (all?) receptors489 double inertia,force,sigmo; //!!!490 491 /** @deprecated provided only for compatibility with old Neuro/NeuroItem classes.492 use getInputCount() instead. @sa getInputCount() */493 int getItemCount() {return oldItems().getItemCount();}494 495 /** @deprecated provided only for compatibility with old Neuro/NeuroItem classes.496 use getInput() instead. @sa getInput() */497 NeuroItem* getNeuroItem(int i) {return oldItems().getNeuroItem(i);}498 #endif499 500 protected:501 #ifdef MODEL_V1_COMPATIBLE502 /** old Neuro compatibility */503 OldItems* olditems;504 OldItems& oldItems() {if (!olditems) olditems=new OldItems(*this); return *olditems;}505 void invalidateOldItems() {if (olditems) olditems->freelist();}506 #endif507 508 public:509 510 459 // not really private, but you should not access those directly 511 460 double state; … … 522 471 }; 523 472 524 #ifdef MODEL_V1_COMPATIBLE525 class NeuroItem;526 527 /// for compatibility with old NeuroItem class.528 class NeuroItem: public Neuro529 {530 public:531 NeuroItem() {}532 };533 #endif534 535 473 class NeuroExt : public Neuro 536 474 {
Note: See TracChangeset
for help on using the changeset viewer.