|
|
| 30 |
namespace ns3 { |
30 |
namespace ns3 { |
| 31 |
|
31 |
|
| 32 |
|
32 |
|
| 33 |
AttributeIterator::AttributeIterator () |
33 |
AttributeIterator::AttributeIterator () |
| 34 |
{ |
34 |
{ |
| 35 |
} |
35 |
} |
| 36 |
|
36 |
|
| 37 |
AttributeIterator::~AttributeIterator () |
37 |
AttributeIterator::~AttributeIterator () |
| 38 |
{ |
38 |
{ |
| 39 |
} |
39 |
} |
| 40 |
|
40 |
|
| 41 |
void |
41 |
void |
| 42 |
AttributeIterator::Iterate (void) |
42 |
AttributeIterator::Iterate (void) |
| 43 |
{ |
43 |
{ |
| 44 |
for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i) |
44 |
for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i) |
| 45 |
{ |
45 |
{ |
| 46 |
Ptr<Object> object = Config::GetRootNamespaceObject (i); |
46 |
Ptr<Object> object = Config::GetRootNamespaceObject (i); |
| 47 |
StartVisitObject (object); |
47 |
StartVisitObject (object); |
| 48 |
DoIterate (object); |
48 |
DoIterate (object); |
| 49 |
EndVisitObject (); |
49 |
EndVisitObject (); |
| 50 |
} |
50 |
} |
| 51 |
NS_ASSERT (m_currentPath.empty ()); |
51 |
NS_ASSERT (m_currentPath.empty ()); |
| 52 |
NS_ASSERT (m_examined.empty ()); |
52 |
NS_ASSERT (m_examined.empty ()); |
| 53 |
} |
53 |
} |
| 54 |
|
54 |
|
| 55 |
bool |
55 |
bool |
| 56 |
AttributeIterator::IsExamined (Ptr<const Object> object) |
56 |
AttributeIterator::IsExamined (Ptr<const Object> object) |
| 57 |
{ |
57 |
{ |
| 58 |
for (uint32_t i = 0; i < m_examined.size (); ++i) |
58 |
for (uint32_t i = 0; i < m_examined.size (); ++i) |
| 59 |
{ |
59 |
{ |
| 60 |
if (object == m_examined[i]) |
60 |
if (object == m_examined[i]) |
| 61 |
{ |
61 |
{ |
| 62 |
return true; |
62 |
return true; |
| 63 |
} |
63 |
} |
| 64 |
} |
64 |
} |
| 65 |
return false; |
65 |
return false; |
| 66 |
} |
66 |
} |
| 67 |
|
67 |
|
| 68 |
|
68 |
|
| 69 |
std::string |
69 |
std::string |
| 70 |
AttributeIterator::GetCurrentPath (std::string attr) const |
70 |
AttributeIterator::GetCurrentPath (std::string attr) const |
| 71 |
{ |
71 |
{ |
| 72 |
std::ostringstream oss; |
72 |
std::ostringstream oss; |
| 73 |
for (uint32_t i = 0; i < m_currentPath.size (); ++i) |
73 |
for (uint32_t i = 0; i < m_currentPath.size (); ++i) |
| 74 |
{ |
74 |
{ |
| 75 |
oss << "/" << m_currentPath[i]; |
75 |
oss << "/" << m_currentPath[i]; |
| 76 |
} |
76 |
} |
| 77 |
if (attr != "") |
77 |
if (attr != "") |
| 78 |
{ |
78 |
{ |
| 79 |
oss << "/" << attr; |
79 |
oss << "/" << attr; |
| 80 |
} |
80 |
} |
| 81 |
return oss.str (); |
81 |
return oss.str (); |
| 82 |
} |
82 |
} |
| 83 |
|
83 |
|
| 84 |
std::string |
84 |
std::string |
| 85 |
AttributeIterator::GetCurrentPath (void) const |
85 |
AttributeIterator::GetCurrentPath (void) const |
| 86 |
{ |
86 |
{ |
| 87 |
std::ostringstream oss; |
87 |
std::ostringstream oss; |
| 88 |
for (uint32_t i = 0; i < m_currentPath.size (); ++i) |
88 |
for (uint32_t i = 0; i < m_currentPath.size (); ++i) |
| 89 |
{ |
89 |
{ |
| 90 |
oss << "/" << m_currentPath[i]; |
90 |
oss << "/" << m_currentPath[i]; |
| 91 |
} |
91 |
} |
| 92 |
return oss.str (); |
92 |
return oss.str (); |
| 93 |
} |
93 |
} |
| 94 |
|
94 |
|
| 95 |
void |
95 |
void |
| 96 |
AttributeIterator::DoStartVisitObject (Ptr<Object> object) |
96 |
AttributeIterator::DoStartVisitObject (Ptr<Object> object) |
| 97 |
{ |
97 |
{ |
| 98 |
} |
98 |
} |
| 99 |
void |
99 |
void |
| 100 |
AttributeIterator::DoEndVisitObject (void) |
100 |
AttributeIterator::DoEndVisitObject (void) |
| 101 |
{ |
101 |
{ |
| 102 |
} |
102 |
} |
| 103 |
void |
103 |
void |
| 104 |
AttributeIterator::DoStartVisitPointerAttribute (Ptr<Object> object, std::string name, Ptr<Object> item) |
104 |
AttributeIterator::DoStartVisitPointerAttribute (Ptr<Object> object, std::string name, Ptr<Object> item) |
| 105 |
{ |
105 |
{ |
| 106 |
} |
106 |
} |
| 107 |
void |
107 |
void |
| 108 |
AttributeIterator::DoEndVisitPointerAttribute (void) |
108 |
AttributeIterator::DoEndVisitPointerAttribute (void) |
| 109 |
{ |
109 |
{ |
| 110 |
} |
110 |
} |
| 111 |
void |
111 |
void |
| 112 |
AttributeIterator::DoStartVisitArrayAttribute (Ptr<Object> object, std::string name, const ObjectPtrContainerValue &vector) |
112 |
AttributeIterator::DoStartVisitArrayAttribute (Ptr<Object> object, |
| 113 |
{ |
113 |
std::string name, const ObjectPtrVectorValue &vector) |
| 114 |
} |
114 |
{ |
| 115 |
void |
115 |
} |
| 116 |
AttributeIterator::DoEndVisitArrayAttribute (void) |
116 |
void |
| 117 |
{ |
117 |
AttributeIterator::DoEndVisitArrayAttribute (void) |
| 118 |
} |
118 |
{ |
| 119 |
void |
119 |
} |
| 120 |
AttributeIterator::DoStartVisitArrayItem (const ObjectPtrContainerValue &vector, uint32_t index, Ptr<Object> item) |
120 |
void |
| 121 |
{ |
121 |
AttributeIterator::DoStartVisitArrayItem (const ObjectPtrVectorValue &vector, |
| 122 |
} |
122 |
uint32_t index, Ptr<Object> item) |
| 123 |
void |
123 |
{ |
| 124 |
AttributeIterator::DoEndVisitArrayItem (void) |
124 |
} |
| 125 |
{ |
125 |
void |
| 126 |
} |
126 |
AttributeIterator::DoEndVisitArrayItem (void) |
|
|
127 |
{ |
| 128 |
} |
| 127 |
|
129 |
|
| 128 |
void |
130 |
void |
| 129 |
AttributeIterator::VisitAttribute (Ptr<Object> object, std::string name) |
131 |
AttributeIterator::DoStartVisitMapAttribute (Ptr<Object> object, |
| 130 |
{ |
132 |
std::string name, const ObjectPtrMapValue &map) |
| 131 |
m_currentPath.push_back (name); |
133 |
{ |
| 132 |
DoVisitAttribute (object, name); |
|
|
| 133 |
m_currentPath.pop_back (); |
| 134 |
} |
| 135 |
|
134 |
|
| 136 |
void |
135 |
} |
| 137 |
AttributeIterator::StartVisitObject (Ptr<Object> object) |
136 |
void |
| 138 |
{ |
137 |
AttributeIterator::DoEndVisitMapAttribute (void) |
| 139 |
m_currentPath.push_back ("$" + object->GetInstanceTypeId ().GetName ()); |
138 |
{ |
| 140 |
DoStartVisitObject (object); |
|
|
| 141 |
} |
| 142 |
void |
| 143 |
AttributeIterator::EndVisitObject (void) |
| 144 |
{ |
| 145 |
m_currentPath.pop_back (); |
| 146 |
DoEndVisitObject (); |
| 147 |
} |
| 148 |
void |
| 149 |
AttributeIterator::StartVisitPointerAttribute (Ptr<Object> object, std::string name, Ptr<Object> value) |
| 150 |
{ |
| 151 |
m_currentPath.push_back (name); |
| 152 |
m_currentPath.push_back ("$" + value->GetInstanceTypeId ().GetName ()); |
| 153 |
DoStartVisitPointerAttribute (object, name, value); |
| 154 |
} |
| 155 |
void |
| 156 |
AttributeIterator::EndVisitPointerAttribute (void) |
| 157 |
{ |
| 158 |
m_currentPath.pop_back (); |
| 159 |
m_currentPath.pop_back (); |
| 160 |
DoEndVisitPointerAttribute (); |
| 161 |
} |
| 162 |
void |
| 163 |
AttributeIterator::StartVisitArrayAttribute (Ptr<Object> object, std::string name, const ObjectPtrContainerValue &vector) |
| 164 |
{ |
| 165 |
m_currentPath.push_back (name); |
| 166 |
DoStartVisitArrayAttribute (object, name, vector); |
| 167 |
} |
| 168 |
void |
| 169 |
AttributeIterator::EndVisitArrayAttribute (void) |
| 170 |
{ |
| 171 |
m_currentPath.pop_back (); |
| 172 |
DoEndVisitArrayAttribute (); |
| 173 |
} |
| 174 |
|
139 |
|
| 175 |
void |
140 |
} |
| 176 |
AttributeIterator::StartVisitArrayItem (const ObjectPtrContainerValue &vector, uint32_t index, Ptr<Object> item) |
|
|
| 177 |
{ |
| 178 |
std::ostringstream oss; |
| 179 |
oss << index; |
| 180 |
m_currentPath.push_back (oss.str ()); |
| 181 |
m_currentPath.push_back ("$" + item->GetInstanceTypeId ().GetName ()); |
| 182 |
DoStartVisitArrayItem (vector, index, item); |
| 183 |
} |
| 184 |
void |
| 185 |
AttributeIterator::EndVisitArrayItem (void) |
| 186 |
{ |
| 187 |
m_currentPath.pop_back (); |
| 188 |
m_currentPath.pop_back (); |
| 189 |
DoEndVisitArrayItem (); |
| 190 |
} |
| 191 |
|
141 |
|
|
|
142 |
void |
| 143 |
AttributeIterator::DoStartVisitMapItem (const ObjectPtrMapValue &vector, |
| 144 |
uint32_t index, Ptr<Object> item) |
| 145 |
{ |
| 192 |
|
146 |
|
| 193 |
void |
147 |
} |
| 194 |
AttributeIterator::DoIterate (Ptr<Object> object) |
|
|
| 195 |
{ |
| 196 |
if (IsExamined (object)) |
| 197 |
{ |
| 198 |
return; |
| 199 |
} |
| 200 |
TypeId tid; |
| 201 |
for (tid = object->GetInstanceTypeId (); tid.HasParent (); tid = tid.GetParent ()) |
| 202 |
{ |
| 203 |
NS_LOG_DEBUG ("store " << tid.GetName ()); |
| 204 |
for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) |
| 205 |
{ |
| 206 |
struct TypeId::AttributeInformation info = tid.GetAttribute(i); |
| 207 |
const PointerChecker *ptrChecker = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker)); |
| 208 |
if (ptrChecker != 0) |
| 209 |
{ |
| 210 |
NS_LOG_DEBUG ("pointer attribute " << info.name); |
| 211 |
PointerValue ptr; |
| 212 |
object->GetAttribute (info.name, ptr); |
| 213 |
Ptr<Object> tmp = ptr.Get<Object> (); |
| 214 |
if (tmp != 0) |
| 215 |
{ |
| 216 |
StartVisitPointerAttribute (object, info.name, |
| 217 |
tmp); |
| 218 |
m_examined.push_back (object); |
| 219 |
DoIterate (tmp); |
| 220 |
m_examined.pop_back (); |
| 221 |
EndVisitPointerAttribute (); |
| 222 |
} |
| 223 |
continue; |
| 224 |
} |
| 225 |
// attempt to cast to an object vector. |
| 226 |
const ObjectPtrContainerChecker *vectorChecker = dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker)); |
| 227 |
if (vectorChecker != 0) |
| 228 |
{ |
| 229 |
NS_LOG_DEBUG ("vector attribute " << info.name); |
| 230 |
ObjectPtrContainerValue vector; |
| 231 |
object->GetAttribute (info.name, vector); |
| 232 |
StartVisitArrayAttribute (object, info.name, vector); |
| 233 |
for (uint32_t j = 0; j < vector.GetN (); ++j) |
| 234 |
{ |
| 235 |
NS_LOG_DEBUG ("vector attribute item " << j); |
| 236 |
Ptr<Object> tmp = vector.Get (j); |
| 237 |
StartVisitArrayItem (vector, j, tmp); |
| 238 |
m_examined.push_back (object); |
| 239 |
DoIterate (tmp); |
| 240 |
m_examined.pop_back (); |
| 241 |
EndVisitArrayItem (); |
| 242 |
} |
| 243 |
EndVisitArrayAttribute (); |
| 244 |
continue; |
| 245 |
} |
| 246 |
if ((info.flags & TypeId::ATTR_GET) && info.accessor->HasGetter () && |
| 247 |
(info.flags & TypeId::ATTR_SET) && info.accessor->HasSetter ()) |
| 248 |
{ |
| 249 |
VisitAttribute (object, info.name); |
| 250 |
} |
| 251 |
else |
| 252 |
{ |
| 253 |
NS_LOG_DEBUG ("could not store " << info.name); |
| 254 |
} |
| 255 |
} |
| 256 |
} |
| 257 |
Object::AggregateIterator iter = object->GetAggregateIterator (); |
| 258 |
bool recursiveAggregate = false; |
| 259 |
while (iter.HasNext ()) |
| 260 |
{ |
| 261 |
Ptr<const Object> tmp = iter.Next (); |
| 262 |
if (IsExamined (tmp)) |
| 263 |
{ |
| 264 |
recursiveAggregate = true; |
| 265 |
} |
| 266 |
} |
| 267 |
if (!recursiveAggregate) |
| 268 |
{ |
| 269 |
iter = object->GetAggregateIterator (); |
| 270 |
while (iter.HasNext ()) |
| 271 |
{ |
| 272 |
Ptr<Object> tmp = const_cast<Object *> (PeekPointer (iter.Next ())); |
| 273 |
StartVisitObject (tmp); |
| 274 |
m_examined.push_back (object); |
| 275 |
DoIterate (tmp); |
| 276 |
m_examined.pop_back (); |
| 277 |
EndVisitObject (); |
| 278 |
} |
| 279 |
} |
| 280 |
} |
| 281 |
|
148 |
|
|
|
149 |
void |
| 150 |
AttributeIterator::DoEndVisitMapItem (void) |
| 151 |
{ |
| 282 |
|
152 |
|
| 283 |
} // namespace ns3 |
153 |
} |
|
|
154 |
|
| 155 |
void |
| 156 |
AttributeIterator::VisitAttribute (Ptr<Object> object, std::string name) |
| 157 |
{ |
| 158 |
m_currentPath.push_back (name); |
| 159 |
DoVisitAttribute (object, name); |
| 160 |
m_currentPath.pop_back (); |
| 161 |
} |
| 162 |
|
| 163 |
void |
| 164 |
AttributeIterator::StartVisitObject (Ptr<Object> object) |
| 165 |
{ |
| 166 |
m_currentPath.push_back ("$" + object->GetInstanceTypeId ().GetName ()); |
| 167 |
DoStartVisitObject (object); |
| 168 |
} |
| 169 |
void |
| 170 |
AttributeIterator::EndVisitObject (void) |
| 171 |
{ |
| 172 |
m_currentPath.pop_back (); |
| 173 |
DoEndVisitObject (); |
| 174 |
} |
| 175 |
void |
| 176 |
AttributeIterator::StartVisitPointerAttribute (Ptr<Object> object, std::string name, Ptr<Object> value) |
| 177 |
{ |
| 178 |
m_currentPath.push_back (name); |
| 179 |
m_currentPath.push_back ("$" + value->GetInstanceTypeId ().GetName ()); |
| 180 |
DoStartVisitPointerAttribute (object, name, value); |
| 181 |
} |
| 182 |
void |
| 183 |
AttributeIterator::EndVisitPointerAttribute (void) |
| 184 |
{ |
| 185 |
m_currentPath.pop_back (); |
| 186 |
m_currentPath.pop_back (); |
| 187 |
DoEndVisitPointerAttribute (); |
| 188 |
} |
| 189 |
void |
| 190 |
AttributeIterator::StartVisitArrayAttribute (Ptr<Object> object, |
| 191 |
std::string name, const ObjectPtrVectorValue &vector) |
| 192 |
{ |
| 193 |
m_currentPath.push_back (name); |
| 194 |
DoStartVisitArrayAttribute (object, name, vector); |
| 195 |
} |
| 196 |
void |
| 197 |
AttributeIterator::EndVisitArrayAttribute (void) |
| 198 |
{ |
| 199 |
m_currentPath.pop_back (); |
| 200 |
DoEndVisitArrayAttribute (); |
| 201 |
} |
| 202 |
|
| 203 |
void |
| 204 |
AttributeIterator::StartVisitArrayItem (const ObjectPtrVectorValue &vector, |
| 205 |
uint32_t index, Ptr<Object> item) |
| 206 |
{ |
| 207 |
std::ostringstream oss; |
| 208 |
oss << index; |
| 209 |
m_currentPath.push_back (oss.str ()); |
| 210 |
m_currentPath.push_back ("$" + item->GetInstanceTypeId ().GetName ()); |
| 211 |
DoStartVisitArrayItem (vector, index, item); |
| 212 |
} |
| 213 |
void |
| 214 |
AttributeIterator::EndVisitArrayItem (void) |
| 215 |
{ |
| 216 |
m_currentPath.pop_back (); |
| 217 |
m_currentPath.pop_back (); |
| 218 |
DoEndVisitArrayItem (); |
| 219 |
} |
| 220 |
|
| 221 |
void |
| 222 |
AttributeIterator::StartVisitMapAttribute (Ptr<Object> object, |
| 223 |
std::string name, const ObjectPtrMapValue &map) |
| 224 |
{ |
| 225 |
m_currentPath.push_back (name); |
| 226 |
DoStartVisitMapAttribute (object, name, map); |
| 227 |
NS_LOG_INFO (this << GetCurrentPath ()); |
| 228 |
} |
| 229 |
|
| 230 |
void |
| 231 |
AttributeIterator::EndVisitMapAttribute (void) |
| 232 |
{ |
| 233 |
m_currentPath.pop_back (); |
| 234 |
DoEndVisitMapAttribute (); |
| 235 |
} |
| 236 |
|
| 237 |
void |
| 238 |
AttributeIterator::StartVisitMapItem (const ObjectPtrMapValue &map, |
| 239 |
uint32_t index, Ptr<Object> item) |
| 240 |
{ |
| 241 |
std::ostringstream oss; |
| 242 |
oss << index; |
| 243 |
m_currentPath.push_back (oss.str ()); |
| 244 |
m_currentPath.push_back ("$" + item->GetInstanceTypeId ().GetName ()); |
| 245 |
DoStartVisitMapItem (map, index, item); |
| 246 |
NS_LOG_INFO (this << GetCurrentPath ()); |
| 247 |
} |
| 248 |
|
| 249 |
void |
| 250 |
AttributeIterator::EndVisitMapItem (void) |
| 251 |
{ |
| 252 |
m_currentPath.pop_back (); |
| 253 |
m_currentPath.pop_back (); |
| 254 |
DoEndVisitMapItem (); |
| 255 |
} |
| 256 |
|
| 257 |
void |
| 258 |
AttributeIterator::DoIterate (Ptr<Object> object) |
| 259 |
{ |
| 260 |
if (IsExamined (object)) |
| 261 |
{ |
| 262 |
return; |
| 263 |
} |
| 264 |
TypeId tid; |
| 265 |
for (tid = object->GetInstanceTypeId (); tid.HasParent (); tid |
| 266 |
= tid.GetParent ()) |
| 267 |
{ |
| 268 |
NS_LOG_DEBUG ("store " << tid.GetName ()); |
| 269 |
for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) |
| 270 |
{ |
| 271 |
struct TypeId::AttributeInformation info = tid.GetAttribute (i); |
| 272 |
const PointerChecker *ptrChecker = |
| 273 |
dynamic_cast<const PointerChecker *> (PeekPointer (info.checker)); |
| 274 |
if (ptrChecker != 0) |
| 275 |
{ |
| 276 |
NS_LOG_DEBUG ("pointer attribute " << info.name); |
| 277 |
PointerValue ptr; |
| 278 |
object->GetAttribute (info.name, ptr); |
| 279 |
Ptr < Object > tmp = ptr.Get<Object> (); |
| 280 |
if (tmp != 0) |
| 281 |
{ |
| 282 |
StartVisitPointerAttribute (object, info.name, tmp); |
| 283 |
m_examined.push_back (object); |
| 284 |
DoIterate ( tmp); |
| 285 |
m_examined.pop_back (); |
| 286 |
EndVisitPointerAttribute (); |
| 287 |
} |
| 288 |
continue; |
| 289 |
} |
| 290 |
// attempt to cast to an object vector. |
| 291 |
const ObjectPtrVectorChecker *vectorChecker =dynamic_cast<const ObjectPtrVectorChecker *> (PeekPointer ( |
| 292 |
info.checker)); |
| 293 |
if (vectorChecker != 0) |
| 294 |
{ |
| 295 |
NS_LOG_DEBUG ("vector attribute " << info.name); |
| 296 |
ObjectPtrVectorValue vector; |
| 297 |
object->GetAttribute (info.name, vector); |
| 298 |
StartVisitArrayAttribute (object, info.name, vector); |
| 299 |
for (uint32_t j = 0; j < vector.GetN (); ++j) |
| 300 |
{ |
| 301 |
NS_LOG_DEBUG ("vector attribute item " << j); |
| 302 |
Ptr < Object > tmp = vector.Get (j); |
| 303 |
StartVisitArrayItem (vector, j, tmp); |
| 304 |
m_examined.push_back (object); |
| 305 |
DoIterate ( tmp); |
| 306 |
m_examined.pop_back (); |
| 307 |
EndVisitArrayItem (); |
| 308 |
} |
| 309 |
EndVisitArrayAttribute (); |
| 310 |
continue; |
| 311 |
} |
| 312 |
// attempt to cast to an object map. |
| 313 |
const ObjectPtrMapChecker *mapChecker = dynamic_cast<const ObjectPtrMapChecker *> (PeekPointer (info.checker)); |
| 314 |
if (mapChecker != 0) |
| 315 |
{ |
| 316 |
ObjectPtrMapValue map; |
| 317 |
object->GetAttribute (info.name, map); |
| 318 |
StartVisitMapAttribute (object, info.name, map); |
| 319 |
for (ObjectPtrMapValue::Iterator it = map.Begin (); it != map.End (); it++) |
| 320 |
{ |
| 321 |
NS_LOG_DEBUG ("map attribute index " << (*it).first << " item " << (*it).second); |
| 322 |
StartVisitMapItem (map, (*it).first, (*it).second); |
| 323 |
m_examined.push_back (object); |
| 324 |
DoIterate ((*it).second); |
| 325 |
m_examined.pop_back (); |
| 326 |
EndVisitMapItem (); |
| 327 |
} |
| 328 |
EndVisitMapAttribute (); |
| 329 |
continue; |
| 330 |
} |
| 331 |
if ((info.flags & TypeId::ATTR_GET) && info.accessor->HasGetter () |
| 332 |
&& (info.flags & TypeId::ATTR_SET) && info.accessor->HasSetter ()) |
| 333 |
{ |
| 334 |
VisitAttribute (object, info.name); |
| 335 |
} |
| 336 |
else |
| 337 |
{ |
| 338 |
NS_LOG_DEBUG ("could not store " << info.name); |
| 339 |
} |
| 340 |
} |
| 341 |
Object::AggregateIterator iter = object->GetAggregateIterator (); |
| 342 |
bool recursiveAggregate = false; |
| 343 |
while (iter.HasNext ()) |
| 344 |
{ |
| 345 |
Ptr<const Object> tmp = iter.Next (); |
| 346 |
if (IsExamined (tmp)) |
| 347 |
{ |
| 348 |
recursiveAggregate = true; |
| 349 |
} |
| 350 |
} |
| 351 |
if (!recursiveAggregate) |
| 352 |
{ |
| 353 |
iter = object->GetAggregateIterator (); |
| 354 |
while (iter.HasNext ()) |
| 355 |
{ |
| 356 |
Ptr<Object> tmp = const_cast<Object *> (PeekPointer (iter.Next ())); |
| 357 |
StartVisitObject (tmp); |
| 358 |
m_examined.push_back (object); |
| 359 |
DoIterate (tmp); |
| 360 |
m_examined.pop_back (); |
| 361 |
EndVisitObject (); |
| 362 |
} |
| 363 |
} |
| 364 |
} |
| 365 |
|
| 366 |
|
| 367 |
} // namespace ns3 |