AlienScope.java

Go to the documentation of this file.
00001 
00002 //                                  //
00003 //  AlienScope.java                             //
00004 //                                  //
00005 //  experiment.scope.AlienScope -- an alien 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 import edu.rice.cs.hpc.data.experiment.BaseExperiment;
00018 import edu.rice.cs.hpc.data.experiment.scope.visitors.IScopeVisitor;
00019 import edu.rice.cs.hpc.data.experiment.source.SourceFile;
00020 
00021 
00022 
00023 
00025 //  CLASS PROCEDURE-SCOPE                       //
00027 
00035 public class AlienScope extends Scope
00036 {
00037 
00038 
00040 protected String fileName;
00041 protected String procedureName;
00042 
00043 
00045 //  INITIALIZATION  
00047 
00048 
00049 
00050 
00051 /*************************************************************************
00052  *  Creates a AlienScope.
00053  ************************************************************************/
00054     
00055 public AlienScope(BaseExperiment experiment, SourceFile file, 
00056           String fileName, String procName, 
00057           int first, int last, int id)
00058 {
00059     super(experiment, file, first, last, id, id);
00060     this.fileName = fileName;
00061     this.procedureName = procName;
00062 //  this.id = "AlienScope";
00063 }
00064 
00065 public AlienScope(BaseExperiment experiment, SourceFile file, 
00066           String fileName, String procName, 
00067           int first, int last)
00068 {
00069     this(experiment, file, fileName, procName, first, last, Scope.idMax++);
00070 }
00071 
00072 
00074 //  SCOPE DISPLAY   
00076 
00077 
00078 
00079 
00080 /*************************************************************************
00081  *  Returns the user visible name for this scope.
00082  ************************************************************************/
00083     
00084 public String getName()
00085 {
00086     return "alien [" + this.procedureName + "]";
00087 }
00088 
00089 
00090 /*************************************************************************
00091  *  Return a duplicate of this procedure scope, 
00092  *  minus the tree information .
00093  ************************************************************************/
00094 
00095 public Scope duplicate() {
00096     return new AlienScope(this.experiment, 
00097                   this.sourceFile, 
00098                   this.fileName,
00099                   this.procedureName,
00100                   this.firstLineNumber, 
00101                   this.lastLineNumber, 
00102                   getCCTIndex());
00103 
00104 }
00105 
00106 
00108 //support for visitors                                                  //
00110 
00111 public void accept(IScopeVisitor visitor, ScopeVisitType vt) {
00112     visitor.visit(this, vt);
00113 }
00114 
00115 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1