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) 2007 INRIA | 3 * Copyright (c) 2007 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 16 matching lines...) Expand all Loading... |
27 /** | 27 /** |
28 * \file | 28 * \file |
29 * \ingroup attribute_Vector | 29 * \ingroup attribute_Vector |
30 * ns3::Vector, ns3::Vector2D and ns3::Vector3D attribute value implementations. | 30 * ns3::Vector, ns3::Vector2D and ns3::Vector3D attribute value implementations. |
31 */ | 31 */ |
32 | 32 |
33 namespace ns3 { | 33 namespace ns3 { |
34 | 34 |
35 NS_LOG_COMPONENT_DEFINE ("Vector"); | 35 NS_LOG_COMPONENT_DEFINE ("Vector"); |
36 | 36 |
37 #ifdef _WIN32 | 37 ATTRIBUTE_HELPER_CPP_LIB (Vector3D, NS3_EXPORT); |
38 ATTRIBUTE_HELPER_CPP_LIB (Vector3D, NS3CORELIB); | 38 ATTRIBUTE_HELPER_CPP_LIB (Vector2D, NS3_EXPORT); |
39 ATTRIBUTE_HELPER_CPP_LIB (Vector2D, NS3CORELIB); | |
40 #else | |
41 ATTRIBUTE_HELPER_CPP (Vector3D); | |
42 ATTRIBUTE_HELPER_CPP (Vector2D); | |
43 #endif | |
44 | 39 |
45 // compatibility for mobility code | 40 // compatibility for mobility code |
46 Ptr<const AttributeChecker> MakeVectorChecker (void) | 41 Ptr<const AttributeChecker> MakeVectorChecker (void) |
47 { | 42 { |
48 NS_LOG_FUNCTION_NOARGS (); | 43 NS_LOG_FUNCTION_NOARGS (); |
49 return MakeVector3DChecker (); | 44 return MakeVector3DChecker (); |
50 } | 45 } |
51 | 46 |
52 | 47 |
53 Vector3D::Vector3D (double _x, double _y, double _z) | 48 Vector3D::Vector3D (double _x, double _y, double _z) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 { | 157 { |
163 return Vector2D (a.x + b.x, a.y + b.y); | 158 return Vector2D (a.x + b.x, a.y + b.y); |
164 } | 159 } |
165 Vector2D | 160 Vector2D |
166 operator - (const Vector2D &a, const Vector2D &b) | 161 operator - (const Vector2D &a, const Vector2D &b) |
167 { | 162 { |
168 return Vector2D (a.x - b.x, a.y - b.y); | 163 return Vector2D (a.x - b.x, a.y - b.y); |
169 } | 164 } |
170 | 165 |
171 } // namespace ns3 | 166 } // namespace ns3 |
LEFT | RIGHT |