Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
BS::pr_task Struct Reference

A helper struct to store a task with an assigned priority. More...

#include <BS_thread_pool.hpp>

Collaboration diagram for BS::pr_task:

Public Member Functions

 pr_task (task_t &&task_, const priority_t priority_=0) noexcept(std::is_nothrow_move_constructible_v< task_t >)
 Construct a new task with an assigned priority.
 

Public Attributes

task_t task
 The task. It is mutable so it can be moved out of the const reference returned by std::priority_queue::top().
 
priority_t priority = 0
 The priority of the task.
 

Friends

bool operator< (const pr_task &lhs, const pr_task &rhs) noexcept
 Compare the priority of two tasks.
 

Detailed Description

A helper struct to store a task with an assigned priority.

Constructor & Destructor Documentation

◆ pr_task()

BS::pr_task::pr_task ( task_t &&  task_,
const priority_t  priority_ = 0 
)
inlineexplicitnoexcept

Construct a new task with an assigned priority.

Parameters
task_The task.
priority_The desired priority.
417: task(std::move(task_)), priority(priority_) {}
task_t task
The task. It is mutable so it can be moved out of the const reference returned by std::priority_queue...
Definition BS_thread_pool.hpp:434
priority_t priority
The priority of the task.
Definition BS_thread_pool.hpp:439

Friends And Related Symbol Documentation

◆ operator<

bool operator< ( const pr_task lhs,
const pr_task rhs 
)
friend

Compare the priority of two tasks.

Parameters
lhsThe first task.
rhsThe second task.
Returns
true if the first task has a lower priority than the second task, false otherwise.
427 {
428 return lhs.priority < rhs.priority;
429 }

The documentation for this struct was generated from the following file: