move more code around
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 17 Mar 2008 05:42:20 +0100
changeset 2638 00bd5081ee68
parent 2637 ac94e4889027
child 2639 588221b7f892
move more code around
src/core/object.h
src/core/type-id.h
--- a/src/core/object.h	Mon Mar 17 05:22:29 2008 +0100
+++ b/src/core/object.h	Mon Mar 17 05:42:20 2008 +0100
@@ -25,16 +25,13 @@
 #include <string>
 #include <vector>
 #include "ptr.h"
-#include "callback.h"
 #include "attribute.h"
 #include "object-base.h"
-#include "attribute-helper.h"
 #include "attribute-list.h"
 
 
 namespace ns3 {
 
-class CallbackBase;
 class Object;
 class AttributeAccessor;
 class AttributeValue;
@@ -173,32 +170,6 @@
 namespace ns3 {
 
 /*************************************************************************
- *   The TypeId implementation which depends on templates
- *************************************************************************/
-
-template <typename T>
-TypeId 
-TypeId::SetParent (void)
-{
-  return SetParent (T::GetTypeId ());
-}
-
-template <typename T>
-TypeId 
-TypeId::AddConstructor (void)
-{
-  struct Maker {
-    static ObjectBase * Create () {
-      ObjectBase * base = new T ();
-      return base;
-    }
-  };
-  Callback<ObjectBase *> cb = MakeCallback (&Maker::Create);
-  DoAddConstructor (cb);
-  return *this;
-}
-
-/*************************************************************************
  *   The Object implementation which depends on templates
  *************************************************************************/
 
--- a/src/core/type-id.h	Mon Mar 17 05:22:29 2008 +0100
+++ b/src/core/type-id.h	Mon Mar 17 05:42:20 2008 +0100
@@ -289,4 +289,34 @@
 
 } // namespace ns3 
 
+namespace ns3 {
+
+/*************************************************************************
+ *   The TypeId implementation which depends on templates
+ *************************************************************************/
+
+template <typename T>
+TypeId 
+TypeId::SetParent (void)
+{
+  return SetParent (T::GetTypeId ());
+}
+
+template <typename T>
+TypeId 
+TypeId::AddConstructor (void)
+{
+  struct Maker {
+    static ObjectBase * Create () {
+      ObjectBase * base = new T ();
+      return base;
+    }
+  };
+  Callback<ObjectBase *> cb = MakeCallback (&Maker::Create);
+  DoAddConstructor (cb);
+  return *this;
+}
+
+} // namespace ns3
+
 #endif /* TYPE_ID_H */