Files
Tower-Defense2/include/td/protocol/command/CommandHandler.h
2024-10-07 19:48:36 +02:00

33 lines
837 B
C++

#pragma once
/**
* \file CommandHandler.h
* \brief File containing the td::protocol::CommandHandler class
*/
#include <td/protocol/command/CommandVisitor.h>
#include <td/protocol/command/Commands.h>
namespace td {
namespace protocol {
#define DeclareCommand(CommandName, ...) \
virtual void Visit(const commands::CommandName&); \
virtual void HandleCommand(const commands::CommandName&) {}
/**
* \class CommandHandler
* \brief Class used to handle packets
*/
class CommandHandler : public CommandVisitor {
public:
CommandHandler() {}
~CommandHandler() {}
DeclareAllCommand()
};
#undef DeclareCommand
} // namespace protocol
} // namespace td