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) 2009 University of Washington | 3 * Copyright (c) 2009 University of Washington |
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 *i = 0; | 167 *i = 0; |
168 } | 168 } |
169 m_channels.erase (m_channels.begin (), m_channels.end ()); | 169 m_channels.erase (m_channels.begin (), m_channels.end ()); |
170 Object::DoDispose (); | 170 Object::DoDispose (); |
171 } | 171 } |
172 | 172 |
173 uint32_t | 173 uint32_t |
174 ChannelListPriv::Add (Ptr<Channel> channel) | 174 ChannelListPriv::Add (Ptr<Channel> channel) |
175 { | 175 { |
176 NS_LOG_FUNCTION (this << channel); | 176 NS_LOG_FUNCTION (this << channel); |
177 uint32_t index = static_cast<uint32_t>(m_channels.size ()); | 177 uint32_t index = static_cast<uint32_t> (m_channels.size ()); |
178 m_channels.push_back (channel); | 178 m_channels.push_back (channel); |
179 return index; | 179 return index; |
180 | 180 |
181 } | 181 } |
182 | 182 |
183 ChannelList::Iterator· | 183 ChannelList::Iterator· |
184 ChannelListPriv::Begin (void) const | 184 ChannelListPriv::Begin (void) const |
185 { | 185 { |
186 NS_LOG_FUNCTION (this); | 186 NS_LOG_FUNCTION (this); |
187 return m_channels.begin (); | 187 return m_channels.begin (); |
188 } | 188 } |
189 | 189 |
190 ChannelList::Iterator· | 190 ChannelList::Iterator· |
191 ChannelListPriv::End (void) const | 191 ChannelListPriv::End (void) const |
192 { | 192 { |
193 NS_LOG_FUNCTION (this); | 193 NS_LOG_FUNCTION (this); |
194 return m_channels.end (); | 194 return m_channels.end (); |
195 } | 195 } |
196 | 196 |
197 uint32_t· | 197 uint32_t· |
198 ChannelListPriv::GetNChannels (void) | 198 ChannelListPriv::GetNChannels (void) |
199 { | 199 { |
200 NS_LOG_FUNCTION (this); | 200 NS_LOG_FUNCTION (this); |
201 return static_cast<uint32_t>(m_channels.size ()); | 201 return static_cast<uint32_t> (m_channels.size ()); |
202 } | 202 } |
203 | 203 |
204 Ptr<Channel> | 204 Ptr<Channel> |
205 ChannelListPriv::GetChannel (uint32_t n) | 205 ChannelListPriv::GetChannel (uint32_t n) |
206 { | 206 { |
207 NS_LOG_FUNCTION (this << n); | 207 NS_LOG_FUNCTION (this << n); |
208 NS_ASSERT_MSG (n < m_channels.size (), "Channel index " << n << | 208 NS_ASSERT_MSG (n < m_channels.size (), "Channel index " << n << |
209 " is out of range (only have " << m_channels.size () << " chann
els)."); | 209 " is out of range (only have " << m_channels.size () << " chann
els)."); |
210 return m_channels[n]; | 210 return m_channels[n]; |
211 } | 211 } |
(...skipping 27 matching lines...) Expand all Loading... |
239 } | 239 } |
240 | 240 |
241 uint32_t | 241 uint32_t |
242 ChannelList::GetNChannels (void) | 242 ChannelList::GetNChannels (void) |
243 { | 243 { |
244 NS_LOG_FUNCTION_NOARGS (); | 244 NS_LOG_FUNCTION_NOARGS (); |
245 return ChannelListPriv::Get ()->GetNChannels (); | 245 return ChannelListPriv::Get ()->GetNChannels (); |
246 } | 246 } |
247 | 247 |
248 } // namespace ns3 | 248 } // namespace ns3 |
LEFT | RIGHT |