37 lines
956 B
C++
37 lines
956 B
C++
/***
|
|
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 *pParent;
|
|
bool bSingleshot{};
|
|
bool bTriggered{};
|
|
|
|
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);
|
|
};
|
|
} |