LEFT | RIGHT |
(no file at all) | |
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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> | 18 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
19 */ | 19 */ |
20 #ifndef GLOBAL_VALUE_H | 20 #ifndef GLOBAL_VALUE_H |
21 #define GLOBAL_VALUE_H | 21 #define GLOBAL_VALUE_H |
22 | 22 |
23 #include <string> | 23 #include <string> |
24 #include <vector> | 24 #include <vector> |
25 #include "ptr.h" | 25 #include "ptr.h" |
26 #include "attribute.h" | 26 #include "attribute.h" |
| 27 |
| 28 #include "ns3/ns3-module.h" |
| 29 #define NS3_MODULE NS3_CORE_MODULE |
| 30 #include "ns3/ns3-export.h" |
27 | 31 |
28 /** | 32 /** |
29 * \file | 33 * \file |
30 * \ingroup core | 34 * \ingroup core |
31 * ns3::GlobalValue declaration. | 35 * ns3::GlobalValue declaration. |
32 */ | 36 */ |
33 | 37 |
34 namespace ns3 { | 38 namespace ns3 { |
35 | 39 |
36 /* Forward declaration */ | 40 /* Forward declaration */ |
(...skipping 26 matching lines...) Expand all Loading... |
63 * GlobalValues can be set directly by calling GlobalValue::SetValue() | 67 * GlobalValues can be set directly by calling GlobalValue::SetValue() |
64 * but they can also be set through the \c NS_GLOBAL_VALUE environment variable. | 68 * but they can also be set through the \c NS_GLOBAL_VALUE environment variable. |
65 * For example, \c NS_GLOBAL_VALUE='Name=Value;OtherName=OtherValue;' would set | 69 * For example, \c NS_GLOBAL_VALUE='Name=Value;OtherName=OtherValue;' would set |
66 * global values \c Name and \c OtherName to \c Value and \c OtherValue, | 70 * global values \c Name and \c OtherName to \c Value and \c OtherValue, |
67 * respectively.· | 71 * respectively.· |
68 * | 72 * |
69 * Users of the CommandLine class also get the ability to set global· | 73 * Users of the CommandLine class also get the ability to set global· |
70 * values through command line arguments to their program: | 74 * values through command line arguments to their program: |
71 * \c --Name=Value will set global value \c Name to \c Value. | 75 * \c --Name=Value will set global value \c Name to \c Value. |
72 */ | 76 */ |
73 class GlobalValue | 77 class NS3_EXPORT GlobalValue |
74 { | 78 { |
75 /** Container type for holding all the GlobalValues. */ | 79 /** Container type for holding all the GlobalValues. */ |
76 typedef std::vector<GlobalValue *> Vector; | 80 typedef std::vector<GlobalValue *> Vector; |
77 ·· | 81 ·· |
78 public: | 82 public: |
79 /** Iterator type for the list of all global values. */ | 83 /** Iterator type for the list of all global values. */ |
80 typedef Vector::const_iterator Iterator; | 84 typedef Vector::const_iterator Iterator; |
81 | 85 |
82 /** | 86 /** |
83 * Constructor. | 87 * Constructor. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 Ptr<AttributeValue> m_initialValue; | 208 Ptr<AttributeValue> m_initialValue; |
205 /** The current value. */ | 209 /** The current value. */ |
206 Ptr<AttributeValue> m_currentValue; | 210 Ptr<AttributeValue> m_currentValue; |
207 /** The AttributeChecker for this GlobalValue. */ | 211 /** The AttributeChecker for this GlobalValue. */ |
208 Ptr<const AttributeChecker> m_checker; | 212 Ptr<const AttributeChecker> m_checker; |
209 }; | 213 }; |
210 | 214 |
211 } // namespace ns3 | 215 } // namespace ns3 |
212 | 216 |
213 #endif /* GLOBAL_VALUE_H */ | 217 #endif /* GLOBAL_VALUE_H */ |
LEFT | RIGHT |