AQueue#
A std::queue with AUI extensions.
| Header: | #include <AUI/Common/AQueue.h> |
| CMake: | aui_link(my_target PUBLIC aui::core) |
Public Methods#
contains#
- Returns
- true if container contains an element, false otherwise.
Examples:
examples/ui/contacts/src/main.cpp
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
isSubsetOf#
- Returns
- true if
ccontainer is a subset of this container, false otherwise.
popOrGenerate#
Pops the element and returns it. If queue is empty, the result of factory() returned.
The result of factory() is never added to the queue.
- Returns
- result of
front()if not empty; result offactory()otherwise
removeAll#
- Arguments
itemelement to remove.
Removes all occurrences of item.
removeFirst#
- Arguments
itemelement to remove.
Removes first occurrence of item.
Examples:
examples/7guis/crud/src/main.cpp
7GUIs CRUD — Create/Read/Update/Delete example.
(*mSelectedUser)->surname = std::exchange(mEditedUser.surname, {});
}
void deleteClicked() {
mUsers.writeScope()->removeFirst(*mSelectedUser);
mSelectedUser = nullptr;
}
};
AUI_ENTRY {