equal
deleted
inserted
replaced
18 * |
18 * |
19 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
19 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
20 */ |
20 */ |
21 |
21 |
22 #include "trailer.h" |
22 #include "trailer.h" |
23 #include "ns3/assert.h" |
|
24 |
23 |
25 namespace ns3 { |
24 namespace ns3 { |
26 |
|
27 Trailer::Trailer () |
|
28 : m_isDeserialized (false) |
|
29 {} |
|
30 |
25 |
31 Trailer::~Trailer () |
26 Trailer::~Trailer () |
32 {} |
27 {} |
33 |
28 |
34 void |
|
35 Trailer::Print (std::ostream &os) const |
|
36 { |
|
37 PrintTo (os); |
|
38 } |
|
39 uint32_t |
|
40 Trailer::GetSize (void) const |
|
41 { |
|
42 return GetSerializedSize (); |
|
43 } |
|
44 void |
|
45 Trailer::Serialize (Buffer::Iterator start) const |
|
46 { |
|
47 SerializeTo (start); |
|
48 } |
|
49 void |
|
50 Trailer::Deserialize (Buffer::Iterator start) |
|
51 { |
|
52 DeserializeFrom (start); |
|
53 m_isDeserialized = true; |
|
54 } |
|
55 bool |
|
56 Trailer::IsDeserialized (void) const |
|
57 { |
|
58 return m_isDeserialized; |
|
59 } |
|
60 |
|
61 std::ostream& operator<< (std::ostream& os, Trailer const& trailer) |
|
62 { |
|
63 trailer.Print (os); |
|
64 return os; |
|
65 } |
|
66 |
|
67 }; // namespace ns3 |
29 }; // namespace ns3 |