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

(-)a/src/core/model/cairo-wideint.c (-7 / +7 lines)
 Lines 313-323    Link Here 
313
	den = _cairo_int64_negate (den);
313
	den = _cairo_int64_negate (den);
314
    uqr = _cairo_uint64_divrem (num, den);
314
    uqr = _cairo_uint64_divrem (num, den);
315
    if (num_neg)
315
    if (num_neg)
316
	qr.rem = _cairo_int64_negate ((cairo_int64_t)uqr.rem);  //PDB
316
	qr.rem = _cairo_int64_negate ((cairo_int64_t)uqr.rem);  //PDB cast
317
    else
317
    else
318
	qr.rem = uqr.rem;
318
	qr.rem = uqr.rem;
319
    if (num_neg != den_neg)
319
    if (num_neg != den_neg)
320
	qr.quo = (cairo_int64_t) _cairo_int64_negate ((cairo_int64_t)uqr.quo);  //PDB
320
	qr.quo = (cairo_int64_t) _cairo_int64_negate ((cairo_int64_t)uqr.quo);  //PDB cast
321
    else
321
    else
322
	qr.quo = (cairo_int64_t) uqr.quo;
322
	qr.quo = (cairo_int64_t) uqr.quo;
323
    return qr;
323
    return qr;
 Lines 691-697    Link Here 
691
    cairo_uint64_t x = _cairo_uint128_to_uint64 (_cairo_uint128_rsl(num, 32));
691
    cairo_uint64_t x = _cairo_uint128_to_uint64 (_cairo_uint128_rsl(num, 32));
692
692
693
    /* Initialise the result to indicate overflow. */
693
    /* Initialise the result to indicate overflow. */
694
    result.quo = _cairo_uint32s_to_uint64 (UINT_MAX, UINT_MAX);  //PDB
694
    result.quo = _cairo_uint32s_to_uint64 (UINT_MAX, UINT_MAX);  //PDB cast
695
    result.rem = den;
695
    result.rem = den;
696
696
697
    /* Don't bother if the quotient is going to overflow. */
697
    /* Don't bother if the quotient is going to overflow. */
 Lines 758-764    Link Here 
758
	/* Add the main term's contribution to quotient.  Note B-v =
758
	/* Add the main term's contribution to quotient.  Note B-v =
759
	 * -v as an uint32 (unless v = 0) */
759
	 * -v as an uint32 (unless v = 0) */
760
	if (v)
760
	if (v)
761
	    quorem = _cairo_uint64_divrem (_cairo_uint32x32_64_mul (q, -(int32_t)v), den);  //PDB
761
	    quorem = _cairo_uint64_divrem (_cairo_uint32x32_64_mul (q, -(int32_t)v), den);  //PDB cast
762
	else
762
	else
763
	    quorem = _cairo_uint64_divrem (_cairo_uint32s_to_uint64 (q, 0), den);
763
	    quorem = _cairo_uint64_divrem (_cairo_uint32s_to_uint64 (q, 0), den);
764
	quotient += _cairo_uint64_to_uint32 (quorem.quo);
764
	quotient += _cairo_uint64_to_uint32 (quorem.quo);
 Lines 807-823    Link Here 
807
    uqr = _cairo_uint_96by64_32x64_divrem (num, nonneg_den);
807
    uqr = _cairo_uint_96by64_32x64_divrem (num, nonneg_den);
808
    if (_cairo_uint64_eq (uqr.rem, _cairo_int64_to_uint64 (nonneg_den))) {
808
    if (_cairo_uint64_eq (uqr.rem, _cairo_int64_to_uint64 (nonneg_den))) {
809
	/* bail on overflow. */
809
	/* bail on overflow. */
810
	qr.quo = _cairo_uint32s_to_uint64 (0x7FFFFFFF, UINT_MAX);  //PDB
810
	qr.quo = _cairo_uint32s_to_uint64 (0x7FFFFFFF, UINT_MAX);  //PDB cast
811
	qr.rem = den;
811
	qr.rem = den;
812
	return qr;
812
	return qr;
813
    }
813
    }
814
814
815
    if (num_neg)
815
    if (num_neg)
816
	qr.rem = _cairo_int64_negate ((cairo_int64_t)uqr.rem);  //PDB
816
	qr.rem = _cairo_int64_negate ((cairo_int64_t)uqr.rem);  //PDB cast
817
    else
817
    else
818
	qr.rem = uqr.rem;
818
	qr.rem = uqr.rem;
819
    if (num_neg != den_neg)
819
    if (num_neg != den_neg)
820
	qr.quo = _cairo_int64_negate ((cairo_int64_t)uqr.quo);  //PDB
820
	qr.quo = _cairo_int64_negate ((cairo_int64_t)uqr.quo);  //PDB cast
821
    else
821
    else
822
	qr.quo = uqr.quo;
822
	qr.quo = uqr.quo;
823
    return qr;
823
    return qr;
(-)a/src/core/model/config.cc (-4 / +4 lines)
 Lines 72-78    Link Here 
72
  return static_cast<uint32_t>(m_objects.size ());
72
  return static_cast<uint32_t>(m_objects.size ());
73
}
73
}
74
Ptr<Object>
74
Ptr<Object>
75
MatchContainer::Get(std::size_t i) const
75
MatchContainer::Get (std::size_t i) const
76
{
76
{
77
  NS_LOG_FUNCTION (this << i);
77
  NS_LOG_FUNCTION (this << i);
78
  return m_objects[i];
78
  return m_objects[i];
 Lines 602-610    Link Here 
602
  void UnregisterRootNamespaceObject (Ptr<Object> obj);
602
  void UnregisterRootNamespaceObject (Ptr<Object> obj);
603
603
604
  /** \copydoc Config::GetRootNamespaceObjectN() */
604
  /** \copydoc Config::GetRootNamespaceObjectN() */
605
  std::size_t GetRootNamespaceObjectN(void) const;
605
  std::size_t GetRootNamespaceObjectN (void) const;
606
  /** \copydoc Config::GetRootNamespaceObject() */
606
  /** \copydoc Config::GetRootNamespaceObject() */
607
  Ptr<Object> GetRootNamespaceObject(std::size_t i) const;
607
  Ptr<Object> GetRootNamespaceObject (std::size_t i) const;
608
608
609
private:
609
private:
610
  /**
610
  /**
 Lines 747-753    Link Here 
747
  return static_cast<uint32_t>(m_roots.size ());
747
  return static_cast<uint32_t>(m_roots.size ());
748
}
748
}
749
Ptr<Object> 
749
Ptr<Object> 
750
ConfigImpl::GetRootNamespaceObject(std::size_t i) const 
750
ConfigImpl::GetRootNamespaceObject (std::size_t i) const 
751
{
751
{
752
  NS_LOG_FUNCTION (this << i);
752
  NS_LOG_FUNCTION (this << i);
753
  return m_roots[i];
753
  return m_roots[i];
(-)a/src/core/model/hash-murmur3.cc (-2 / +2 lines)
 Lines 493-500    Link Here 
493
  h1 += h2;
493
  h1 += h2;
494
  h2 += h1;
494
  h2 += h1;
495
495
496
  ((uint32_t *)out)[0] = static_cast<uint32_t> (h1);  //PDB
496
  ((uint32_t *)out)[0] = static_cast<uint32_t> (h1);  //PDB cast
497
  ((uint32_t *)out)[1] = static_cast<uint32_t> (h2);  //PDB
497
  ((uint32_t *)out)[1] = static_cast<uint32_t> (h2);  //PDB cast
498
}
498
}
499
499
500
500
(-)a/src/core/model/object-ptr-container.cc (-7 / +6 lines)
 Lines 51-68    Link Here 
51
ObjectPtrContainerValue::GetN (void) const
51
ObjectPtrContainerValue::GetN (void) const
52
{
52
{
53
  NS_LOG_FUNCTION (this);
53
  NS_LOG_FUNCTION (this);
54
  return static_cast<uint32_t>(m_objects.size ());
54
  return m_objects.size ();
55
}
55
}
56
Ptr<Object>
56
Ptr<Object>
57
ObjectPtrContainerValue::Get(std::size_t i) const
57
ObjectPtrContainerValue::Get (std::size_t i) const
58
{
58
{
59
  NS_LOG_FUNCTION (this << i);
59
  NS_LOG_FUNCTION (this << i);
60
  const unsigned int j = static_cast<const unsigned int> (i);
60
  Iterator it = m_objects.find (i);
61
  Iterator it = m_objects.find (j); 
62
  Ptr<Object> value = 0;
61
  Ptr<Object> value = 0;
63
  if ( it != m_objects.end () )
62
  if ( it != m_objects.end () )
64
  {
63
  {
65
    value = m_objects.find (j)->second;
64
    value = m_objects.find (i)->second;
66
  }
65
  }
67
  return value;
66
  return value;
68
}
67
}
 Lines 120-130    Link Here 
120
    {
119
    {
121
      return false;
120
      return false;
122
    }
121
    }
123
  for (uint32_t i = 0; i < n; i++)
122
  for (std::size_t i = 0; i < n; i++)
124
    {
123
    {
125
      std::size_t index;
124
      std::size_t index;
126
      Ptr<Object> o = DoGet (object, i, &index);
125
      Ptr<Object> o = DoGet (object, i, &index);
127
      v->m_objects.insert (std::pair <uint32_t, Ptr<Object> > (static_cast<uint32_t> (index), o));
126
      v->m_objects[index] = o;
128
    }
127
    }
129
  return true;
128
  return true;
130
}
129
}
(-)a/src/core/model/object-ptr-container.h (-2 / +2 lines)
 Lines 46-52    Link Here 
46
{
46
{
47
public:
47
public:
48
  /** Iterator type for traversing this container. */
48
  /** Iterator type for traversing this container. */
49
  typedef std::map<uint32_t, Ptr<Object> >::const_iterator Iterator;
49
  typedef std::map<std::size_t, Ptr<Object> >::const_iterator Iterator;
50
50
51
  /** Default constructor. */
51
  /** Default constructor. */
52
  ObjectPtrContainerValue ();
52
  ObjectPtrContainerValue ();
 Lines 104-110    Link Here 
104
private:
104
private:
105
  friend class ObjectPtrContainerAccessor;
105
  friend class ObjectPtrContainerAccessor;
106
  /** The container implementation. */
106
  /** The container implementation. */
107
  std::map<uint32_t, Ptr<Object> > m_objects;
107
  std::map<std::size_t, Ptr<Object> > m_objects;
108
};
108
};
109
109
110
/**
110
/**
(-)a/src/core/model/random-variable-stream.cc (-1 / +1 lines)
 Lines 1488-1494    Link Here 
1488
}
1488
}
1489
1489
1490
void
1490
void
1491
DeterministicRandomVariable::SetValueArray(double* values, std::size_t length)
1491
DeterministicRandomVariable::SetValueArray (double* values, std::size_t length)
1492
{
1492
{
1493
  NS_LOG_FUNCTION (this << values << length);
1493
  NS_LOG_FUNCTION (this << values << length);
1494
  // Delete any values currently set.
1494
  // Delete any values currently set.
(-)a/src/core/model/simple-ref-count.h (-1 / +3 lines)
 Lines 83-89    Link Here 
83
   */
83
   */
84
  SimpleRefCount (const SimpleRefCount &o)
84
  SimpleRefCount (const SimpleRefCount &o)
85
    : m_count (1)
85
    : m_count (1)
86
  {NS_UNUSED(o);}
86
  {
87
    NS_UNUSED(o);
88
  }
87
  /**
89
  /**
88
   * Assignment operator
90
   * Assignment operator
89
   * \param [in] o The object to copy
91
   * \param [in] o The object to copy
(-)a/src/core/model/simulator.h (-7 / +7 lines)
 Lines 185-197    Link Here 
185
  static uint32_t GetContext (void);
185
  static uint32_t GetContext (void);
186
186
187
  /**
187
  /**
188
  * Context enum values.
188
   * Context enum values.
189
  *
189
   *
190
  * \internal
190
   * \internal
191
  * This enum type is fixed to match the representation size
191
   * This enum type is fixed to match the representation size
192
  * of simulation context.
192
   * of simulation context.
193
  */
193
   */
194
    enum : uint32_t {
194
  enum : uint32_t {
195
    /**
195
    /**
196
     * Flag for events not associated with any particular context.
196
     * Flag for events not associated with any particular context.
197
     */
197
     */
(-)a/src/core/model/test.h (-5 / +5 lines)
 Lines 1426-1444    Link Here 
1426
   * 
1426
   * 
1427
   * \returns The new test vector index
1427
   * \returns The new test vector index
1428
   */
1428
   */
1429
  std::size_t Add(T vector);
1429
  std::size_t Add (T vector);
1430
1430
1431
  /**
1431
  /**
1432
   * \brief Get the total number of test vectors.
1432
   * \brief Get the total number of test vectors.
1433
   * \return The number of test vectors
1433
   * \return The number of test vectors
1434
   */
1434
   */
1435
  std::size_t GetN(void) const;
1435
  std::size_t GetN (void) const;
1436
  /**
1436
  /**
1437
   * \brief Get the i'th test vector
1437
   * \brief Get the i'th test vector
1438
   * \param [in] i The requested vector index
1438
   * \param [in] i The requested vector index
1439
   * \return The requested vector
1439
   * \return The requested vector
1440
   */
1440
   */
1441
  T Get(std::size_t i) const;
1441
  T Get (std::size_t i) const;
1442
1442
1443
private:
1443
private:
1444
  typedef std::vector<T> TestVector;    //!< Container type
1444
  typedef std::vector<T> TestVector;    //!< Container type
 Lines 1467-1473    Link Here 
1467
std::size_t
1467
std::size_t
1468
TestVectors<T>::Add (T vector)
1468
TestVectors<T>::Add (T vector)
1469
{
1469
{
1470
  std::size_t index = m_vectors.size();
1470
  std::size_t index = m_vectors.size ();
1471
  m_vectors.push_back (vector);
1471
  m_vectors.push_back (vector);
1472
  return index;
1472
  return index;
1473
}
1473
}
 Lines 1481-1487    Link Here 
1481
1481
1482
template <typename T>
1482
template <typename T>
1483
T
1483
T
1484
TestVectors<T>::Get(std::size_t i) const
1484
TestVectors<T>::Get (std::size_t i) const
1485
{
1485
{
1486
  NS_ABORT_MSG_UNLESS (m_vectors.size () > i, "TestVectors::Get(): Bad index");
1486
  NS_ABORT_MSG_UNLESS (m_vectors.size () > i, "TestVectors::Get(): Bad index");
1487
  return m_vectors[i];
1487
  return m_vectors[i];
(-)a/src/core/model/type-id.cc (-31 / +32 lines)
 Lines 171-177    Link Here 
171
   * Get the total number of type ids.
171
   * Get the total number of type ids.
172
   * \returns The total number.
172
   * \returns The total number.
173
   */
173
   */
174
  uint16_t GetRegisteredN(void) const;
174
  uint16_t GetRegisteredN (void) const;
175
  /**
175
  /**
176
   * Get a type id by index.
176
   * Get a type id by index.
177
   *
177
   *
 Lines 213-234    Link Here 
213
   * \param [in] i The attribute to manipulate
213
   * \param [in] i The attribute to manipulate
214
   * \param [in] initialValue The new initial value to use for this attribute.
214
   * \param [in] initialValue The new initial value to use for this attribute.
215
   */
215
   */
216
  void SetAttributeInitialValue(uint16_t uid,
216
  void SetAttributeInitialValue (uint16_t uid,
217
                                std::size_t i,
217
                                 std::size_t i,
218
                                Ptr<const AttributeValue> initialValue);
218
                                 Ptr<const AttributeValue> initialValue);
219
  /**
219
  /**
220
   * Get the number of attributes.
220
   * Get the number of attributes.
221
   * \param [in] uid The id.
221
   * \param [in] uid The id.
222
   * \returns The number of attributes associated to this TypeId
222
   * \returns The number of attributes associated to this TypeId
223
   */
223
   */
224
  std::size_t GetAttributeN(uint16_t uid) const;
224
  std::size_t GetAttributeN (uint16_t uid) const;
225
  /**
225
  /**
226
   * Get Attribute information by index.
226
   * Get Attribute information by index.
227
   * \param [in] uid The id.
227
   * \param [in] uid The id.
228
   * \param [in] i Index into attribute array
228
   * \param [in] i Index into attribute array
229
   * \returns The information associated to attribute whose index is \p i.
229
   * \returns The information associated to attribute whose index is \p i.
230
   */
230
   */
231
  struct TypeId::AttributeInformation GetAttribute(uint16_t uid, std::size_t i) const;
231
  struct TypeId::AttributeInformation GetAttribute (uint16_t uid, std::size_t i) const;
232
  /**
232
  /**
233
   * Record a new TraceSource.
233
   * Record a new TraceSource.
234
   * \param [in] uid The id.
234
   * \param [in] uid The id.
 Lines 256-269    Link Here 
256
   * \param [in] uid The id.
256
   * \param [in] uid The id.
257
   * \returns The number of trace sources defined in this TypeId.
257
   * \returns The number of trace sources defined in this TypeId.
258
   */
258
   */
259
  std::size_t GetTraceSourceN(uint16_t uid) const;
259
  std::size_t GetTraceSourceN (uint16_t uid) const;
260
  /**
260
  /**
261
   * Get the trace source by index.
261
   * Get the trace source by index.
262
   * \param [in] uid The id.
262
   * \param [in] uid The id.
263
   * \param [in] i Index into trace source array.
263
   * \param [in] i Index into trace source array.
264
   * \returns Detailed information about the requested trace source.
264
   * \returns Detailed information about the requested trace source.
265
   */
265
   */
266
  struct TypeId::TraceSourceInformation GetTraceSource(uint16_t uid, std::size_t i) const;
266
  struct TypeId::TraceSourceInformation GetTraceSource (uint16_t uid, std::size_t i) const;
267
  /**
267
  /**
268
   * Check if this TypeId should not be listed in documentation.
268
   * Check if this TypeId should not be listed in documentation.
269
   * \param [in] uid The id.
269
   * \param [in] uid The id.
 Lines 423-429    Link Here 
423
    else
423
    else
424
      { // chain old type
424
      { // chain old type
425
        NS_LOG_LOGIC (IIDL << "Old TypeId '" << hinfo->name << "' getting chained.");
425
        NS_LOG_LOGIC (IIDL << "Old TypeId '" << hinfo->name << "' getting chained.");
426
        uint16_t oldUid = GetUid(hinfo->hash);
426
        uint16_t oldUid = GetUid (hinfo->hash);
427
        m_hashmap.erase (m_hashmap.find (hinfo->hash));
427
        m_hashmap.erase (m_hashmap.find (hinfo->hash));
428
        hinfo->hash = hash | HashChainFlag;
428
        hinfo->hash = hash | HashChainFlag;
429
        m_hashmap.insert (std::make_pair (hinfo->hash, oldUid));
429
        m_hashmap.insert (std::make_pair (hinfo->hash, oldUid));
 Lines 440-453    Link Here 
440
  information.hasConstructor = false;
440
  information.hasConstructor = false;
441
  information.mustHideFromDocumentation = false;
441
  information.mustHideFromDocumentation = false;
442
  m_information.push_back (information);
442
  m_information.push_back (information);
443
  uint16_t uid = static_cast<uint16_t> (m_information.size());
443
  std::size_t tuid = m_information.size ();
444
  NS_ASSERT (uid <= 0xffff);
444
  NS_ASSERT (tuid <= 0xffff);
445
  uint16_t uid = static_cast<uint16_t> (tuid);
445
446
446
  // Add to both maps:
447
  // Add to both maps:
447
  m_namemap.insert (std::make_pair (name, uid));
448
  m_namemap.insert (std::make_pair (name, uid));
448
  m_hashmap.insert (std::make_pair (hash, uid));
449
  m_hashmap.insert (std::make_pair (hash, uid));
449
  NS_LOG_LOGIC (IIDL << uid);
450
  NS_LOG_LOGIC (IIDL << uid);
450
  return static_cast<uint16_t>(uid);
451
  return static_cast<uint16_t> (uid);
451
}
452
}
452
453
453
struct IidManager::IidInformation *
454
struct IidManager::IidInformation *
 Lines 678-686    Link Here 
678
  NS_LOG_LOGIC (IIDL << information->attributes.size () - 1);
679
  NS_LOG_LOGIC (IIDL << information->attributes.size () - 1);
679
}
680
}
680
void 
681
void 
681
IidManager::SetAttributeInitialValue(uint16_t uid,
682
IidManager::SetAttributeInitialValue (uint16_t uid,
682
                                     std::size_t i,
683
                                      std::size_t i,
683
                                     Ptr<const AttributeValue> initialValue)
684
                                      Ptr<const AttributeValue> initialValue)
684
{
685
{
685
  NS_LOG_FUNCTION (IID << uid << i << initialValue);
686
  NS_LOG_FUNCTION (IID << uid << i << initialValue);
686
  struct IidInformation *information = LookupInformation (uid);
687
  struct IidInformation *information = LookupInformation (uid);
 Lines 695-706    Link Here 
695
{
696
{
696
  NS_LOG_FUNCTION (IID << uid);
697
  NS_LOG_FUNCTION (IID << uid);
697
  struct IidInformation *information = LookupInformation (uid);
698
  struct IidInformation *information = LookupInformation (uid);
698
  std::size_t size = information->attributes.size();
699
  std::size_t size = information->attributes.size ();
699
  NS_LOG_LOGIC (IIDL << size);
700
  NS_LOG_LOGIC (IIDL << size);
700
  return size;
701
  return size;
701
}
702
}
702
struct TypeId::AttributeInformation 
703
struct TypeId::AttributeInformation 
703
IidManager::GetAttribute(uint16_t uid, std::size_t i) const
704
IidManager::GetAttribute (uint16_t uid, std::size_t i) const
704
{
705
{
705
  NS_LOG_FUNCTION (IID << uid << i);
706
  NS_LOG_FUNCTION (IID << uid << i);
706
  struct IidInformation *information = LookupInformation (uid);
707
  struct IidInformation *information = LookupInformation (uid);
 Lines 773-784    Link Here 
773
{
774
{
774
  NS_LOG_FUNCTION (IID << uid);
775
  NS_LOG_FUNCTION (IID << uid);
775
  struct IidInformation *information = LookupInformation (uid);
776
  struct IidInformation *information = LookupInformation (uid);
776
  std::size_t size = information->traceSources.size();
777
  std::size_t size = information->traceSources.size ();
777
  NS_LOG_LOGIC (IIDL << size);
778
  NS_LOG_LOGIC (IIDL << size);
778
  return size;
779
  return size;
779
}
780
}
780
struct TypeId::TraceSourceInformation 
781
struct TypeId::TraceSourceInformation 
781
IidManager::GetTraceSource(uint16_t uid, std::size_t i) const
782
IidManager::GetTraceSource (uint16_t uid, std::size_t i) const
782
{
783
{
783
  NS_LOG_FUNCTION (IID << uid << i);
784
  NS_LOG_FUNCTION (IID << uid << i);
784
  struct IidInformation *information = LookupInformation (uid);
785
  struct IidInformation *information = LookupInformation (uid);
 Lines 880-888    Link Here 
880
  TypeId nextTid = *this;
881
  TypeId nextTid = *this;
881
  do {
882
  do {
882
      tid = nextTid;
883
      tid = nextTid;
883
      for (std::size_t i = 0; i < tid.GetAttributeN(); i++)
884
      for (std::size_t i = 0; i < tid.GetAttributeN (); i++)
884
        {
885
        {
885
          struct TypeId::AttributeInformation tmp = tid.GetAttribute(i);
886
          struct TypeId::AttributeInformation tmp = tid.GetAttribute (i);
886
          if (tmp.name == name)
887
          if (tmp.name == name)
887
            {
888
            {
888
              if (tmp.supportLevel == TypeId::SUPPORTED)
889
              if (tmp.supportLevel == TypeId::SUPPORTED)
 Lines 1039-1046    Link Here 
1039
}
1040
}
1040
1041
1041
bool 
1042
bool 
1042
TypeId::SetAttributeInitialValue(std::size_t i,
1043
TypeId::SetAttributeInitialValue (std::size_t i,
1043
                                 Ptr<const AttributeValue> initialValue)
1044
                                  Ptr<const AttributeValue> initialValue)
1044
{
1045
{
1045
  NS_LOG_FUNCTION (this << i << initialValue);
1046
  NS_LOG_FUNCTION (this << i << initialValue);
1046
  IidManager::Get ()->SetAttributeInitialValue (m_tid, i, initialValue);
1047
  IidManager::Get ()->SetAttributeInitialValue (m_tid, i, initialValue);
 Lines 1068-1087    Link Here 
1068
TypeId::GetAttributeN (void) const
1069
TypeId::GetAttributeN (void) const
1069
{
1070
{
1070
  NS_LOG_FUNCTION (this);
1071
  NS_LOG_FUNCTION (this);
1071
  std::size_t n = IidManager::Get()->GetAttributeN(m_tid);
1072
  std::size_t n = IidManager::Get ()->GetAttributeN (m_tid);
1072
  return n;
1073
  return n;
1073
}
1074
}
1074
struct TypeId::AttributeInformation 
1075
struct TypeId::AttributeInformation 
1075
TypeId::GetAttribute(std::size_t i) const
1076
TypeId::GetAttribute (std::size_t i) const
1076
{
1077
{
1077
  NS_LOG_FUNCTION (this << i);
1078
  NS_LOG_FUNCTION (this << i);
1078
  return IidManager::Get ()->GetAttribute(m_tid, i);
1079
  return IidManager::Get ()->GetAttribute (m_tid, i);
1079
}
1080
}
1080
std::string 
1081
std::string 
1081
TypeId::GetAttributeFullName(std::size_t i) const
1082
TypeId::GetAttributeFullName (std::size_t i) const
1082
{
1083
{
1083
  NS_LOG_FUNCTION (this << i);
1084
  NS_LOG_FUNCTION (this << i);
1084
  struct TypeId::AttributeInformation info = GetAttribute(i);
1085
  struct TypeId::AttributeInformation info = GetAttribute (i);
1085
  return GetName () + "::" + info.name;
1086
  return GetName () + "::" + info.name;
1086
}
1087
}
1087
1088
 Lines 1092-1101    Link Here 
1092
  return IidManager::Get ()->GetTraceSourceN (m_tid);
1093
  return IidManager::Get ()->GetTraceSourceN (m_tid);
1093
}
1094
}
1094
struct TypeId::TraceSourceInformation 
1095
struct TypeId::TraceSourceInformation 
1095
TypeId::GetTraceSource(std::size_t i) const
1096
TypeId::GetTraceSource (std::size_t i) const
1096
{
1097
{
1097
  NS_LOG_FUNCTION (this << i);
1098
  NS_LOG_FUNCTION (this << i);
1098
  return IidManager::Get ()->GetTraceSource(m_tid, i);
1099
  return IidManager::Get ()->GetTraceSource (m_tid, i);
1099
}
1100
}
1100
1101
1101
TypeId 
1102
TypeId 
 Lines 1141-1147    Link Here 
1141
  struct TypeId::TraceSourceInformation tmp;
1142
  struct TypeId::TraceSourceInformation tmp;
1142
  do {
1143
  do {
1143
      tid = nextTid;
1144
      tid = nextTid;
1144
      for (std::size_t i = 0; i < tid.GetTraceSourceN(); i++)
1145
      for (std::size_t i = 0; i < tid.GetTraceSourceN (); i++)
1145
        {
1146
        {
1146
          tmp = tid.GetTraceSource (i);
1147
          tmp = tid.GetTraceSource (i);
1147
          if (tmp.name == name)
1148
          if (tmp.name == name)
(-)a/src/core/model/type-id.h (-6 / +6 lines)
 Lines 254-267    Link Here 
254
   * \param [in] i Index into attribute array
254
   * \param [in] i Index into attribute array
255
   * \returns The information associated to attribute whose index is \p i.
255
   * \returns The information associated to attribute whose index is \p i.
256
   */
256
   */
257
  struct TypeId::AttributeInformation GetAttribute(std::size_t i) const;
257
  struct TypeId::AttributeInformation GetAttribute (std::size_t i) const;
258
  /**
258
  /**
259
   * Get the Attribute name by index.
259
   * Get the Attribute name by index.
260
   *
260
   *
261
   * \param [in] i Index into attribute array
261
   * \param [in] i Index into attribute array
262
   * \returns The full name associated to the attribute whose index is \p i.
262
   * \returns The full name associated to the attribute whose index is \p i.
263
   */
263
   */
264
  std::string GetAttributeFullName(std::size_t i) const;
264
  std::string GetAttributeFullName (std::size_t i) const;
265
265
266
  /**
266
  /**
267
   * Get the constructor callback.
267
   * Get the constructor callback.
 Lines 284-297    Link Here 
284
   *
284
   *
285
   * \returns The number of trace sources defined in this TypeId.
285
   * \returns The number of trace sources defined in this TypeId.
286
   */
286
   */
287
  std::size_t GetTraceSourceN(void) const;
287
  std::size_t GetTraceSourceN (void) const;
288
  /**
288
  /**
289
   * Get the trace source by index.
289
   * Get the trace source by index.
290
   *
290
   *
291
   * \param [in] i Index into trace source array.
291
   * \param [in] i Index into trace source array.
292
   * \returns Detailed information about the requested trace source.
292
   * \returns Detailed information about the requested trace source.
293
   */
293
   */
294
  struct TypeId::TraceSourceInformation GetTraceSource(std::size_t i) const;
294
  struct TypeId::TraceSourceInformation GetTraceSource (std::size_t i) const;
295
295
296
  /**
296
  /**
297
   * Set the parent TypeId.
297
   * Set the parent TypeId.
 Lines 390-397    Link Here 
390
   * \param [in] initialValue The new initial value to use for this attribute.
390
   * \param [in] initialValue The new initial value to use for this attribute.
391
   * \returns \c true if the call was successfuly.
391
   * \returns \c true if the call was successfuly.
392
   */
392
   */
393
  bool SetAttributeInitialValue(std::size_t i,
393
  bool SetAttributeInitialValue (std::size_t i,
394
                                Ptr<const AttributeValue> initialValue);
394
                                 Ptr<const AttributeValue> initialValue);
395
395
396
  /**
396
  /**
397
   * Record in this TypeId the fact that a new attribute exists.
397
   * Record in this TypeId the fact that a new attribute exists.
(-)a/src/core/test/attribute-test-suite.cc (-1 / +1 lines)
 Lines 264-270    Link Here 
264
  int16_t DoGetInt16 (void) const { return m_int16SetGet; }
264
  int16_t DoGetInt16 (void) const { return m_int16SetGet; }
265
  void DoSetInt16 (int16_t v) { m_int16SetGet = v; }
265
  void DoSetInt16 (int16_t v) { m_int16SetGet = v; }
266
  std::size_t DoGetVectorN (void) const { return m_vector2.size (); }
266
  std::size_t DoGetVectorN (void) const { return m_vector2.size (); }
267
  Ptr<Derived> DoGetVector(std::size_t i) const { return m_vector2[i]; }
267
  Ptr<Derived> DoGetVector (std::size_t i) const { return m_vector2[i]; }
268
  bool DoSetIntSrc (int8_t v) { m_intSrc2 = v; return true; }
268
  bool DoSetIntSrc (int8_t v) { m_intSrc2 = v; return true; }
269
  int8_t DoGetIntSrc (void) const { return m_intSrc2; }
269
  int8_t DoGetIntSrc (void) const { return m_intSrc2; }
270
  bool DoSetEnum (Test_e v) { m_enumSetGet = v; return true; }
270
  bool DoSetEnum (Test_e v) { m_enumSetGet = v; return true; }
(-)a/src/lte/test/lte-test-cell-selection.cc (-1 / +1 lines)
 Lines 154-160    Link Here 
154
{
154
{
155
  NS_LOG_FUNCTION (this << GetName ());
155
  NS_LOG_FUNCTION (this << GetName ());
156
156
157
  Config::SetGlobal ("RngRun", UintegerValue(m_rngRun));
157
  Config::SetGlobal ("RngRun", UintegerValue (m_rngRun));
158
158
159
  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
159
  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
160
  lteHelper->SetAttribute ("PathlossModel",
160
  lteHelper->SetAttribute ("PathlossModel",
(-)a/src/lte/test/lte-test-phy-error-model.cc (-2 / +2 lines)
 Lines 166-172    Link Here 
166
  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
166
  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
167
  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (true));
167
  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (true));
168
  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
168
  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
169
  Config::SetGlobal("RngRun", UintegerValue(m_rngRun));
169
  Config::SetGlobal ("RngRun", UintegerValue (m_rngRun));
170
170
171
  //Disable Uplink Power Control
171
  //Disable Uplink Power Control
172
  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
172
  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
 Lines 322-328    Link Here 
322
  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (true));
322
  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (true));
323
  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
323
  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
324
  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
324
  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
325
  Config::SetGlobal ("RngRun", UintegerValue(m_rngRun));
325
  Config::SetGlobal ("RngRun", UintegerValue (m_rngRun));
326
326
327
  //Disable Uplink Power Control
327
  //Disable Uplink Power Control
328
  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
328
  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
(-)a/src/lte/test/lte-test-rlc-am-e2e.cc (-15 / +13 lines)
 Lines 133-154    Link Here 
133
{
133
{
134
  uint16_t numberOfNodes = 1;
134
  uint16_t numberOfNodes = 1;
135
135
136
#if 0
136
  // LogLevel level = (LogLevel) (LOG_LEVEL_ALL | LOG_PREFIX_TIME | LOG_PREFIX_NODE | LOG_PREFIX_FUNC);
137
  LogLevel level = (LogLevel) (LOG_LEVEL_ALL | LOG_PREFIX_TIME | LOG_PREFIX_NODE | LOG_PREFIX_FUNC);
137
  // LogComponentEnable ("LteRlcAmE2eTest", level);
138
  LogComponentEnable ("LteRlcAmE2eTest", level);
138
  // LogComponentEnable ("ErrorModel", level);
139
  LogComponentEnable ("ErrorModel", level);
139
  // LogComponentEnable ("LteSimpleHelper", level);
140
  LogComponentEnable ("LteSimpleHelper", level);
140
  // LogComponentEnable ("LteSimpleNetDevice", level);
141
  LogComponentEnable ("LteSimpleNetDevice", level);
141
  // LogComponentEnable ("SimpleNetDevice", level);
142
  LogComponentEnable ("SimpleNetDevice", level);
142
  // LogComponentEnable ("SimpleChannel", level);
143
  LogComponentEnable ("SimpleChannel", level);
143
  // LogComponentEnable ("LteTestEntities", level);
144
  LogComponentEnable ("LteTestEntities", level);
144
  // LogComponentEnable ("LtePdcp", level);
145
  LogComponentEnable ("LtePdcp", level);
145
  // LogComponentEnable ("LteRlc", level);
146
  LogComponentEnable ("LteRlc", level);
146
  // LogComponentEnable ("LteRlcUm", level);
147
  LogComponentEnable ("LteRlcUm", level);
147
  // LogComponentEnable ("LteRlcAm", level);
148
  LogComponentEnable ("LteRlcAm", level);
149
#endif
150
148
151
  Config::SetGlobal ("RngRun", UintegerValue(m_run));
149
  Config::SetGlobal ("RngRun", UintegerValue (m_run));
152
  Config::SetDefault ("ns3::LteRlcAm::PollRetransmitTimer", TimeValue (MilliSeconds (20)));
150
  Config::SetDefault ("ns3::LteRlcAm::PollRetransmitTimer", TimeValue (MilliSeconds (20)));
153
  Config::SetDefault ("ns3::LteRlcAm::ReorderingTimer", TimeValue (MilliSeconds (10)));
151
  Config::SetDefault ("ns3::LteRlcAm::ReorderingTimer", TimeValue (MilliSeconds (10)));
154
  Config::SetDefault ("ns3::LteRlcAm::StatusProhibitTimer", TimeValue (MilliSeconds (40)));
152
  Config::SetDefault ("ns3::LteRlcAm::StatusProhibitTimer", TimeValue (MilliSeconds (40)));

Return to bug 2726