OLD | NEW |
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 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
11 * | 11 * |
12 * You should have received a copy of the GNU General Public License | 12 * You should have received a copy of the GNU General Public License |
13 * along with this program; if not, write to the Free Software | 13 * along with this program; if not, write to the Free Software |
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 *· | 15 *· |
16 * Authors: Faker Moatamri <faker.moatamri@sophia.inria.fr> | 16 * Authors: Faker Moatamri <faker.moatamri@sophia.inria.fr> |
17 * Mathieu Lacage <mathieu.lacage@sophia.inria.fr> | 17 * Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
18 */ | 18 */ |
19 · | 19 · |
20 #include "attribute-default-iterator.h" | 20 #include "attribute-default-iterator.h" |
21 #include "ns3/attribute.h" | 21 #include "ns3/attribute.h" |
22 #include "ns3/pointer.h" | 22 #include "ns3/pointer.h" |
23 #include "ns3/callback.h" | 23 #include "ns3/callback.h" |
24 #include "ns3/global-value.h" | 24 #include "ns3/global-value.h" |
25 #include "ns3/string.h" | 25 #include "ns3/string.h" |
26 #include "ns3/object-ptr-container.h" | 26 #include "ns3/object-ptr-container.h" |
| 27 #include "ns3/unused.h" |
27 | 28 |
28 namespace ns3 | 29 namespace ns3 |
29 { | 30 { |
30 | 31 |
31 AttributeDefaultIterator::~AttributeDefaultIterator () | 32 AttributeDefaultIterator::~AttributeDefaultIterator () |
32 { | 33 { |
33 } | 34 } |
34 void· | 35 void· |
35 AttributeDefaultIterator::Iterate (void) | 36 AttributeDefaultIterator::Iterate (void) |
36 { | 37 { |
37 for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) | 38 for (uint16_t i = 0; i < TypeId::GetRegisteredN (); i++) |
38 { | 39 { |
39 TypeId tid = TypeId::GetRegistered (i); | 40 TypeId tid = TypeId::GetRegistered (i); |
40 if (tid.MustHideFromDocumentation ()) | 41 if (tid.MustHideFromDocumentation ()) |
41 { | 42 { |
42 continue; | 43 continue; |
43 } | 44 } |
44 bool calledStart = false; | 45 bool calledStart = false; |
45 for (uint32_t j = 0; j < tid.GetAttributeN (); j++) | 46 for (uint32_t j = 0; j < tid.GetAttributeN (); j++) |
46 { | 47 { |
47 struct TypeId::AttributeInformation info = tid.GetAttribute (j); | 48 struct TypeId::AttributeInformation info = tid.GetAttribute (j); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 115 } |
115 | 116 |
116 void· | 117 void· |
117 AttributeDefaultIterator::DoVisitAttribute (std::string name, std::string defaul
tValue) | 118 AttributeDefaultIterator::DoVisitAttribute (std::string name, std::string defaul
tValue) |
118 { | 119 { |
119 } | 120 } |
120 | 121 |
121 void· | 122 void· |
122 AttributeDefaultIterator::VisitAttribute (TypeId tid, std::string name, std::str
ing defaultValue, uint32_t index) | 123 AttributeDefaultIterator::VisitAttribute (TypeId tid, std::string name, std::str
ing defaultValue, uint32_t index) |
123 { | 124 { |
| 125 NS_UNUSED(index); |
124 DoVisitAttribute (name, defaultValue); | 126 DoVisitAttribute (name, defaultValue); |
125 } | 127 } |
126 | 128 |
127 } // namespace ns3 | 129 } // namespace ns3 |
OLD | NEW |