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) 2007 INESC Porto | 3 * Copyright (c) 2007 INESC Porto |
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 * Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> | 18 * Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
19 */ | 19 */ |
20 #ifndef EVENT_GARBAGE_COLLECTOR_H | 20 #ifndef EVENT_GARBAGE_COLLECTOR_H |
21 #define EVENT_GARBAGE_COLLECTOR_H | 21 #define EVENT_GARBAGE_COLLECTOR_H |
22 | 22 |
23 #include <set> | 23 #include <set> |
24 #include "ns3/event-id.h" | 24 #include "ns3/event-id.h" |
25 #include "ns3/simulator.h" | 25 #include "ns3/simulator.h" |
26 | 26 |
| 27 #include "ns3/ns3-module.h" |
| 28 #define NS3_MODULE NS3_CORE_MODULE |
| 29 #include "ns3/ns3-export.h" |
| 30 |
| 31 |
27 /** | 32 /** |
28 * \file | 33 * \file |
29 * \ingroup events | 34 * \ingroup events |
30 * \ingroup core-helpers | 35 * \ingroup core-helpers |
31 * ns3::EventGarbageCollector declaration. | 36 * ns3::EventGarbageCollector declaration. |
32 */ | 37 */ |
33 | 38 |
34 namespace ns3 { | 39 namespace ns3 { |
35 | 40 |
36 /** | 41 /** |
37 * \ingroup events | 42 * \ingroup events |
38 * \ingroup core-helpers | 43 * \ingroup core-helpers |
39 * | 44 * |
40 * \brief An object that tracks scheduled events and automatically | 45 * \brief An object that tracks scheduled events and automatically |
41 * cancels them when it is destroyed. It is useful in situations | 46 * cancels them when it is destroyed. It is useful in situations |
42 * where multiple instances of the same type of event can | 47 * where multiple instances of the same type of event can |
43 * simultaneously be scheduled, and when the events should be limited | 48 * simultaneously be scheduled, and when the events should be limited |
44 * to the lifetime of a container object. | 49 * to the lifetime of a container object. |
45 */ | 50 */ |
46 class EventGarbageCollector | 51 class NS3_EXPORT EventGarbageCollector |
47 { | 52 { |
48 public: | 53 public: |
49 | 54 |
50 EventGarbageCollector (); | 55 EventGarbageCollector (); |
51 | 56 |
52 /** | 57 /** |
53 * \brief Tracks a new event | 58 * \brief Tracks a new event |
54 * \param [in] event the Event to track | 59 * \param [in] event the Event to track |
55 */ | 60 */ |
56 void Track (EventId event); | 61 void Track (EventId event); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 * \brief Shrink the cleanup limit | 94 * \brief Shrink the cleanup limit |
90 * Reduce the cleanup size by factors of two until less than the | 95 * Reduce the cleanup size by factors of two until less than the |
91 * current event list, then Grow one step. | 96 * current event list, then Grow one step. |
92 */ | 97 */ |
93 void Shrink (); | 98 void Shrink (); |
94 }; | 99 }; |
95 | 100 |
96 } // namespace ns3 | 101 } // namespace ns3 |
97 | 102 |
98 #endif /* EVENT_GARBAGE_COLLECTOR_H */ | 103 #endif /* EVENT_GARBAGE_COLLECTOR_H */ |
LEFT | RIGHT |