2022-06-11 23:01:27 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
File: AuIOProcessorItem.hpp
|
2022-06-11 23:01:27 +00:00
|
|
|
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
|
|
|
{
|
2023-12-11 20:18:36 +00:00
|
|
|
IOProcessor *pParent {};
|
|
|
|
bool bSingleshot {};
|
|
|
|
bool bTriggered {};
|
2022-06-11 23:01:27 +00:00
|
|
|
|
2022-08-29 15:46:46 +00:00
|
|
|
AuSPtr<IIOWaitableItem> pItem;
|
|
|
|
AuSPtr<IIOEventListener> pListener;
|
2022-06-11 23:01:27 +00:00
|
|
|
|
|
|
|
// 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);
|
|
|
|
};
|
|
|
|
}
|