LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 10 matching lines...) Expand all Loading... |
21 #define OBJECT_BASE_H | 21 #define OBJECT_BASE_H |
22 | 22 |
23 #include "type-id.h" | 23 #include "type-id.h" |
24 #include "callback.h" | 24 #include "callback.h" |
25 #include <string> | 25 #include <string> |
26 #include <list> | 26 #include <list> |
27 | 27 |
28 #include "ns3/ns3-module.h" | 28 #include "ns3/ns3-module.h" |
29 #define NS3_MODULE NS3_CORE_MODULE | 29 #define NS3_MODULE NS3_CORE_MODULE |
30 #include "ns3/ns3-export.h" | 30 #include "ns3/ns3-export.h" |
| 31 |
31 | 32 |
32 /** | 33 /** |
33 * \file | 34 * \file |
34 * \ingroup object | 35 * \ingroup object |
35 * ns3::ObjectBase declaration and | 36 * ns3::ObjectBase declaration and |
36 * NS_OBJECT_ENSURE_REGISTERED() madro definition. | 37 * NS_OBJECT_ENSURE_REGISTERED() madro definition. |
37 */ | 38 */ |
38 | 39 |
39 /** | 40 /** |
40 * \ingroup object | 41 * \ingroup object |
(...skipping 20 matching lines...) Expand all Loading... |
61 * \ingroup object | 62 * \ingroup object |
62 * \brief Explicitly instantiate a template class and register the resulting | 63 * \brief Explicitly instantiate a template class and register the resulting |
63 * instance with the TypeId system. | 64 * instance with the TypeId system. |
64 * | 65 * |
65 * This macro should be invoked once for every required instance of a template | 66 * This macro should be invoked once for every required instance of a template |
66 * class which derives from the Object class and defines a new GetTypeId method. | 67 * class which derives from the Object class and defines a new GetTypeId method. |
67 * | 68 * |
68 * If the template class is in a namespace, then the macro call should also be | 69 * If the template class is in a namespace, then the macro call should also be |
69 * in the namespace. | 70 * in the namespace. |
70 */ | 71 */ |
71 #ifdef _WIN32 | 72 #ifdef _WIN32 |
72 #define NS_OBJECT_TEMPLATE_CLASS_DEFINE_LIB(type,param,lib) \ | 73 #define NS_OBJECT_TEMPLATE_CLASS_DEFINE_LIB(type,param,lib) \ |
73 template class lib type<param>; \ | 74 template class lib type<param>; \ |
74 template <> lib std::string DoGetTypeParamName<type<param> > () \ | 75 template <> lib std::string DoGetTypeParamName<type<param> > () \ |
75 { \ | 76 { \ |
76 return #param; \ | 77 return #param; \ |
77 } \ | 78 } \ |
78 static struct Object ## type ## param ## Registrationclass \ | 79 static struct Object ## type ## param ## Registrationclass \ |
79 { \ | 80 { \ |
80 Object ## type ## param ## Registrationclass () { \ | 81 Object ## type ## param ## Registrationclass () { \ |
81 ns3::TypeId tid = type<param>::GetTypeId (); \ | 82 ns3::TypeId tid = type<param>::GetTypeId (); \ |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 */ | 304 */ |
304 bool DoSet (Ptr<const AttributeAccessor> spec, | 305 bool DoSet (Ptr<const AttributeAccessor> spec, |
305 Ptr<const AttributeChecker> checker,· | 306 Ptr<const AttributeChecker> checker,· |
306 const AttributeValue &value); | 307 const AttributeValue &value); |
307 | 308 |
308 }; | 309 }; |
309 | 310 |
310 } // namespace ns3 | 311 } // namespace ns3 |
311 | 312 |
312 #endif /* OBJECT_BASE_H */ | 313 #endif /* OBJECT_BASE_H */ |
LEFT | RIGHT |