CMake
This commit is contained in:
21
include/siadrive_api/debugconsumer.h
Normal file
21
include/siadrive_api/debugconsumer.h
Normal 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);
|
20
include/siadrive_api/loggingconsumer.h
Normal file
20
include/siadrive_api/loggingconsumer.h
Normal 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)
|
19
src/siadrive_api/debugconsumer.cpp
Normal file
19
src/siadrive_api/debugconsumer.cpp
Normal 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");
|
||||
}
|
19
src/siadrive_api/loggingconsumer.cpp
Normal file
19
src/siadrive_api/loggingconsumer.cpp
Normal 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)
|
||||
{
|
||||
|
||||
}
|
Reference in New Issue
Block a user