Mistake on this page?
Report an issue in GitHub or email us
OperationList.h
1 /*
2  * Copyright (c) 2018-2019, Arm Limited and affiliates.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef MBED_OPERATION_LIST_H
19 #define MBED_OPERATION_LIST_H
20 
21 #include "OperationListBase.h"
22 #include "AsyncOp.h"
23 
24 template<class T>
26 public:
27 
28  /**
29  * Create a new empty operation list
30  */
32  {
33 
34  }
35 
36  /**
37  * Destroy this object and abort all operations
38  */
40  {
41 
42  }
43  /**
44  * Add an operation to the list
45  *
46  * If the list was empty then call process on this
47  * operation
48  *
49  * @param op Operation to add
50  */
51  void add(T *op)
52  {
54  }
55 
56  /**
57  * Remove an operation from the list
58  *
59  * If this was the head of the list then process the
60  * next element in the list.
61  *
62  * @param op Operation to remove
63  */
64  void remove(T *op)
65  {
67  }
68 
69  /**
70  * Dequeue the head of the list
71  *
72  * Remove the head of the operation list without completing it
73  * or processing the next element. The caller must call the
74  * AsnycOp::complete() function of the returned object.
75  * Additionally process() must be called on this object
76  * if there are still elements in the list.
77  *
78  * @return The async op at the head of the list
79  */
81  {
82  return static_cast<AsyncOp *>(OperationListBase::dequeue_raw());
83  }
84 
85 };
86 
87 #endif
T * dequeue_raw()
Dequeue the head of the list.
Definition: OperationList.h:80
OperationList()
Create a new empty operation list.
Definition: OperationList.h:31
~OperationList()
Destroy this object and abort all operations.
Definition: OperationList.h:39
void add(T *op)
Add an operation to the list.
Definition: OperationList.h:51
void remove(AsyncOp *op)
Remove an operation from the list.
void add(AsyncOp *op)
Add an operation to the list.
AsyncOp * dequeue_raw()
Dequeue the head of the list.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.