equal
deleted
inserted
replaced
289 } |
289 } |
290 |
290 |
291 void |
291 void |
292 Packet::PrintTags (std::ostream &os) const |
292 Packet::PrintTags (std::ostream &os) const |
293 { |
293 { |
294 // XXX: |
294 TagIterator i = GetTagIterator (); |
295 //m_tagList.Print (os, " "); |
295 while (i.HasNext ()) |
|
296 { |
|
297 TagIterator::Item item = i.Next (); |
|
298 os << item.GetTypeId ().GetName () << " [" << item.GetStart () << "-" << item.GetEnd () << "]"; |
|
299 Callback<ObjectBase *> constructor = item.GetTypeId ().GetConstructor (); |
|
300 if (constructor.IsNull ()) |
|
301 { |
|
302 if (i.HasNext ()) |
|
303 { |
|
304 os << " "; |
|
305 } |
|
306 continue; |
|
307 } |
|
308 Tag *tag = dynamic_cast<Tag *> (constructor ()); |
|
309 NS_ASSERT (tag != 0); |
|
310 os << " "; |
|
311 tag->Print (os); |
|
312 if (i.HasNext ()) |
|
313 { |
|
314 os << " "; |
|
315 } |
|
316 delete tag; |
|
317 } |
296 } |
318 } |
297 |
319 |
298 void |
320 void |
299 Packet::Print (std::ostream &os) const |
321 Packet::Print (std::ostream &os) const |
300 { |
322 { |
574 { |
596 { |
575 m_error = true; |
597 m_error = true; |
576 } |
598 } |
577 } |
599 } |
578 } |
600 } |
|
601 virtual void Print (std::ostream &os) const { |
|
602 os << N; |
|
603 } |
579 ATestTag () |
604 ATestTag () |
580 : ATestTagBase () {} |
605 : ATestTagBase () {} |
581 }; |
606 }; |
582 |
607 |
583 class ATestHeaderBase : public Header |
608 class ATestHeaderBase : public Header |