AuroraRuntime/Include/Aurora/IO/IIOPipeWork.hpp
Jamie Reece Wilson cb60e77c63 [+] IIOPipeWork::SetNextFrameTargetLength
[+] IIOPipeWork::GetNextFrameTargetLength
[+] IIOPipeWork::GetNextFrameTargetLength
[+] IIOPipeWork::ReallocateLater
[+] IIOPipeWork::GetSuccessfulReallocations
[+] IIOPipeWork::GetFailedReallocations
[+] IIOPipeWork::DidLastReallocFail
(will save net and engine from doing its their current hacks)
2023-10-16 01:47:22 +01:00

103 lines
2.2 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IIOPipeWork.hpp
Date: 2022-6-20
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IIOPipeWork
{
/**
* @brief begins the operation
* @return
*/
virtual bool Start() = 0;
/**
* @brief terminates the operation
* @return
*/
virtual bool End() = 0;
/**
* @brief time from the au epoch. see: AuTime::.
* @return
*/
virtual AuInt64 GetStartTickMS() = 0;
/**
* @brief time from the au epoch. see: AuTime::.
* @return
*/
virtual AuInt64 GetLastTickMS() = 0;
/**
* @brief quick approximation of normalized bytes / second
* @return
*/
virtual double GetPredictedThroughput() = 0;
/**
* @brief bytes written to the stream (this will be one frame behind in the callback routine, if in on buffered data mode)
* @return
*/
virtual AuUInt64 GetBytesProcessed() = 0;
/**
* @brief bytes read written to the destination. can be used under any callback to determine interframe progress
* @return
*/
virtual AuUInt64 GetBytesProcessedInterframe() = 0;
/**
* @brief
* @param uLength
* @return
*/
virtual AuUInt SetNextFrameTargetLength(AuUInt uLength) = 0;
/**
* @brief
* @param uLength
* @return
*/
virtual AuUInt GetNextFrameTargetLength() = 0;
/**
* @brief
* @param uLength
* @return
*/
virtual bool ReallocateLater(AuUInt uLength) = 0;
/**
* @brief
* @return
*/
virtual bool IsReallocationPending() = 0;
/**
* @brief
* @return
*/
virtual bool DidLastReallocFail() = 0;
/**
* @brief
* @return
*/
virtual AuUInt GetSuccessfulReallocations() = 0;
/**
* @brief
* @return
*/
virtual AuUInt GetFailedReallocations() = 0;
AURT_ADD_USR_DATA;
};
}