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

(-)a/src/core/component-manager.h (-3 / +3 lines)
 Lines 227-233   ComponentManager::Create (ClassId classI Link Here 
227
ComponentManager::Create (ClassId classId, InterfaceId iid)
227
ComponentManager::Create (ClassId classId, InterfaceId iid)
228
{
228
{
229
  Ptr<Interface> obj = Create (classId);
229
  Ptr<Interface> obj = Create (classId);
230
  Ptr<T> i = obj->QueryInterface<T> (iid);
230
  Ptr<T> i = obj->QueryInterface (iid, (T *) 0);
231
  return i;
231
  return i;
232
}
232
}
233
233
 Lines 236-242   ComponentManager::Create (ClassId classI Link Here 
236
ComponentManager::Create (ClassId classId, InterfaceId iid, T1 a1)
236
ComponentManager::Create (ClassId classId, InterfaceId iid, T1 a1)
237
{
237
{
238
  Ptr<Interface> obj = Create (classId, a1);
238
  Ptr<Interface> obj = Create (classId, a1);
239
  Ptr<T> i = obj->QueryInterface<T> (iid);
239
  Ptr<T> i = obj->QueryInterface (iid, (T *) 0);
240
  return i;
240
  return i;
241
}
241
}
242
242
 Lines 245-251   ComponentManager::Create (ClassId classI Link Here 
245
ComponentManager::Create (ClassId classId, InterfaceId iid, T1 a1, T2 a2)
245
ComponentManager::Create (ClassId classId, InterfaceId iid, T1 a1, T2 a2)
246
{
246
{
247
  Ptr<Interface> obj = Create (classId, a1, a2);
247
  Ptr<Interface> obj = Create (classId, a1, a2);
248
  Ptr<T> i = obj->QueryInterface<T> (iid);
248
  Ptr<T> i = obj->QueryInterface (iid, (T *) 0);
249
  return i;
249
  return i;
250
}
250
}
251
251
(-)a/src/core/interface.h (-2 / +2 lines)
 Lines 58-64   public: Link Here 
58
   * \param iid the Interface id of the requested interface
58
   * \param iid the Interface id of the requested interface
59
   */
59
   */
60
  template <typename T>
60
  template <typename T>
61
  Ptr<T> QueryInterface (InterfaceId iid) const;
61
  Ptr<T> QueryInterface (InterfaceId iid, T *dummy = (T *) 0) const;
62
62
63
  /**
63
  /**
64
   * \param interface another interface
64
   * \param interface another interface
 Lines 114-120   namespace ns3 { Link Here 
114
114
115
template <typename T>
115
template <typename T>
116
Ptr<T>
116
Ptr<T>
117
Interface::QueryInterface (InterfaceId iid) const
117
Interface::QueryInterface (InterfaceId iid, T *dummy) const
118
{
118
{
119
  Ptr<Interface> found = DoQueryInterface (iid);
119
  Ptr<Interface> found = DoQueryInterface (iid);
120
  if (found != 0)
120
  if (found != 0)

Return to bug 26