Mercurial > hg > aimc
comparison src/Support/Module.cc @ 49:0cd20c748308
- AIMCopy v5 for just smooth NAP features
- Reporting of all modules and versions
author | tomwalters |
---|---|
date | Sun, 11 Jul 2010 03:46:06 +0000 |
parents | c5f5e9569863 |
children | 47b009f2c936 |
comparison
equal
deleted
inserted
replaced
48:6dc9bc6cc13b | 49:0cd20c748308 |
---|---|
28 | 28 |
29 #include <utility> | 29 #include <utility> |
30 | 30 |
31 namespace aimc { | 31 namespace aimc { |
32 using std::pair; | 32 using std::pair; |
33 using std::ostream; | |
33 Module::Module(Parameters *parameters) { | 34 Module::Module(Parameters *parameters) { |
34 initialized_ = false; | 35 initialized_ = false; |
35 targets_.clear(); | 36 targets_.clear(); |
36 parameters_ = parameters; | 37 parameters_ = parameters; |
37 module_identifier_ = "MODULE IDENTIFIER NOT SET"; | 38 module_identifier_ = "MODULE IDENTIFIER NOT SET"; |
129 for (it = targets_.begin(); it != targets_.end(); ++it) { | 130 for (it = targets_.begin(); it != targets_.end(); ++it) { |
130 (*it)->Process(output_); | 131 (*it)->Process(output_); |
131 } | 132 } |
132 } | 133 } |
133 } | 134 } |
135 | |
136 void Module::PrintTargets(ostream &out) { | |
137 out << id(); | |
138 if (targets_.size() > 0) { | |
139 out << "->("; | |
140 set<Module*>::const_iterator it; | |
141 for (it = targets_.begin(); it != targets_.end(); ++it) { | |
142 (*it)->PrintTargets(out); | |
143 if (targets_.size() > 1) { | |
144 out << ","; | |
145 } | |
146 } | |
147 out << ")"; | |
148 } | |
149 } | |
150 | |
151 void Module::PrintVersions(ostream &out) { | |
152 out << version() << "\n"; | |
153 set<Module*>::const_iterator it; | |
154 for (it = targets_.begin(); it != targets_.end(); ++it) { | |
155 (*it)->PrintVersions(out); | |
156 } | |
157 } | |
134 } // namespace aimc | 158 } // namespace aimc |
135 | 159 |