void nest::music_cont_in_proxy::set_status( const DictionaryDatum& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_ ); // throws if BadProperty State_ stmp = S_; stmp.set( d, P_ ); // throws if BadProperty // if we get here, temporaries contain consistent set of properties P_ = ptmp; S_ = stmp; }
void iaf_psc_exp_multisynapse::set_status( const DictionaryDatum& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d ); // throws if BadProperty State_ stmp = S_; // temporary copy in case of errors stmp.set( d, ptmp, delta_EL ); // throws if BadProperty // We now know that (ptmp, stmp) are consistent. We do not // write them back to (P_, S_) before we are also sure that // the properties to be set in the parent class are internally // consistent. Archiving_Node::set_status( d ); /* * Here is where we must update the recordablesMap_ if new receptors * are added! */ DynamicRecordablesMap< iaf_psc_exp_multisynapse > rtmp = recordablesMap_; // temporary copy in case of errors if ( ptmp.tau_syn_.size() > P_.tau_syn_.size() ) // Number of receptors increased { for ( size_t i_syn = P_.tau_syn_.size(); i_syn < ptmp.tau_syn_.size(); ++i_syn ) { size_t elem = iaf_psc_exp_multisynapse::State_::I_SYN + i_syn * iaf_psc_exp_multisynapse::State_::NUM_STATE_ELEMENTS_PER_RECEPTOR; rtmp.insert( get_i_syn_name( i_syn ), get_data_access_functor( elem ) ); } } else if ( ptmp.tau_syn_.size() < P_.tau_syn_.size() ) { // Number of receptors decreased for ( size_t i_syn = ptmp.tau_syn_.size(); i_syn < P_.tau_syn_.size(); ++i_syn ) { rtmp.erase( get_i_syn_name( i_syn ) ); } } // if we get here, temporaries contain consistent set of properties P_ = ptmp; S_ = stmp; recordablesMap_ = rtmp; }
void nest::ht_neuron::set_status( const DictionaryDatum& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d ); // throws if BadProperty State_ stmp = S_; // temporary copy in case of errors stmp.set( d, ptmp ); // throws if BadProperty // We now know that (ptmp, stmp) are consistent. We do not // write them back to (P_, S_) before we are also sure that // the properties to be set in the parent class are internally // consistent. Archiving_Node::set_status( d ); // if we get here, temporaries contain consistent set of properties P_ = ptmp; S_ = stmp; }