OpenASIP
2.0
|
#include <StopPoint.hh>
Public Member Functions | |
StopPoint () | |
virtual | ~StopPoint () |
virtual void | setEnabled (bool flag) |
virtual bool | isEnabled () const |
virtual void | setDisabledAfterTriggered (bool flag) |
virtual bool | isDisabledAfterTriggered () const |
virtual void | setDeletedAfterTriggered (bool flag) |
virtual bool | isDeletedAfterTriggered () const |
virtual void | setCondition (const ConditionScript &condition) |
virtual void | removeCondition () |
virtual const ConditionScript & | condition () const |
virtual bool | isConditional () const |
virtual void | setIgnoreCount (unsigned int count) |
virtual unsigned int | ignoreCount () const |
virtual bool | isConditionOK () |
virtual bool | isTriggered () const =0 |
virtual std::string | description () const =0 |
virtual StopPoint * | copy () const =0 |
virtual void | decreaseIgnoreCount () |
Protected Attributes | |
bool | enabled_ |
Tells whether the breakpoint is enabled or disabled. More... | |
bool | disabledAfterTriggered_ |
Tells if the breakpoint is disabled after it is triggered the next time. More... | |
bool | deletedAfterTriggered_ |
Tells if the breakpoint is deleted after it is triggered the next time. More... | |
bool | conditional_ |
Tells whether the breakpoint is conditional or not. More... | |
ConditionScript * | condition_ |
The condition which is used to determine whether the breakpoint should be fired or not. More... | |
unsigned int | ignoreCount_ |
The number of times the condition is to be ignored before enabling the breakpoint. More... | |
Represents a stop point in simulation.
StopPointManager uses this class to store information of each stop point of the simulation phase. StopPoint is a parent class for different types of user-set simulation stop conditions (currently breakpoints and watches).
Each StopPoint listens to a simulation event (usually PC advance) and evaluates its stop condition.
Definition at line 53 of file StopPoint.hh.
StopPoint::StopPoint | ( | ) |
|
virtual |
|
virtual |
Returns the condition of the stop point.
If breakpoint is unconditional, an empty ConditionScript is returned.
Definition at line 156 of file StopPoint.cc.
References condition_, and conditional_.
Referenced by setCondition(), WatchPropertiesDialog::TransferDataToWindow(), and BreakpointPropertiesDialog::TransferDataToWindow().
|
pure virtual |
Implemented in Breakpoint, and Watch.
Referenced by StopPointManager::add().
|
virtual |
Decreases the ignore count.
Definition at line 201 of file StopPoint.cc.
References ignoreCount(), and setIgnoreCount().
Referenced by StopPointManager::handleEvent().
|
pure virtual |
Prints the description string of the stop point.
Each subclass overrides this method to construct a descripting string of itself.
Implemented in Breakpoint, and Watch.
Definition at line 239 of file StopPoint.cc.
References condition_, conditional_, deletedAfterTriggered_, disabledAfterTriggered_, enabled_, ignoreCount_, Script::script(), and Conversion::toString().
Referenced by Breakpoint::description(), Watch::description(), and SimControlLanguageCommand::printBreakpointInfo().
|
virtual |
Tells the current ignore count, i.e. the number of times the stop point condition is ignored before being fired.
Definition at line 193 of file StopPoint.cc.
References ignoreCount_.
Referenced by decreaseIgnoreCount(), StopPointManager::handleEvent(), WatchPropertiesDialog::TransferDataToWindow(), and BreakpointPropertiesDialog::TransferDataToWindow().
|
virtual |
Tells whether the stop point is conditional or not.
Definition at line 173 of file StopPoint.cc.
References conditional_.
Referenced by WatchPropertiesDialog::TransferDataToWindow(), and BreakpointPropertiesDialog::TransferDataToWindow().
|
virtual |
Tells wheter the condition of the stop point evalutes to true.
If the stop point is not conditional, returns always true.
Definition at line 215 of file StopPoint.cc.
References assert, condition_, conditional_, ConditionScript::conditionOk(), Exception::errorMessage(), and Application::logStream().
Referenced by StopPointManager::handleEvent().
|
virtual |
Tells whether the stop point is deleted after it is triggered (fired) the next time.
Definition at line 119 of file StopPoint.cc.
References deletedAfterTriggered_.
Referenced by StopPointManager::handleEvent().
|
virtual |
Tells if the stop point is disabled after it is triggered (fired) the next time.
Definition at line 97 of file StopPoint.cc.
References disabledAfterTriggered_.
Referenced by StopPointManager::handleEvent().
|
virtual |
Tells wheter the stop point is enabled or not.
Definition at line 73 of file StopPoint.cc.
References enabled_.
Referenced by StopPointManager::handleEvent(), ProximDisassemblyWindow::onRightClick(), and ProximBreakpointWindow::refreshStopPoints().
|
pure virtual |
Implemented in Breakpoint, and Watch.
Referenced by StopPointManager::handleEvent().
|
virtual |
Remove the condition of the StopPoint.
The condition is used to determine if the stop point should be fired.
Definition at line 142 of file StopPoint.cc.
References condition_, and conditional_.
Referenced by Breakpoint::copy(), Watch::copy(), SimControlLanguageCommand::parseBreakpoint(), and StopPointManager::removeCondition().
|
virtual |
Sets the condition of the StopPoint.
The condition is used to determine if the stop point should be fired.
condition | The condition to be used as stop point's condition. |
Definition at line 131 of file StopPoint.cc.
References condition(), condition_, conditional_, and ConditionScript::copy().
Referenced by Breakpoint::copy(), Watch::copy(), SimControlLanguageCommand::parseBreakpoint(), and StopPointManager::setCondition().
|
virtual |
Makes the stop point to be deleted after it is triggered the next time.
flag | The new value for this property. |
Definition at line 107 of file StopPoint.cc.
References deletedAfterTriggered_.
Referenced by Breakpoint::copy(), Watch::copy(), StopPointManager::enableOnceAndDelete(), and TBPCommand::execute().
|
virtual |
Sets the stop point to be disabled after it is triggered the next time.
flag | The new value for this property. |
Definition at line 85 of file StopPoint.cc.
References disabledAfterTriggered_.
Referenced by Breakpoint::copy(), Watch::copy(), and StopPointManager::enableOnceAndDisable().
|
virtual |
Sets the enabled status of the breakpoint.
flag | The status. |
Definition at line 63 of file StopPoint.cc.
References enabled_.
Referenced by StopPointManager::add(), Breakpoint::copy(), Watch::copy(), StopPointManager::disable(), StopPointManager::enable(), StopPointManager::enableOnceAndDelete(), StopPointManager::enableOnceAndDisable(), and StopPointManager::handleEvent().
|
virtual |
Sets the number of times the condition for firing the stop point is to be disabled before enabling it.
Definition at line 182 of file StopPoint.cc.
References ignoreCount_.
Referenced by Breakpoint::copy(), Watch::copy(), decreaseIgnoreCount(), and StopPointManager::setIgnore().
|
protected |
The condition which is used to determine whether the breakpoint should be fired or not.
Definition at line 94 of file StopPoint.hh.
Referenced by condition(), Breakpoint::copy(), Watch::copy(), description(), isConditionOK(), removeCondition(), setCondition(), and ~StopPoint().
|
protected |
Tells whether the breakpoint is conditional or not.
Definition at line 91 of file StopPoint.hh.
Referenced by condition(), Breakpoint::copy(), Watch::copy(), description(), isConditional(), isConditionOK(), removeCondition(), and setCondition().
|
protected |
Tells if the breakpoint is deleted after it is triggered the next time.
Definition at line 89 of file StopPoint.hh.
Referenced by Breakpoint::copy(), Watch::copy(), description(), isDeletedAfterTriggered(), and setDeletedAfterTriggered().
|
protected |
Tells if the breakpoint is disabled after it is triggered the next time.
Definition at line 87 of file StopPoint.hh.
Referenced by Breakpoint::copy(), Watch::copy(), description(), isDisabledAfterTriggered(), and setDisabledAfterTriggered().
|
protected |
Tells whether the breakpoint is enabled or disabled.
Definition at line 84 of file StopPoint.hh.
Referenced by Breakpoint::copy(), Watch::copy(), description(), isEnabled(), and setEnabled().
|
protected |
The number of times the condition is to be ignored before enabling the breakpoint.
Definition at line 97 of file StopPoint.hh.
Referenced by Breakpoint::copy(), Watch::copy(), description(), ignoreCount(), and setIgnoreCount().