gros push encore
This commit is contained in:
21
src/main.cpp
21
src/main.cpp
@@ -1,6 +1,23 @@
|
||||
#include <iostream>
|
||||
// #include <td/protocol/packet/PacketVisitor.h>
|
||||
#include <td/protocol/command/CommandDispatcher.h>
|
||||
#include <td/protocol/command/CommandFactory.h>
|
||||
#include <td/protocol/command/CommandHandler.h>
|
||||
#include <td/protocol/command/CommandSerializer.h>
|
||||
#include <td/protocol/command/CommandVisitor.h>
|
||||
|
||||
class Test : public td::protocol::CommandVisitor {};
|
||||
|
||||
class Test2 : public td::protocol::CommandHandler {};
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
std::cout << "hello world!" << std::endl;
|
||||
return 0;
|
||||
// Test visitor;
|
||||
// td::protocol::packets::ChatMessage chat{{"coucou"}};
|
||||
// visitor.Check(chat);
|
||||
|
||||
|
||||
td::protocol::commands::UpgradeTower com{{1, 2}};
|
||||
std::cout << (unsigned)com.GetType() << std::endl;
|
||||
td::protocol::CommandDispatcher disptacher;
|
||||
return 0;
|
||||
}
|
||||
|
||||
18
src/td/protocol/command/Commands.cpp
Normal file
18
src/td/protocol/command/Commands.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#define TD_INSTANCIATE_COMMANDS
|
||||
#include <td/protocol/command/Commands.h>
|
||||
|
||||
#include <td/protocol/command/CommandVisitor.h>
|
||||
|
||||
namespace td {
|
||||
namespace protocol {
|
||||
|
||||
template <CommandType CT, typename Data>
|
||||
commands::ConcreteCommand<CT, Data>::ConcreteCommand(const CommandDataType& a_Data) : m_Data(a_Data) {}
|
||||
|
||||
template <CommandType CT, typename Data>
|
||||
void commands::ConcreteCommand<CT, Data>::Accept(CommandVisitor& a_Visitor) const {
|
||||
a_Visitor.Visit(*this);
|
||||
}
|
||||
|
||||
} // namespace protocol
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user