SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
AIDeleteNodeMessage.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "IProtocolMessage.h"
7 #include "AIStubTypes.h"
8 
9 namespace ai {
10 
17 private:
18  int32_t _nodeId;
19  CharacterId _characterId;
20 
21 public:
22  AIDeleteNodeMessage(int32_t nodeId, CharacterId characterId) :
23  IProtocolMessage(PROTO_DELETENODE), _nodeId(nodeId), _characterId(characterId) {
24  }
25 
26  explicit AIDeleteNodeMessage(streamContainer& in) :
27  IProtocolMessage(PROTO_DELETENODE) {
28  _nodeId = readInt(in);
29  _characterId = readInt(in);
30  }
31 
32  void serialize(streamContainer& out) const override {
33  addByte(out, _id);
34  addInt(out, _nodeId);
35  addInt(out, _characterId);
36  }
37 
38  inline uint32_t getNodeId() const {
39  return _nodeId;
40  }
41 
42  inline CharacterId getCharacterId() const {
43  return _characterId;
44  }
45 };
46 
47 }
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: AIDeleteNodeMessage.h:16