comparison trunk/src/Support/Module.h @ 401:b71ec2cbe55b

- Module tree
author tomwalters
date Sun, 17 Oct 2010 02:42:12 +0000
parents 0a8e7d0c70dc
children 69466da9745e
comparison
equal deleted inserted replaced
400:dd13c9834ceb 401:b71ec2cbe55b
106 * input modules which do not take a SignalBank as input, but rather 106 * input modules which do not take a SignalBank as input, but rather
107 * generate their own input. In this case, it is better to be able to 107 * generate their own input. In this case, it is better to be able to
108 * override the default Initialize function. When creating a new module, do 108 * override the default Initialize function. When creating a new module, do
109 * not create a new version of Initialize uness you're sure you know what 109 * not create a new version of Initialize uness you're sure you know what
110 * you're doing! 110 * you're doing!
111 */ 111 *
112 virtual bool Initialize(const SignalBank &input); 112 * global_parameters stores things like the input filename, output filenames
113 * and any other metadata that modules might want to share. If present, it
114 * is propagated to all children. These parameters are mutable and may
115 * change.
116 */
117 virtual bool Initialize(const SignalBank &input,
118 Parameters *global_parameters);
113 119
114 /*! \brief Returns true if the module has been correctly initialized 120 /*! \brief Returns true if the module has been correctly initialized
115 * \return true if module has been initialized, false otherwise 121 * \return true if module has been initialized, false otherwise
116 */ 122 */
117 bool initialized() const; 123 bool initialized() const;
160 * 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
161 * 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.
162 */ 168 */
163 void Reset(); 169 void Reset();
164 170
171 /*! \brief Provide a pointer to the global parameters store.
172 *
173
174 */
175 void SetGlobalParameters();
176
165 /*! \brief Return a pointer to the output SignalBank_ for this class. 177 /*! \brief Return a pointer to the output SignalBank_ for this class.
166 * \return pointer to the SignalBank that this module uses to store its 178 * \return pointer to the SignalBank that this module uses to store its
167 * output. 179 * output.
168 */ 180 */
169 const SignalBank* GetOutputBank() const; 181 const SignalBank* GetOutputBank() const;
197 209
198 bool initialized_; 210 bool initialized_;
199 set<Module*> targets_; 211 set<Module*> targets_;
200 SignalBank output_; 212 SignalBank output_;
201 Parameters* parameters_; 213 Parameters* parameters_;
214 Parameters* global_parameters_;
202 215
203 string module_identifier_; 216 string module_identifier_;
204 string module_type_; 217 string module_type_;
205 string module_description_; 218 string module_description_;
206 string module_version_; 219 string module_version_;