Mercurial > hg > aimc
comparison trunk/src/Support/Module.h @ 402:69466da9745e
- Massive refactoring to make module tree stuff work. In theory we now support configuration files again. The graphics stuff is untested as yet.
author | tomwalters |
---|---|
date | Mon, 18 Oct 2010 04:42:28 +0000 |
parents | b71ec2cbe55b |
children | 6bc760be184b |
comparison
equal
deleted
inserted
replaced
401:b71ec2cbe55b | 402:69466da9745e |
---|---|
166 * Like a call to Initialize() will cause all target modules to be | 166 * Like a call to Initialize() will cause all target modules to be |
167 * initialized, a call to Reset() will cause all target modules to be reset. | 167 * initialized, a call to Reset() will cause all target modules to be reset. |
168 */ | 168 */ |
169 void Reset(); | 169 void Reset(); |
170 | 170 |
171 /*! \brief Provide a pointer to the global parameters store. | |
172 * | |
173 | |
174 */ | |
175 void SetGlobalParameters(); | |
176 | |
177 /*! \brief Return a pointer to the output SignalBank_ for this class. | 171 /*! \brief Return a pointer to the output SignalBank_ for this class. |
178 * \return pointer to the SignalBank that this module uses to store its | 172 * \return pointer to the SignalBank that this module uses to store its |
179 * output. | 173 * output. |
180 */ | 174 */ |
181 const SignalBank* GetOutputBank() const; | 175 const SignalBank* GetOutputBank() const; |
182 | 176 |
183 void PrintTargets(ostream &out); | 177 void PrintTargets(ostream &out); |
184 | 178 void PrintTargetsForDot(ostream &out); |
185 void PrintVersions(ostream &out); | 179 void PrintConfiguration(ostream &out); |
186 | 180 |
187 string version() const { | 181 string version() const { |
188 return module_version_; | 182 return module_version_; |
189 } | 183 } |
190 | 184 |
197 } | 191 } |
198 | 192 |
199 string type() const { | 193 string type() const { |
200 return module_type_; | 194 return module_type_; |
201 } | 195 } |
196 | |
197 bool done() { | |
198 return done_; | |
199 } | |
200 | |
201 void set_instance_name(string instance_name) { | |
202 instance_name_ = instance_name; | |
203 } | |
204 | |
205 string instance_name() { | |
206 return instance_name_; | |
207 } | |
202 | 208 |
203 protected: | 209 protected: |
204 void PushOutput(); | 210 void PushOutput(); |
205 | 211 |
206 virtual void ResetInternal() = 0; | 212 virtual void ResetInternal() = 0; |
207 | 213 |
208 virtual bool InitializeInternal(const SignalBank &input) = 0; | 214 virtual bool InitializeInternal(const SignalBank &input) = 0; |
209 | 215 |
210 bool initialized_; | 216 bool initialized_; |
217 bool done_; | |
211 set<Module*> targets_; | 218 set<Module*> targets_; |
212 SignalBank output_; | 219 SignalBank output_; |
213 Parameters* parameters_; | 220 Parameters* parameters_; |
214 Parameters* global_parameters_; | 221 Parameters* global_parameters_; |
215 | 222 |
216 string module_identifier_; | 223 string module_identifier_; |
217 string module_type_; | 224 string module_type_; |
218 string module_description_; | 225 string module_description_; |
219 string module_version_; | 226 string module_version_; |
227 | |
228 string instance_name_; | |
220 | 229 |
221 private: | 230 private: |
222 DISALLOW_COPY_AND_ASSIGN(Module); | 231 DISALLOW_COPY_AND_ASSIGN(Module); |
223 }; | 232 }; |
224 } | 233 } |