SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
AIPauseMessage.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "IProtocolMessage.h"
7 
8 namespace ai {
9 
21 private:
22  bool _pause;
23 
24 public:
25  explicit AIPauseMessage(bool pause) :
26  IProtocolMessage(PROTO_PAUSE),_pause(pause) {
27  }
28 
29  explicit AIPauseMessage(streamContainer& in) :
30  IProtocolMessage(PROTO_PAUSE) {
31  _pause = readBool(in);
32  }
33 
34  void serialize(streamContainer& out) const override {
35  addByte(out, _id);
36  addBool(out, _pause);
37  }
38 
39  inline bool isPause() const {
40  return _pause;
41  }
42 };
43 
44 }
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: AIPauseMessage.h:20