AuroraRuntime/Source/IO/AuIOProcessorItem.hpp

37 lines
963 B
C++
Raw Normal View History

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuIOProcessorItem.hpp
Date: 2022-6-6
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IOProcessor;
struct IOProcessorItem : AuLoop::ILoopSourceSubscriberEx, IIOProcessorItem, AuEnableSharedFromThis<IOProcessorItem>
{
IOProcessor *pParent {};
bool bSingleshot {};
bool bTriggered {};
2022-08-29 15:46:46 +00:00
AuSPtr<IIOWaitableItem> pItem;
AuSPtr<IIOEventListener> pListener;
// ILoopSourceSubscriber
bool OnFinished(const AuSPtr<AuLoop::ILoopSource> &source, AuUInt8 pos) override;
void OnTimeout(const AuSPtr<AuLoop::ILoopSource>& source) override;
// IIOProcessorItem
virtual bool StopWatch() override;
virtual bool FailWatch() override;
// IIOProcessorItem::...
void InvokeManualTick() override;
//
void IOAlert(bool force);
};
}