Remove PythonCompleteConstruct friend function, it is no longer needed
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 04 Aug 2011 17:50:15 +0100
changeset 7402 bc7a8279defe
parent 7401 20b1d370c035
child 7403 423566595b8a
Remove PythonCompleteConstruct friend function, it is no longer needed
src/core/bindings/module_helpers.cc
src/core/model/object.h
--- a/src/core/bindings/module_helpers.cc	Thu Aug 04 11:55:52 2011 +0100
+++ b/src/core/bindings/module_helpers.cc	Thu Aug 04 17:50:15 2011 +0100
@@ -2,16 +2,7 @@
 #include "ns3/ref-count-base.h"
 
 
-namespace ns3 {
-
-void PythonCompleteConstruct (Ptr<Object> object, TypeId typeId, const AttributeList &attributes)
-{
-  object->SetTypeId (typeId);
-  object->Object::Construct (attributes);
-}
-
-}
-
+namespace {
 
 
 class PythonEventImpl : public ns3::EventImpl
@@ -59,6 +50,8 @@
   }
 };
 
+} // closes: namespace {
+
 
 PyObject *
 _wrap_Simulator_Schedule (PyNs3Simulator *PYBINDGEN_UNUSED (dummy), PyObject *args, PyObject *kwargs,
--- a/src/core/model/object.h	Thu Aug 04 11:55:52 2011 +0100
+++ b/src/core/model/object.h	Thu Aug 04 17:50:15 2011 +0100
@@ -219,10 +219,6 @@
   friend Ptr<T> CopyObject (Ptr<T> object);
   template <typename T>
   friend Ptr<T> CopyObject (Ptr<const T> object);
-  // The following friend method declaration is used only
-  // by our python bindings to call the protected ObjectBase::Construct
-  // method.
-  friend void PythonCompleteConstruct (Ptr<Object> object, TypeId typeId, const AttributeConstructionList &attributes);
   template <typename T>
   friend Ptr<T> CompleteConstruct (T *object);