AuroraRuntime/Source/IO/IOProcessorItem.hpp

38 lines
952 B
C++
Raw Normal View History

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessorItem.hpp
Date: 2022-6-6
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IOProcessor;
struct IOProcessorItem : AuLoop::ILoopSourceSubscriberEx, IIOProcessorItem, AuEnableSharedFromThis<IOProcessorItem>
{
IOProcessor *parent;
bool singleshot{};
bool triggered{};
AuSPtr<IIOWaitableItem> item;
AuSPtr<IIOEventListener> listener;
// 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);
};
}