SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
AIChangeMessage.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "IProtocolMessage.h"
7 
8 namespace ai {
9 
17 private:
18  const std::string _name;
19 
20 public:
21  explicit AIChangeMessage(const std::string& name) :
22  IProtocolMessage(PROTO_CHANGE), _name(name) {
23  }
24 
25  explicit AIChangeMessage(streamContainer& in) :
26  IProtocolMessage(PROTO_CHANGE), _name(readString(in)) {
27  }
28 
29  void serialize(streamContainer& out) const override {
30  addByte(out, _id);
31  addString(out, _name);
32  }
33 
34  inline const std::string& getName() const {
35  return _name;
36  }
37 };
38 
39 }
A protocol message is used for the serialization of the ai states for remote debugging.
Definition: IProtocolMessage.h:60
Message for the remote debugging interface.
Definition: AIChangeMessage.h:16