View | Details | Raw Unified | Return to bug 2959
Collapse All | Expand All

(-)a/src/network/helper/node-container.cc (+13 lines)
 Lines 136-139   NodeContainer::GetGlobal (void) Link Here 
136
  return c;
136
  return c;
137
}
137
}
138
138
139
bool
140
NodeContainer::Contains (uint32_t index) const
141
{
142
  for (uint32_t i = 0; i < m_nodes.size (); i++)
143
    {
144
      if (m_nodes[i]->GetId () == index)
145
        {
146
          return true;
147
        }
148
    }
149
  return false;
150
}
151
139
} // namespace ns3
152
} // namespace ns3
(-)a/src/network/helper/node-container.h (+8 lines)
 Lines 288-293   public: Link Here 
288
   */
288
   */
289
  static NodeContainer GetGlobal (void);
289
  static NodeContainer GetGlobal (void);
290
290
291
  /**
292
   * \brief Return true if container contains a Node with index id
293
   *
294
   * \return whether the NodeContainer contains a node with index id
295
   * \param id Node Id
296
   */
297
  bool Contains (uint32_t id) const;
298
291
private:
299
private:
292
  std::vector<Ptr<Node> > m_nodes; //!< Nodes smart pointers
300
  std::vector<Ptr<Node> > m_nodes; //!< Nodes smart pointers
293
};
301
};

Return to bug 2959