FileScope.java

Go to the documentation of this file.
00001 
00002 //                                                                      //
00003 //  FileScope.java                                                      //
00004 //                                                                      //
00005 //  experiment.scope.FileScope -- a source file in an experiment        //
00006 //  Last edited: August 10, 2001 at 3:20 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 import edu.rice.cs.hpc.data.util.*;
00021 
00022 
00023 
00024 
00026 //  CLASS FILE-SCOPE                                                    //
00028 
00036 public class FileScope extends Scope
00037 {
00038 
00039 
00040 
00041 
00043 //  INITIALIZATION                                                      //
00045 
00046 
00047 
00048 
00049 /*************************************************************************
00050  *  Creates a FileScope.
00051  *
00052  *  The <code>lineMap</code> instance variable is not initialized here
00053  *  because it is computed on demand.
00054  *
00055  ************************************************************************/
00056     
00057 public FileScope(BaseExperiment experiment, SourceFile sourceFile, int idFile)
00058 {
00059     super(experiment, sourceFile, idFile);
00060 //  this.id = "FileScope";
00061 }
00062 
00063 public FileScope(BaseExperiment experiment, SourceFile sourceFile)
00064 {
00065     super(experiment, sourceFile, Scope.idMax++);
00066 //  this.id = "FileScope";
00067 }
00068 
00069 public Scope duplicate() {
00070     return new FileScope(this.experiment, sourceFile, this.flat_node_index);
00071 }
00072 
00074 //  SCOPE DISPLAY                                                       //
00076 
00077 
00078 
00079 
00080 /*************************************************************************
00081  *  Returns the user visible name for this file scope.
00082  ************************************************************************/
00083     
00084 public String getName()
00085 {
00086     return this.sourceFile.getName();
00087 }
00088 
00089 
00090 
00091 
00092 /*************************************************************************
00093  *  Returns the tool tip for this scope.
00094  ************************************************************************/
00095     
00096 public String getToolTip()
00097 {
00098     boolean available = this.getSourceFile().isAvailable();
00099     return (available ? Strings.SOURCE_FILE_AVAILABLE : Strings.SOURCE_FILE_UNAVAILABLE);
00100 }
00101 
00102 
00103 
00104 
00106 //  ACCESS TO SCOPE                                                     //
00108 
00109 
00110 
00111 
00113 //support for visitors                                                  //
00115 
00116 public void accept(IScopeVisitor visitor, ScopeVisitType vt) {
00117     visitor.visit(this, vt);
00118 }
00119 
00120 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1