2022-06-11 23:01:27 +00:00
|
|
|
/***
|
|
|
|
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;
|
|
|
|
|
2022-06-28 14:57:29 +00:00
|
|
|
struct IOProcessorItem : AuLoop::ILoopSourceSubscriberEx, IIOProcessorItem, AuEnableSharedFromThis<IOProcessorItem>
|
2022-06-11 23:01:27 +00:00
|
|
|
{
|
|
|
|
IOProcessor *parent;
|
2022-06-28 14:57:29 +00:00
|
|
|
bool singleshot{};
|
|
|
|
bool triggered{};
|
2022-06-11 23:01:27 +00:00
|
|
|
|
|
|
|
AuSPtr<IIOWaitableItem> item;
|
|
|
|
AuSPtr<IIOEventListener> listener;
|
|
|
|
|
|
|
|
// ILoopSourceSubscriber
|
2022-06-28 14:57:29 +00:00
|
|
|
bool OnFinished(const AuSPtr<AuLoop::ILoopSource> &source, AuUInt8 pos) override;
|
|
|
|
void OnTimeout(const AuSPtr<AuLoop::ILoopSource>& source) override;
|
|
|
|
|
2022-06-11 23:01:27 +00:00
|
|
|
// IIOProcessorItem
|
|
|
|
virtual bool StopWatch() override;
|
|
|
|
virtual bool FailWatch() override;
|
|
|
|
|
|
|
|
// IIOProcessorItem::...
|
|
|
|
void InvokeManualTick() override;
|
|
|
|
|
|
|
|
//
|
|
|
|
void IOAlert(bool force);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|