Changeset 104 for cpp/gdk/neuroimpl.h
- Timestamp:
- 07/23/13 18:15:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/gdk/neuroimpl.h
r81 r104 17 17 18 18 class Creature; 19 class NeuroLibrary; 20 class NeuroFactory; 19 21 20 22 class NeuroNetConfig 21 23 { 22 24 public: 23 NeuroNetConfig( );25 NeuroNetConfig(NeuroFactory *fac); 24 26 25 27 Param par; … … 28 30 double touchrange; 29 31 30 static NeuroNetConfig& getGlobalConfig(); 32 NeuroFactory *factory; 33 //static NeuroNetConfig& getGlobalConfig(); 31 34 }; 32 35 … … 40 43 public: 41 44 42 NeuroSignals(NeuroImpl *n): owner(n),cr(0) {}45 NeuroSignals(NeuroImpl *n):cr(0),owner(n) {} 43 46 44 47 #define STATRICKCLASS NeuroSignals … … 74 77 static double getStateFromNeuro(Neuro *n); 75 78 int getErrorCount() {return errorcount;} 76 NeuroNetImpl(Model& model, NeuroNetConfig& conf = NeuroNetConfig::getGlobalConfig() 79 NeuroNetConfig &getConfig() {return config;} 80 NeuroNetImpl(Model& model, NeuroNetConfig& conf 77 81 #ifdef NEURO_SIGNALS 78 82 , ChannelSpace *ch=0 … … 198 202 /** don't access directly */ 199 203 double newstate; 204 NeuroNetImpl *owner; 205 /** will be used by readParam() method, if not null */ 206 ParamEntry *paramentries; // no extra properties if ==0 200 207 201 208 #ifdef NEURO_SIGNALS 202 209 NeuroSignals sigs; 203 #endif204 NeuroNetImpl *owner;205 210 ExtObject sigs_obj; 211 #endif 206 212 207 213 /** "virtual constructor" - NeuroFactory uses this method to create the proper implementation object. 208 214 subclasses must return new object here. */ 209 215 virtual NeuroImpl* makeNew() {return 0;} // 210 /** will be used by readParam() method, if not null */211 ParamEntry *paramentries; // no extra properties if ==0212 216 /** read additional properties from "moredata" field of the originating Neuro */ 213 217 void readParam(); … … 247 251 void validateNeuroState(double& st) {if (st<=-1e10) st=-1e10; else if (st>1e10) st=1e10;} 248 252 249 NeuroImpl(): owner(0),neuro(0),newstate(0),paramentries(0),simorder(1),status(BeforeInit),channels(1),fields_param(0),fields_object(0)253 NeuroImpl():simorder(1),channels(1),fields_param(0),fields_object(0),status(BeforeInit),neuro(0),newstate(0),owner(0),paramentries(0) 250 254 #ifdef NEURO_SIGNALS 251 255 ,sigs(this),sigs_obj(&NeuroSignals::getStaticParam(),&sigs)
Note: See TracChangeset
for help on using the changeset viewer.