41 lines
882 B
C++
41 lines
882 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: LSHandle.cpp
|
|
Date: 2021-10-1
|
|
Author: Reece
|
|
***/
|
|
#include <Source/RuntimeInternal.hpp>
|
|
#include "LSHandle.hpp"
|
|
|
|
namespace Aurora::Loop
|
|
{
|
|
LSHandle::LSHandle(AuUInt handle) : handle(handle), reference({handle})
|
|
{}
|
|
|
|
bool LSHandle::OnTrigger(AuUInt handle, bool atomicSignal)
|
|
{
|
|
return atomicSignal;
|
|
}
|
|
|
|
AuList<AuUInt> LSHandle::GetHandles()
|
|
{
|
|
return reference;
|
|
}
|
|
|
|
ELoopSource LSHandle::GetType()
|
|
{
|
|
return ELoopSource::eSourceHandle;
|
|
}
|
|
|
|
AUKN_SYM AuSPtr<ILoopSource> NewLSOSHandle(AuUInt handle)
|
|
{
|
|
auto h = reinterpret_cast<HANDLE>(handle);
|
|
if (h == INVALID_HANDLE_VALUE)
|
|
{
|
|
return {};
|
|
}
|
|
|
|
return AuMakeShared<LSHandle>(handle);
|
|
}
|
|
} |