1
0
This commit is contained in:
Scott E. Graves
2017-03-15 23:39:48 -05:00
parent 72caad98d2
commit ec16715612
4 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include <siacommon.h>
NS_BEGIN(Sia)
NS_BEGIN(Api)
class CEvent;
class SIADRIVE_EXPORTABLE CDebugConsumer
{
public:
CDebugConsumer();
public:
~CDebugConsumer();
private:
void ProcessEvent(const CEvent& eventData);
};
NS_END(2);

View File

@@ -0,0 +1,20 @@
#pragma once
#include <siacommon.h>
NS_BEGIN(Sia)
NS_BEGIN(Api)
class CEvent;
class SIADRIVE_EXPORTABLE CLoggingConsumer
{
public:
CLoggingConsumer();
public:
~CLoggingConsumer();
private:
void ProcessEvent(const CEvent& eventData);
};
NS_END(2)

View File

@@ -0,0 +1,19 @@
#include <debugconsumer.h>
#include <eventsystem.h>
using namespace Sia::Api;
CDebugConsumer::CDebugConsumer()
{
CEventSystem::EventSystem.AddEventConsumer([this](const CEvent& event) { this->ProcessEvent(event); });
}
CDebugConsumer::~CDebugConsumer()
{
}
void CDebugConsumer::ProcessEvent(const CEvent& eventData)
{
OutputDebugString(eventData.GetSingleLineMessage().str().c_str());
OutputDebugString(L"\n");
}

View File

@@ -0,0 +1,19 @@
#include <loggingconsumer.h>
#include <eventsystem.h>
using namespace Sia::Api;
CLoggingConsumer::CLoggingConsumer()
{
CEventSystem::EventSystem.AddEventConsumer([=](const CEvent& event) {this->ProcessEvent(event); });
}
CLoggingConsumer::~CLoggingConsumer()
{
}
void CLoggingConsumer::ProcessEvent(const CEvent& eventData)
{
}