AuroraRuntime/Source/IO/AuIOSimpleEventListener.cpp

63 lines
1.2 KiB
C++
Raw Normal View History

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuIOSimpleEventListener.cpp
Date: 2022-6-22
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "AuIOSimpleEventListener.hpp"
namespace Aurora::IO
{
2022-08-29 15:46:46 +00:00
IOSimpleEventListener::IOSimpleEventListener(const AuSPtr<IIOSimpleEventListener> &pParent) : pParent(pParent)
{
}
void IOSimpleEventListener::Tick_RunOnTick()
{
}
void IOSimpleEventListener::Tick_OtherIOEvent()
{
}
void IOSimpleEventListener::Tick_SelfIOEvent()
{
}
void IOSimpleEventListener::Tick_Any()
{
2022-08-29 15:46:46 +00:00
this->pParent->OnIOTick();
}
void IOSimpleEventListener::Tick_FrameEpilogue()
{
}
void IOSimpleEventListener::OnFailureCompletion()
{
2022-08-29 15:46:46 +00:00
this->pParent->OnIOFailure();
}
void IOSimpleEventListener::OnNominalCompletion()
{
2022-08-29 15:46:46 +00:00
this->pParent->OnIOComplete();
}
2022-08-29 15:46:46 +00:00
AuSPtr<IIOEventListener> DesimplifyIOEventListenerAdapter(const AuSPtr<IIOSimpleEventListener> &pInterface)
{
2022-08-29 15:46:46 +00:00
if (!pInterface)
{
return {};
}
2022-08-29 15:46:46 +00:00
return AuMakeShared<IOSimpleEventListener>(pInterface);
}
}