logic: IDE Communication

Network code and controller added to communicate with IDE plugins. Does not include GUI integration though.
This commit is contained in:
Manuel Dobusch
2015-10-14 15:40:10 +02:00
parent 4e4cb25540
commit 0664f9a81b
31 changed files with 993 additions and 57 deletions
@@ -0,0 +1,33 @@
#include "IDECommunicationController.h"
#include "utility/messaging/type/MessageActivateTokens.h"
#include "utility/logging/logging.h"
#include "component/controller/helper/NetworkProtocolHelper.h"
IDECommunicationController::IDECommunicationController()
{
}
IDECommunicationController::~IDECommunicationController()
{
}
void IDECommunicationController::handleIncomingMessage(const std::string& message)
{
LOG_WARNING_STREAM(<< message);
NetworkProtocolHelper::NetworkMessage parsedMessage = NetworkProtocolHelper::parseMessage(message);
if (parsedMessage.valid)
{
// TODO: set active token
}
}
void IDECommunicationController::handleMessage(MessageMoveIDECursor* message)
{
std::string networkMessage = NetworkProtocolHelper::buildMessage(message->FilePosition, message->Row, message->Column);
sendMessage(networkMessage);
}