OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_ |
6 #define NET_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_ | 6 #define NET_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/quic/core/quic_clock.h" | 10 #include "net/quic/core/quic_clock.h" |
11 #include "net/quic/core/quic_time.h" | 11 #include "net/quic/core/quic_time.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 namespace simulator { | 14 namespace simulator { |
15 | 15 |
16 class Simulator; | 16 class Simulator; |
17 struct ScheduledActor; | |
18 | 17 |
19 // Actor is the base class for all participants of the simulation which can | 18 // Actor is the base class for all participants of the simulation which can |
20 // schedule events to be triggered at the specified time. Every actor has a | 19 // schedule events to be triggered at the specified time. Every actor has a |
21 // name assigned to it, which can be used for debugging and addressing purposes. | 20 // name assigned to it, which can be used for debugging and addressing purposes. |
22 // | 21 // |
23 // The Actor object is scheduled as follows: | 22 // The Actor object is scheduled as follows: |
24 // 1. Every Actor object appears at most once in the event queue, for one | 23 // 1. Every Actor object appears at most once in the event queue, for one |
25 // specific time. | 24 // specific time. |
26 // 2. Actor is scheduled by calling Schedule() method. | 25 // 2. Actor is scheduled by calling Schedule() method. |
27 // 3. If Schedule() method is called with multiple different times specified, | 26 // 3. If Schedule() method is called with multiple different times specified, |
(...skipping 30 matching lines...) Expand all Loading... |
58 Actor(Actor&&) = delete; | 57 Actor(Actor&&) = delete; |
59 Actor& operator=(Actor&&) = delete; | 58 Actor& operator=(Actor&&) = delete; |
60 | 59 |
61 DISALLOW_COPY_AND_ASSIGN(Actor); | 60 DISALLOW_COPY_AND_ASSIGN(Actor); |
62 }; | 61 }; |
63 | 62 |
64 } // namespace simulator | 63 } // namespace simulator |
65 } // namespace net | 64 } // namespace net |
66 | 65 |
67 #endif // NET_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_ | 66 #endif // NET_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_ |
OLD | NEW |