WPILibC++  unspecified
IDispatcher.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef NTCORE_IDISPATCHER_H_
9 #define NTCORE_IDISPATCHER_H_
10 
11 #include <memory>
12 
13 #include "Message.h"
14 
15 namespace nt {
16 
17 class INetworkConnection;
18 
19 // Interface for generation of outgoing messages to break a dependency loop
20 // between Storage and Dispatcher.
21 class IDispatcher {
22  public:
23  IDispatcher() = default;
24  IDispatcher(const IDispatcher&) = delete;
25  IDispatcher& operator=(const IDispatcher&) = delete;
26  virtual ~IDispatcher() = default;
27  virtual void QueueOutgoing(std::shared_ptr<Message> msg,
28  INetworkConnection* only,
29  INetworkConnection* except) = 0;
30 };
31 
32 } // namespace nt
33 
34 #endif // NTCORE_IDISPATCHER_H_
Definition: IStorage.h:21
Definition: IDispatcher.h:21
Definition: INetworkConnection.h:18