LoopScope.java

Go to the documentation of this file.
00001 
00002 //                                                                      //
00003 //  LoopScope.java                                                      //
00004 //                                                                      //
00005 //  experiment.scope.LoopScope -- a loop scope                          //
00006 //  Last edited: August 10, 2001 at 2:22 pm                             //
00007 //                                                                      //
00008 //  (c) Copyright 2001 Rice University. All rights reserved.            //
00009 //                                                                      //
00011 
00012 
00013 
00014 
00015 package edu.rice.cs.hpc.data.experiment.scope;
00016 
00017 
00018 import edu.rice.cs.hpc.data.experiment.BaseExperiment;
00019 import edu.rice.cs.hpc.data.experiment.scope.visitors.IScopeVisitor;
00020 import edu.rice.cs.hpc.data.experiment.source.SourceFile;
00021 
00022 
00023 
00024 
00026 //  CLASS LOOP-SCOPE                                                    //
00028 
00036 public class LoopScope extends Scope
00037 {
00038 
00039 
00040 
00041 
00043 //  INITIALIZATION                                                      //
00045 
00046 
00047 
00048 
00049 /*************************************************************************
00050  *  Creates a LoopScope.
00051  ************************************************************************/
00052     
00053 public LoopScope(BaseExperiment experiment, SourceFile file, int first, int last, int cct_id, int flat_id)
00054 {
00055     super(experiment, file, first, last, cct_id, flat_id);
00056 //  this.id = "LoopScope";
00057 }
00058 
00059 public LoopScope(BaseExperiment experiment, SourceFile file, int first, int last)
00060 {
00061     super(experiment, file, first, last, Scope.idMax, Scope.idMax);
00062     Scope.idMax++;
00063 //  this.id = "LoopScope";
00064 }
00065 
00066 public Scope duplicate() {
00067     return new LoopScope(this.experiment,  this.sourceFile,  
00068             this.firstLineNumber,  this.lastLineNumber, getCCTIndex(), this.flat_node_index);
00069 }
00070 
00071 
00073 //  SCOPE DISPLAY                                                       //
00075 
00076 
00077 
00078 
00079 /*************************************************************************
00080  *  Returns the user visible name for this scope.
00081  ************************************************************************/
00082     
00083 public String getName()
00084 {
00085     return "loop at " + this.getSourceCitation();
00086 }
00087 
00088 
00089 
00090 
00091 /*************************************************************************
00092  *  Returns the short user visible name for this scope.
00093  *
00094  *  This name is only used in tree views where the scope's name appears
00095  *  in context with its containing scope's name.
00096  *
00097  *  Subclasses may override this to implement better short names.
00098  *
00099  ************************************************************************/
00100     
00101 public String getShortName()
00102 {
00103     return "loop at " + this.getLineNumberCitation();
00104 }
00105 
00106 
00108 //support for visitors                                                  //
00110 
00111 public void accept(IScopeVisitor visitor, ScopeVisitType vt) {
00112     visitor.visit(this, vt);
00113 }
00114 
00115 
00116 }
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1