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

Asynchronous write operation completion. More...

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

Inherits Object.

Public Types

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

Public Member Functions

 AsynchronousWriteCompletion (const uint8 *_buffer, unsigned int _bytesToWrite, unsigned long long _offset, unsigned int _bytesWritten, unsigned int _flags) noexcept
 
 AsynchronousWriteCompletion (const AsynchronousWriteCompletion &copy) noexcept
 
AsynchronousWriteCompletionoperator= (const AsynchronousWriteCompletion &assign) noexcept
 
bool successful () const noexcept
 
bool hasCompleted () const noexcept
 
bool isPending () const noexcept
 
bool wasAborted () const noexcept
 
const uint8 * getBuffer () const noexcept
 
unsigned int getBytesToWrite () const noexcept
 
unsigned long long getOffset () const noexcept
 
unsigned int getBytesWritten () const noexcept
 

Protected Attributes

const uint8 * buffer = nullptr
 
unsigned int bytesToWrite = 0
 
unsigned long long offset = 0
 
unsigned int bytesWritten = 0
 
unsigned int flags = 0
 

Detailed Description

Asynchronous write operation completion.

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

See also
AsynchronousWriteEventListener
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.

Constructor & Destructor Documentation

◆ AsynchronousWriteCompletion() [1/2]

AsynchronousWriteCompletion::AsynchronousWriteCompletion ( const uint8 *  _buffer,
unsigned int  _bytesToWrite,
unsigned long long  _offset,
unsigned int  _bytesWritten,
unsigned int  _flags 
)
inlinenoexcept

Initialization of object.

◆ AsynchronousWriteCompletion() [2/2]

AsynchronousWriteCompletion::AsynchronousWriteCompletion ( const AsynchronousWriteCompletion copy)
noexcept

Initialization of object from other object.

Member Function Documentation

◆ operator=()

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

Assignment of object by object.

Member Data Documentation

◆ buffer

const uint8* AsynchronousWriteCompletion::buffer = nullptr
protected

The buffer associated with the operation.

◆ bytesToWrite

unsigned int AsynchronousWriteCompletion::bytesToWrite = 0
protected

The desired number of bytes to be written.

◆ bytesWritten

unsigned int AsynchronousWriteCompletion::bytesWritten = 0
protected

Specifies the number of bytes written.

◆ flags

unsigned int AsynchronousWriteCompletion::flags = 0
protected

Flags.

◆ offset

unsigned long long AsynchronousWriteCompletion::offset = 0
protected

The offset.