Changeset 714 for cpp/frams/neuro
- Timestamp:
- 11/05/17 21:45:20 (7 years ago)
- Location:
- cpp/frams/neuro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/neuro/geneticneuroparam.cpp
r286 r714 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2017 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 6 6 #include <frams/neuro/neurolibrary.h> 7 7 8 GeneticNeuroParam::GeneticNeuroParam(const char* groupname, const char* myname,9 const char* prefix,const char* typ)10 :NeuroLibParam(groupname, myname,prefix),types(typ)8 GeneticNeuroParam::GeneticNeuroParam(const char* groupname, const char* myname, 9 const char* prefix, const char* typ) 10 :NeuroLibParam(groupname, myname, prefix), types(typ) 11 11 {} 12 12 13 13 paInt GeneticNeuroParam::getInt(int i) 14 {return Neuro::getClass(i)->genactive;} 14 { 15 return Neuro::getClass(i)->genactive ? 1 : 0; 16 } 15 17 16 int GeneticNeuroParam::setInt(int i,paInt v) 17 {Neuro::getClass(i)->genactive=v;return PSET_CHANGED;} 18 int GeneticNeuroParam::setInt(int i, paInt v) 19 { 20 Neuro::getClass(i)->genactive = (v != 0); return PSET_CHANGED; 21 } 18 22 -
cpp/frams/neuro/geneticneuroparam.h
r286 r714 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2017 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 8 8 #include "neurolibparam.h" 9 9 10 class GeneticNeuroParam : public NeuroLibParam10 class GeneticNeuroParam : public NeuroLibParam 11 11 { 12 13 const char* types;14 15 GeneticNeuroParam(const char* groupname,const char* myname, const char* prefix,const char* typ=0);12 protected: 13 const char* types; 14 public: 15 GeneticNeuroParam(const char* groupname, const char* myname, const char* prefix, const char* typ = 0); 16 16 17 paInt getInt(int i);18 int setInt(int i,paInt v);19 const char *type(int i) {return types?types:NeuroLibParam::type(i);}17 paInt getInt(int i); 18 int setInt(int i, paInt v); 19 const char *type(int i) { return types ? types : NeuroLibParam::type(i); } 20 20 }; 21 21
Note: See TracChangeset
for help on using the changeset viewer.