59 handleCount_(0), lastStopCycle_(0), controller_(controller),
60 eventHandler_(eventHandler) {
111 StopPointIndex::iterator findResult =
stopPoints_.find(handle);
116 if ((*i) == handle) {
158 for (
unsigned int i = 0; i <
handles_.size(); i++) {
209 for (
unsigned int i = 0; i <
handles_.size(); i++) {
236 string msg =
"No stop point found by the given index.";
249 StopPointIndex::const_iterator containerEnd =
stopPoints_.end();
250 StopPointIndex::const_iterator findResult =
stopPoints_.find(handle);
252 if (findResult == containerEnd) {
254 std::string msg =
"No stop point found by the given handle.";
257 return *findResult->second;
321 StopPointIndex::iterator containerEnd =
stopPoints_.end();
322 StopPointIndex::iterator findResult =
stopPoints_.find(handle);
324 if (findResult == containerEnd) {
326 string msg =
"No stop point found by the given handle.";
329 return findResult->second;
346 unsigned int count = 0;
347 for (StopPointIndex::const_iterator i =
stopPoints_.begin();
349 if ((*i).second->isTriggered()) {
356 __FILE__, __LINE__,
__func__,
"Stop point index out of range.");
372 std::size_t count = 0;
373 for (StopPointIndex::const_iterator i =
stopPoints_.begin();
375 if ((*i).second->isTriggered())
396 const int handle = (*i).first;
409 toBeDeletedStopPoints.push_back(handle);
422 for (
size_t i = 0; i < toBeDeletedStopPoints.size(); ++i) {
@ SRE_BREAKPOINT
Stopped because of at least one breakpoint.
@ SE_NEW_INSTRUCTION
Generated before executing a new instructon.
StopPointIndex stopPoints_
The stop points.
std::vector< unsigned int > HandleContainer
The handle storage.
void disable(unsigned int handle)
unsigned int handleCount_
Represents the next free handle.
void enableOnceAndDisable(unsigned int handle)
TTASimulationController & controller_
The simulation controller to use to stop the simulation.
virtual ~StopPointManager()
unsigned int stopPointCount()
void enable(unsigned int handle)
unsigned int stopCausingStopPointCount() const
ClockCycleCount lastStopCycle_
The clock cycle in which simulation was stopped last.
StopPointManager(TTASimulationController &controller, SimulationEventHandler &eventHandler)
void enableOnceAndDelete(unsigned int handle)
unsigned int stopCausingStopPoint(unsigned int index) const
void removeCondition(unsigned int handle)
void deleteStopPoint(unsigned int handle)
SimulationEventHandler & eventHandler_
The event handler to use to register stop points to.
unsigned int add(const StopPoint &stopPoint)
HandleContainer handles_
The stop point handles.
StopPoint * findStopPoint(unsigned int handle)
void setCondition(unsigned int handle, const ConditionScript &condition)
const StopPoint & stopPointWithHandleConst(unsigned int handle) const
void setIgnore(unsigned int handle, unsigned int count)
unsigned int stopPointHandle(unsigned int index)
virtual StopPoint * copy() const =0
virtual bool isDisabledAfterTriggered() const
virtual bool isTriggered() const =0
virtual void removeCondition()
virtual bool isEnabled() const
virtual void setDeletedAfterTriggered(bool flag)
virtual bool isConditionOK()
virtual void setEnabled(bool flag)
virtual void decreaseIgnoreCount()
virtual void setCondition(const ConditionScript &condition)
virtual bool isDeletedAfterTriggered() const
virtual unsigned int ignoreCount() const
virtual void setDisabledAfterTriggered(bool flag)
virtual void setIgnoreCount(unsigned int count)
virtual void prepareToStop(StopReason reason)
virtual ClockCycleCount clockCount() const