Index: src/core/model/object-base.h |
=================================================================== |
--- a/src/core/model/object-base.h |
+++ b/src/core/model/object-base.h |
@@ -24,6 +24,7 @@ |
#include "callback.h" |
#include <string> |
#include <list> |
+#include "ns3dll.h" |
/** |
* \file |
@@ -64,6 +65,26 @@ |
* If the template class is in a namespace, then the macro call should also be |
* in the namespace. |
*/ |
+#ifdef _WIN32 |
+#define NS_OBJECT_TEMPLATE_CLASS_DEFINE_LIB(type,param,lib) \ |
+ template class lib type<param>; \ |
+ template <> lib std::string DoGetTypeParamName<type<param> > () \ |
+ { \ |
+ return #param; \ |
+ } \ |
+ static struct Object ## type ## param ## Registrationclass \ |
+ { \ |
+ Object ## type ## param ## Registrationclass () { \ |
+ ns3::TypeId tid = type<param>::GetTypeId (); \ |
+ tid.SetSize (sizeof (type<param>)); \ |
+ tid.GetParent (); \ |
+ } \ |
+ } Object ## type ## param ## RegistrationVariable |
+#else |
+#define NS_OBJECT_TEMPLATE_CLASS_DEFINE_LIB(type,param,lib) \ |
+ NS_OBJECT_TEMPLATE_CLASS_DEFINE(type,param) |
+#endif |
+ |
#define NS_OBJECT_TEMPLATE_CLASS_DEFINE(type,param) \ |
Peter Barnes
2018/04/17 00:04:13
Can't this be implemented as
#define NS_OBJECT_TE
ammo6818-vandals.uidaho.edu
2018/05/02 05:06:32
No, lines 70 and 71 are different.
|
template class type<param>; \ |
template <> std::string DoGetTypeParamName<type<param> > () \ |