comparison src/Support/Module.cc @ 3:decdac21cfc2

- Imported file input using libsndfile from old AIM-C and updated to the new API - Modified the Module base class to propogate Reset() calls down the module chain. - This required changing all Reset() functions in subclasses to ResetInternal() - Removed some unneeded imports from the Gaussians test
author tomwalters
date Tue, 16 Feb 2010 18:00:16 +0000
parents bc394a985042
children 8c859ef1fb75
comparison
equal deleted inserted replaced
2:e91769e84be1 3:decdac21cfc2
76 } 76 }
77 initialized_ = true; 77 initialized_ = true;
78 return true; 78 return true;
79 } 79 }
80 80
81 void Module::Reset() {
82 if (!initialized_)
83 return;
84
85 ResetInternal();
86
87 // Iterate through all the targets of this module, resetting
88 // them.
89 set<Module*>::const_iterator it;
90 for (it = targets_.begin(); it != targets_.end(); ++it)
91 (*it)->Reset();
92 }
93
81 bool Module::initialized() const { 94 bool Module::initialized() const {
82 return initialized_; 95 return initialized_;
83 } 96 }
84 97
85 bool Module::AddTarget(Module* target_module) { 98 bool Module::AddTarget(Module* target_module) {