LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007 INRIA | 3 * Copyright (c) 2007 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 m_current++; | 78 m_current++; |
79 if (m_current == m_positions.end ()) | 79 if (m_current == m_positions.end ()) |
80 { | 80 { |
81 m_current = m_positions.begin (); | 81 m_current = m_positions.begin (); |
82 } | 82 } |
83 return v; | 83 return v; |
84 } | 84 } |
85 int64_t | 85 int64_t |
86 ListPositionAllocator::AssignStreams (int64_t stream) | 86 ListPositionAllocator::AssignStreams (int64_t stream) |
87 { | 87 { |
88 NS_UNUSED(stream); | 88 NS_UNUSED (stream); |
89 return 0; | 89 return 0; |
90 } | 90 } |
91 | 91 |
92 uint32_t | 92 uint32_t |
93 ListPositionAllocator::GetSize (void) const | 93 ListPositionAllocator::GetSize (void) const |
94 { | 94 { |
95 return m_positions.size (); | 95 return static_cast<uint32_t> (m_positions.size ()); |
96 } | 96 } |
97 | 97 |
98 NS_OBJECT_ENSURE_REGISTERED (GridPositionAllocator); | 98 NS_OBJECT_ENSURE_REGISTERED (GridPositionAllocator); |
99 | 99 |
100 TypeId· | 100 TypeId· |
101 GridPositionAllocator::GetTypeId (void) | 101 GridPositionAllocator::GetTypeId (void) |
102 { | 102 { |
103 static TypeId tid = TypeId ("ns3::GridPositionAllocator") | 103 static TypeId tid = TypeId ("ns3::GridPositionAllocator") |
104 .SetParent<PositionAllocator> () | 104 .SetParent<PositionAllocator> () |
105 .SetGroupName ("Mobility") | 105 .SetGroupName ("Mobility") |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 y = m_yMin + m_deltaY * (m_current % m_n); | 213 y = m_yMin + m_deltaY * (m_current % m_n); |
214 break; | 214 break; |
215 } | 215 } |
216 m_current++; | 216 m_current++; |
217 return Vector (x, y, 0.0); | 217 return Vector (x, y, 0.0); |
218 } | 218 } |
219 | 219 |
220 int64_t | 220 int64_t |
221 GridPositionAllocator::AssignStreams (int64_t stream) | 221 GridPositionAllocator::AssignStreams (int64_t stream) |
222 { | 222 { |
223 NS_UNUSED(stream); | 223 NS_UNUSED (stream); |
224 return 0; | 224 return 0; |
225 } | 225 } |
226 | 226 |
227 NS_OBJECT_ENSURE_REGISTERED (RandomRectanglePositionAllocator); | 227 NS_OBJECT_ENSURE_REGISTERED (RandomRectanglePositionAllocator); |
228 | 228 |
229 TypeId | 229 TypeId |
230 RandomRectanglePositionAllocator::GetTypeId (void) | 230 RandomRectanglePositionAllocator::GetTypeId (void) |
231 { | 231 { |
232 static TypeId tid = TypeId ("ns3::RandomRectanglePositionAllocator") | 232 static TypeId tid = TypeId ("ns3::RandomRectanglePositionAllocator") |
233 .SetParent<PositionAllocator> () | 233 .SetParent<PositionAllocator> () |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 499 |
500 int64_t | 500 int64_t |
501 UniformDiscPositionAllocator::AssignStreams (int64_t stream) | 501 UniformDiscPositionAllocator::AssignStreams (int64_t stream) |
502 { | 502 { |
503 m_rv->SetStream (stream); | 503 m_rv->SetStream (stream); |
504 return 1; | 504 return 1; |
505 } | 505 } |
506 | 506 |
507 | 507 |
508 } // namespace ns3· | 508 } // namespace ns3· |
LEFT | RIGHT |