ResetCounterVisitor.java
Go to the documentation of this file.00001 package edu.rice.cs.hpc.data.experiment.scope.visitors;
00002
00003 import edu.rice.cs.hpc.data.experiment.scope.AlienScope;
00004 import edu.rice.cs.hpc.data.experiment.scope.CallSiteScope;
00005 import edu.rice.cs.hpc.data.experiment.scope.FileScope;
00006 import edu.rice.cs.hpc.data.experiment.scope.GroupScope;
00007 import edu.rice.cs.hpc.data.experiment.scope.LineScope;
00008 import edu.rice.cs.hpc.data.experiment.scope.LoadModuleScope;
00009 import edu.rice.cs.hpc.data.experiment.scope.LoopScope;
00010 import edu.rice.cs.hpc.data.experiment.scope.ProcedureScope;
00011 import edu.rice.cs.hpc.data.experiment.scope.RootScope;
00012 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00013 import edu.rice.cs.hpc.data.experiment.scope.ScopeVisitType;
00014 import edu.rice.cs.hpc.data.experiment.scope.StatementRangeScope;
00015
00016 public class ResetCounterVisitor implements IScopeVisitor {
00017
00018 public void visit(Scope scope, ScopeVisitType vt) { reset(scope, vt); }
00019 public void visit(RootScope scope, ScopeVisitType vt) { reset(scope, vt); }
00020 public void visit(LoadModuleScope scope, ScopeVisitType vt) { reset(scope, vt); }
00021 public void visit(FileScope scope, ScopeVisitType vt) { reset(scope, vt); }
00022 public void visit(ProcedureScope scope, ScopeVisitType vt) { reset(scope, vt); }
00023 public void visit(AlienScope scope, ScopeVisitType vt) { reset(scope, vt); }
00024 public void visit(LoopScope scope, ScopeVisitType vt) { reset(scope, vt); }
00025 public void visit(StatementRangeScope scope, ScopeVisitType vt) { reset(scope, vt); }
00026 public void visit(CallSiteScope scope, ScopeVisitType vt) { reset(scope, vt); }
00027 public void visit(LineScope scope, ScopeVisitType vt) { reset(scope, vt); }
00028 public void visit(GroupScope scope, ScopeVisitType vt) { reset(scope, vt); }
00029
00030 private void reset(Scope scope, ScopeVisitType vt)
00031 {
00032 if (vt == ScopeVisitType.PreVisit)
00033 {
00034 scope.setCounter(0);
00035 }
00036 }
00037 }