src/node/node.cc
changeset 3516 dacc57c5d31f
parent 3514 308a7d84b18f
child 3548 e5ab96db540e
equal deleted inserted replaced
3515:88e9cee20461 3516:dacc57c5d31f
   134 uint32_t 
   134 uint32_t 
   135 Node::GetNApplications (void) const
   135 Node::GetNApplications (void) const
   136 {
   136 {
   137   return m_applications.size ();
   137   return m_applications.size ();
   138 }
   138 }
   139 Ptr<Application>
       
   140 Node::GetFirstApplication(TypeId tid)
       
   141 {
       
   142   for (std::vector<Ptr<Application> >::iterator i = m_applications.begin ();
       
   143        i != m_applications.end (); i++) {
       
   144     Ptr<Application> app = *i;
       
   145     if (app->GetInstanceTypeId() == tid)
       
   146       return app;
       
   147   }
       
   148 
       
   149   return 0;
       
   150 }
       
   151 
   139 
   152 void 
   140 void 
   153 Node::DoDispose()
   141 Node::DoDispose()
   154 {
   142 {
   155   for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin ();
   143   for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin ();