Base Framework
Public Types | Public Member Functions | Protected Attributes | List of all members
AsynchronousReadCompletion Class Reference

Asynchronous read operation completion. More...

#include <base/io/async/AsynchronousReadCompletion.h>

Inherits Object.

Public Types

enum  Flags { COMPLETED = 1, SUCCESSFUL = 2, ABORTED = 4, END_OF_FILE = 8 }
 

Public Member Functions

 AsynchronousReadCompletion (uint8 *_buffer, unsigned int _bytesToRead, unsigned long long _offset, unsigned int _bytesRead, unsigned int _flags) noexcept
 
 AsynchronousReadCompletion (const AsynchronousReadCompletion &copy) noexcept
 
AsynchronousReadCompletionoperator= (const AsynchronousReadCompletion &assign) noexcept
 
bool eof () const noexcept
 
bool successful () const noexcept
 
bool hasCompleted () const noexcept
 
bool isPending () const noexcept
 
bool wasAborted () const noexcept
 
uint8 * getBuffer () noexcept
 
unsigned int getBytesToRead () const noexcept
 
unsigned long long getOffset () const noexcept
 
unsigned int getBytesRead () const noexcept
 

Protected Attributes

uint8 * buffer = nullptr
 
unsigned int bytesToRead = 0
 
unsigned long long offset = 0
 
unsigned int bytesRead = 0
 
unsigned int flags = 0
 

Detailed Description

Asynchronous read operation completion.

This class describes the completion status of an asynchronous read operation.

See also
AsynchronousReadEventListener
Version
1.0

Member Enumeration Documentation

◆ Flags

Enumerator
COMPLETED 

Indicates whether or not the operation has been completed.

SUCCESSFUL 

Indicates whether or not the operation was succesful.

ABORTED 

Indicates when set that the operation was cancelled.

END_OF_FILE 

Indicates when set that the end of file has been reached.

Constructor & Destructor Documentation

◆ AsynchronousReadCompletion() [1/2]

AsynchronousReadCompletion::AsynchronousReadCompletion ( uint8 *  _buffer,
unsigned int  _bytesToRead,
unsigned long long  _offset,
unsigned int  _bytesRead,
unsigned int  _flags 
)
inlinenoexcept

Initialization of object.

◆ AsynchronousReadCompletion() [2/2]

AsynchronousReadCompletion::AsynchronousReadCompletion ( const AsynchronousReadCompletion copy)
noexcept

Initialization of object from other object.

Member Function Documentation

◆ operator=()

AsynchronousReadCompletion& AsynchronousReadCompletion::operator= ( const AsynchronousReadCompletion assign)
noexcept

Assignment of object by object.

Member Data Documentation

◆ buffer

uint8* AsynchronousReadCompletion::buffer = nullptr
protected

The buffer associated with the operation.

◆ bytesRead

unsigned int AsynchronousReadCompletion::bytesRead = 0
protected

Specified the number of bytes read.

◆ bytesToRead

unsigned int AsynchronousReadCompletion::bytesToRead = 0
protected

The desired number of bytes to be read.

◆ flags

unsigned int AsynchronousReadCompletion::flags = 0
protected

Flags.

◆ offset

unsigned long long AsynchronousReadCompletion::offset = 0
protected

The offset.