#include <actions.h>
The Actions class abstracts the storage and manipulation of actions.
Public Member Functions | |
Actions () | |
Default constructor, creating an empty Actions object. More... | |
Actions (ActionList &&action_list) | |
Creates a new Actions object from an ActionList. More... | |
Actions (const Actions &)=delete | |
Cannot be copied. More... | |
Actions & | operator= (const Actions &)=delete |
Cannot be copied. More... | |
bool | is_empty () const |
ActionPtr | pop () |
Return the first action in the list and removes it from the list. More... | |
double | earliest_time () const |
Return time of execution of earliest action. More... | |
void | insert (ActionList &&new_acts) |
Insert a list of actions into this object. More... | |
void | insert (ActionPtr &&action) |
Insert an action into this container. More... | |
ActionList::size_type | size () const |
void | clear () |
Delete all actions. More... | |
std::vector< ActionPtr >::const_reverse_iterator | begin () const |
std::vector< ActionPtr >::const_reverse_iterator | end () const |
Static Private Member Functions | |
static bool | cmp (const ActionPtr &a, const ActionPtr &b) |
Compare two action pointer such that the maximum is the most recent action. More... | |
Private Attributes | |
std::vector< ActionPtr > | data_ |
Dynamic data. More... | |
|
inline |
|
inlineexplicit |
Creates a new Actions object from an ActionList.
The actions are stored in a heap and not sorted. The entries of the ActionList are rendered invalid by this constructor.
[in] | action_list | The ActionList from which to construct the Actions object |
Definition at line 42 of file actions.h.
|
delete |
Cannot be copied.
|
inline |
|
inline |
Return the first action in the list and removes it from the list.
RuntimeError | if the list is empty. |
|
inline |
|
inline |
Insert a list of actions into this object.
They're inserted at the right places to keep the complete list a heap.
[in] | new_acts | The actions that will be inserted. |
Definition at line 79 of file actions.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestaticprivate |
Compare two action pointer such that the maximum is the most recent action.
[in] | a | First action |
[in] | b | Second action |
|
private |