43 os << " </ul> " << std::endl; |
43 os << " </ul> " << std::endl; |
44 |
44 |
45 } |
45 } |
46 os << "</ul>" << std::endl; |
46 os << "</ul>" << std::endl; |
47 } |
47 } |
|
48 |
|
49 void |
|
50 PrintTraceSources (TypeId tid, std::ostream &os) |
|
51 { |
|
52 os << "<ul>"<<std::endl; |
|
53 for (uint32_t i = 0; i < tid.GetTraceSourceN (); ++i) |
|
54 { |
|
55 os << "<li><b>" << tid.GetTraceSourceName (i) << "</b>: " |
|
56 << tid.GetTraceSourceHelp (i) |
|
57 << std::endl; |
|
58 os << "</li>" << std::endl; |
|
59 } |
|
60 os << "</ul>"<<std::endl; |
|
61 } |
|
62 |
48 |
63 |
49 class StaticInformation |
64 class StaticInformation |
50 { |
65 { |
51 public: |
66 public: |
52 void RecordAggregationInfo (std::string a, std::string b); |
67 void RecordAggregationInfo (std::string a, std::string b); |
261 else |
276 else |
262 { |
277 { |
263 std::cout << "Attributes defined for this type:" << std::endl; |
278 std::cout << "Attributes defined for this type:" << std::endl; |
264 PrintAttributes (tid, std::cout); |
279 PrintAttributes (tid, std::cout); |
265 } |
280 } |
266 bool hasAttributesInParent = false; |
281 { |
267 TypeId tmp = tid.GetParent (); |
282 TypeId tmp = tid.GetParent (); |
268 while (tmp.GetParent () != tmp) |
283 while (tmp.GetParent () != tmp) |
269 { |
284 { |
270 if (tmp.GetAttributeN () != 0) |
285 if (tmp.GetAttributeN () != 0) |
271 { |
286 { |
272 hasAttributesInParent = true; |
287 std::cout << "Attributes defined in parent class " << tmp.GetName () << ":<br>" << std::endl; |
273 } |
288 PrintAttributes (tmp, std::cout); |
274 tmp = tmp.GetParent (); |
289 } |
275 } |
290 tmp = tmp.GetParent (); |
276 if (hasAttributesInParent) |
291 } |
277 { |
292 } |
278 tmp = tid.GetParent (); |
293 if (tid.GetTraceSourceN () == 0) |
279 while (tmp.GetParent () != tmp) |
294 { |
280 { |
295 std::cout << "No TraceSources defined for this type." << std::endl; |
281 if (tmp.GetAttributeN () != 0) |
296 } |
282 { |
297 else |
283 std::cout << "Attributes defined in parent class " << tmp.GetName () << ":<br>" << std::endl; |
298 { |
284 PrintAttributes (tmp, std::cout); |
299 std::cout << "TraceSources defined for this type:" << std::endl; |
285 } |
300 PrintTraceSources (tid, std::cout); |
286 tmp = tmp.GetParent (); |
301 } |
287 } |
302 { |
288 } |
303 TypeId tmp = tid.GetParent (); |
|
304 while (tmp.GetParent () != tmp) |
|
305 { |
|
306 if (tmp.GetTraceSourceN () != 0) |
|
307 { |
|
308 std::cout << "TraceSources defined in parent class " << tmp.GetName () << ":<br>" << std::endl; |
|
309 PrintTraceSources (tmp, std::cout); |
|
310 } |
|
311 tmp = tmp.GetParent (); |
|
312 } |
|
313 } |
289 std::cout << "*/" << std::endl; |
314 std::cout << "*/" << std::endl; |
290 } |
315 } |
291 |
316 |
292 |
317 |
293 return 0; |
318 return 0; |