View | Details | Raw Unified | Return to bug 1601
Collapse All | Expand All

(-)a/doc/manual/source/attributes.rst (+4 lines)
 Lines 492-497    Link Here 
492
      // continue on with constructor.
492
      // continue on with constructor.
493
    }
493
    }
494
494
495
Beware that the object and all its derived classes must also implement a 
496
``virtual TypeId GetInstanceTypeId (void) const;`` method. Otherwise the
497
``ObjectBase::ConstructSelf ()`` will not be able to read the attributes.
498
495
Extending attributes
499
Extending attributes
496
********************
500
********************
497
501
(-)a/src/internet/model/rtt-estimator.cc (+12 lines)
 Lines 134-139    Link Here 
134
  NS_LOG_FUNCTION (this);
134
  NS_LOG_FUNCTION (this);
135
}
135
}
136
136
137
TypeId
138
RttEstimator::GetInstanceTypeId (void) const
139
{
140
  return GetTypeId ();
141
}
142
137
void RttEstimator::SentSeq (SequenceNumber32 seq, uint32_t size)
143
void RttEstimator::SentSeq (SequenceNumber32 seq, uint32_t size)
138
{ 
144
{ 
139
  NS_LOG_FUNCTION (this << seq << size);
145
  NS_LOG_FUNCTION (this << seq << size);
 Lines 254-259    Link Here 
254
  NS_LOG_FUNCTION (this);
260
  NS_LOG_FUNCTION (this);
255
}
261
}
256
262
263
TypeId
264
RttMeanDeviation::GetInstanceTypeId (void) const
265
{
266
  return GetTypeId ();
267
}
268
257
void RttMeanDeviation::Measurement (Time m)
269
void RttMeanDeviation::Measurement (Time m)
258
{
270
{
259
  NS_LOG_FUNCTION (this << m);
271
  NS_LOG_FUNCTION (this << m);
(-)a/src/internet/model/rtt-estimator.h (+4 lines)
 Lines 64-69    Link Here 
64
64
65
  virtual ~RttEstimator();
65
  virtual ~RttEstimator();
66
66
67
  virtual TypeId GetInstanceTypeId (void) const;
68
67
  /**
69
  /**
68
   * \brief Note that a particular sequence has been sent
70
   * \brief Note that a particular sequence has been sent
69
   * \param seq the packet sequence number.
71
   * \param seq the packet sequence number.
 Lines 167-172    Link Here 
167
169
168
  RttMeanDeviation (const RttMeanDeviation&);
170
  RttMeanDeviation (const RttMeanDeviation&);
169
171
172
  virtual TypeId GetInstanceTypeId (void) const;
173
170
  /**
174
  /**
171
   * \brief Add a new measurement to the estimator.
175
   * \brief Add a new measurement to the estimator.
172
   * \param measure the new RTT measure.
176
   * \param measure the new RTT measure.

Return to bug 1601