SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
ResetHandler.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "IProtocolHandler.h"
7 #include "Server.h"
8 
9 namespace ai {
10 
12 private:
13  Server& _server;
14 public:
15  explicit ResetHandler(Server& server) : _server(server) {
16  }
17 
18  void execute(const ClientId& /*clientId*/, const IProtocolMessage& /*message*/) override {
19  _server.reset();
20  }
21 };
22 
23 }
A protocol message is used for the serialization of the ai states for remote debugging.
Definition: IProtocolMessage.h:60
Interface for the execution of assigned IProtocolMessage.
Definition: IProtocolHandler.h:19
void reset()
Resets the AI states.
Definition: ServerImpl.h:446
Definition: ResetHandler.h:11
The server can serialize the state of the AI and broadcast it to all connected clients.
Definition: Server.h:50