void Mix::childRemoved(Component *c) { FlowController *f; if ( (f = dynamic_cast<FlowController *>(c)) ) setCarrier(0); ChildTypeCounter<Bank>::childRemoved(c); Bank *b; if ( (b = dynamic_cast<Bank *>(c)) ) { mix_ratio.erase(b->name()); setMixtureRatios(mix_ratio); } }
void Mix::childAdded(Component *c) { FlowController *f; if ( (f = dynamic_cast<FlowController *>(c)) ) setCarrier(f); ChildTypeCounter<Bank>::childAdded(c); Bank *b; if ( (b = dynamic_cast<Bank *>(c)) ) { mix_ratio[b->name()] = 1.0; setMixtureRatios(mix_ratio); } }