Mbed OS Reference
Loading...
Searching...
No Matches
OperationListBase Class Reference
Inheritance diagram for OperationListBase:
OperationList< AsyncWrite > OperationList< AsyncRead > OperationList< AsyncWait > OperationList< AsyncSend > OperationList< T >

Public Member Functions

 OperationListBase ()
 Create a new empty operation list. More...
 
 ~OperationListBase ()
 Destroy this object and abort all operations. More...
 
bool empty ()
 Check if the list is empty. More...
 
void add (AsyncOp *op)
 Add an operation to the list. More...
 
void remove (AsyncOp *op)
 Remove an operation from the list. More...
 
AsyncOpdequeue_raw ()
 Dequeue the head of the list. More...
 
void remove_all ()
 Abort all operations. More...
 
void process ()
 Process the operation list. More...
 

Detailed Description

Definition at line 30 of file OperationListBase.h.

Constructor & Destructor Documentation

◆ OperationListBase()

Create a new empty operation list.

◆ ~OperationListBase()

Destroy this object and abort all operations.

Member Function Documentation

◆ empty()

bool empty ( )

Check if the list is empty.

Returns
true if the list is empty false otherwise

◆ add()

void add ( AsyncOp op)

Add an operation to the list.

If the list was empty then call process on this operation

Parameters
opOperation to add

◆ remove()

void remove ( AsyncOp op)

Remove an operation from the list.

If this was the head of the list then process the next element in the list.

Parameters
opOperation to remove

◆ dequeue_raw()

AsyncOp * dequeue_raw ( )

Dequeue the head of the list.

Remove the head of the operation list without completing it or processing the next element. The caller must call the AsnycOp::complete() function of the returned object. Additionally process() must be called on this object if there are still elements in the list.

Returns
The asynchronous op at the head of the list

◆ remove_all()

void remove_all ( )

Abort all operations.

◆ process()

void process ( )

Process the operation list.

This allow the operation at the head of the list to perform processing