244 std::ostringstream oss; |
244 std::ostringstream oss; |
245 if (m_xml) |
245 if (m_xml) |
246 { |
246 { |
247 Vector v = GetPosition (n); |
247 Vector v = GetPosition (n); |
248 oss << GetXMLOpenClose_node (0,n->GetId (),v.x,v.y); |
248 oss << GetXMLOpenClose_node (0,n->GetId (),v.x,v.y); |
|
249 WriteN (m_fHandle, oss.str ()); |
249 } |
250 } |
250 else |
251 else |
251 { |
252 { |
252 // Location exists, dump it |
253 // Location exists, dump it |
253 Vector v = GetPosition (n); |
254 Vector v = GetPosition (n); |
254 oss << "0.0 N " << n->GetId () |
255 oss << "0.0 N " << n->GetId () |
255 << " " << v.x << " " << v.y << std::endl; |
256 << " " << v.x << " " << v.y << std::endl; |
|
257 WriteN (m_fHandle, oss.str ().c_str (), oss.str ().length ()); |
256 } |
258 } |
257 |
|
258 WriteN (m_fHandle, oss.str ().c_str (), oss.str ().length ()); |
|
259 } |
259 } |
260 NS_LOG_INFO ("Setting p2p links"); |
260 NS_LOG_INFO ("Setting p2p links"); |
261 // Now dump the p2p links |
261 // Now dump the p2p links |
262 for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i) |
262 for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i) |
263 { |
263 { |