--- a/src/common/packet-history.cc Wed May 30 09:48:53 2007 +0200
+++ b/src/common/packet-history.cc Wed May 30 10:03:15 2007 +0200
@@ -925,6 +925,7 @@
#include <stdarg.h>
#include <iostream>
+#include <sstream>
#include "ns3/test.h"
#include "header.h"
#include "trailer.h"
@@ -964,6 +965,7 @@
class HistoryHeader : public Header
{
private:
+ virtual std::string DoGetName (void) const;
virtual void PrintTo (std::ostream &os) const;
virtual uint32_t GetSerializedSize (void) const;
virtual void SerializeTo (Buffer::Iterator start) const;
@@ -971,6 +973,15 @@
};
template <int N>
+std::string
+HistoryHeader<N>::DoGetName (void) const
+{
+ std::ostringstream oss;
+ oss << N;
+ return oss.str ();
+}
+
+template <int N>
void
HistoryHeader<N>::PrintTo (std::ostream &os) const
{
@@ -1006,6 +1017,7 @@
class HistoryTrailer : public Trailer
{
private:
+ virtual std::string DoGetName (void) const;
virtual void PrintTo (std::ostream &os) const;
virtual uint32_t GetSerializedSize (void) const;
virtual void SerializeTo (Buffer::Iterator start) const;
@@ -1013,6 +1025,14 @@
};
template <int N>
+std::string
+HistoryTrailer<N>::DoGetName (void) const
+{
+ std::ostringstream oss;
+ oss << N;
+ return oss.str ();
+}
+template <int N>
void
HistoryTrailer<N>::PrintTo (std::ostream &os) const
{