StatementRangeScope.java

Go to the documentation of this file.
00001 
00002 //                                                                      //
00003 //  StatementRangeScope.java                                            //
00004 //                                                                      //
00005 //  experiment.scope.StatementRangeScope -- a range of statements       //
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 STATEMENT-RANGE-SCOPE                                         //
00028 
00036 public class StatementRangeScope extends Scope
00037 {
00038 
00039 
00040 
00041 
00043 //  INITIALIZATION                                                      //
00045 
00046 
00047 
00048 
00049 /*************************************************************************
00050  *  Creates a StatementRangeScope.
00051  ************************************************************************/
00052     
00053 public StatementRangeScope(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 }
00057 
00058 /*
00059 public StatementRangeScope(Experiment experiment, SourceFile file, int first, int last)
00060 {
00061     super(experiment, file, first, last, Scope.idMax++);
00062 }
00063 */
00064 
00066 //  SCOPE DISPLAY                                                       //
00068 
00069 
00070 
00071 
00072 /*************************************************************************
00073  *  Returns the user visible name for this statement-range scope.
00074  ************************************************************************/
00075     
00076 public String getName()
00077 {
00078     return this.getSourceCitation();
00079 }
00080 
00081 
00082 
00083 
00084 /*************************************************************************
00085  *  Returns the short user visible name for this scope.
00086  *
00087  *  This name is only used in tree views where the scope's name appears
00088  *  in context with its containing scope's name.
00089  *
00090  *  Subclasses may override this to implement better short names.
00091  *
00092  ************************************************************************/
00093     
00094 public String getShortName()
00095 {
00096     return this.getLineNumberCitation();
00097 }
00098 
00099 
00100 /*************************************************************************
00101  *  Return a duplicate of this statement range scope, 
00102  *  minus the tree information .
00103  ************************************************************************/
00104 
00105 public Scope duplicate() {
00106     StatementRangeScope duplicatedScope = 
00107     new StatementRangeScope(this.experiment, 
00108                 this.sourceFile, 
00109                 this.firstLineNumber,
00110                 this.lastLineNumber,
00111                 getCCTIndex(), this.flat_node_index);
00112     return duplicatedScope;
00113 }
00114 
00115 
00117 //support for visitors                                                  //
00119 
00120 public void accept(IScopeVisitor visitor, ScopeVisitType vt) {
00121     visitor.visit(this, vt);
00122 }
00123 
00124 
00125 }
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1