#include <cancel.h>
Public Member Functions | |
CancelList () | |
Initializing Constructor. | |
void | Insert (POSE_TimeType ts, eventID e) |
Insert an event at beginning of cancellations list. | |
CancelNode * | GetItem () |
Return a pointer to a node in list. | |
void | RemoveItem (CancelNode *item) |
Remove a specific cancellation from the list. | |
int | IsEmpty () |
Test if cancellations is empty. | |
POSE_TimeType | getEarliest () |
Return earliest timestamp. | |
void | dump () |
Dump all data fields. | |
void | pup (PUP::er &p) |
Pack/unpack/sizing operator. | |
Private Attributes | |
int | count |
Number of cancellations in list. | |
POSE_TimeType | earliest |
Timestamp of earliest cancellation in list. | |
CancelNode * | cancellations |
The list of cancellations. | |
CancelNode * | current |
Pointer to a particular node in cancellations. |
Definition at line 31 of file cancel.h.
CancelList::CancelList | ( | ) | [inline] |
void CancelList::Insert | ( | POSE_TimeType | ts, | |
eventID | e | |||
) | [inline] |
Insert an event at beginning of cancellations list.
Inserts an event at beginning of list; increments count and sets earliest if applicable; sets current if list was previously empty
Definition at line 49 of file cancel.h.
References cancellations, count, current, earliest, and CancelNode::next.
Referenced by sim::Cancel().
CancelNode* CancelList::GetItem | ( | ) | [inline] |
Return a pointer to a node in list.
Use current to cycle through nodes and give a different node each time GetItem is called
Definition at line 63 of file cancel.h.
References cancellations, current, and CancelNode::next.
Referenced by con::CancelEvents(), and opt::Rollback().
void CancelList::RemoveItem | ( | CancelNode * | item | ) |
Remove a specific cancellation from the list.
List to store event cancellations.
Remove a specific cancellation from the list
Definition at line 6 of file cancel.C.
References cancellations, count, current, earliest, CancelNode::next, POSE_UnsetTS, and CancelNode::timestamp.
Referenced by con::CancelEvents(), and opt::Rollback().
int CancelList::IsEmpty | ( | ) | [inline] |
Test if cancellations is empty.
Definition at line 75 of file cancel.h.
References cancellations, and count.
Referenced by con::CancelEvents(), opt::Rollback(), spec::Step(), opt3::Step(), opt2::Step(), opt::Step(), con::Step(), adapt5::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), and adapt::Step().
POSE_TimeType CancelList::getEarliest | ( | ) | [inline] |
Return earliest timestamp.
Definition at line 81 of file cancel.h.
References earliest.
Referenced by opt::SafeTime(), and con::SafeTime().
void CancelList::dump | ( | ) |
Dump all data fields.
Definition at line 37 of file cancel.C.
References cancellations, count, CancelNode::dump(), earliest, and CancelNode::next.
Referenced by sim::dump().
void CancelList::pup | ( | PUP::er & | p | ) |
Pack/unpack/sizing operator.
Definition at line 60 of file cancel.C.
References cancellations, count, current, earliest, PUP::er::isUnpacking(), CancelNode::next, p, and CancelNode::pup().
Referenced by sim::pup().
int CancelList::count [private] |
POSE_TimeType CancelList::earliest [private] |
Timestamp of earliest cancellation in list.
Set to -1 if no cancellations present
Definition at line 36 of file cancel.h.
Referenced by dump(), getEarliest(), Insert(), pup(), and RemoveItem().
CancelNode* CancelList::cancellations [private] |
CancelNode* CancelList::current [private] |