CallSiteScope.java

Go to the documentation of this file.
00001 
00002 //                                  //
00003 //  CallSiteScope.java              //
00004 //                                  //
00005 //  experiment.scope.CallSiteScope -- a function callsite scope //
00006 //  (c) Copyright 2001-2012 Rice University. All rights reserved.   //
00007 //  $Id$                            //
00008 //                                  //
00010 package edu.rice.cs.hpc.data.experiment.scope;
00011 
00012 import edu.rice.cs.hpc.data.experiment.scope.ProcedureScope;
00013 import edu.rice.cs.hpc.data.experiment.scope.visitors.IScopeVisitor;
00014 
00015 
00017 //  CLASS CALLSITE-SCOPE                                                //
00019 
00027 public class CallSiteScope extends Scope
00028 {
00029 
00030 
00031 protected LineScope lineScope;
00032 
00033 protected ProcedureScope procScope;
00034 
00035 protected CallSiteScopeType type;
00036 
00037 
00039 //INITIALIZATION    
00041 
00042 public CallSiteScope(LineScope scope, ProcedureScope scope2, 
00043         CallSiteScopeType csst, int cct_id, int flat_id) 
00044 {
00045     super(scope2.experiment,scope2.sourceFile,scope2.firstLineNumber,
00046             scope2.lastLineNumber, cct_id, flat_id);
00047     this.lineScope = scope;
00048     this.procScope = scope2;
00049     this.type = csst;
00050 }
00051 
00052 public Scope duplicate() {
00053     return new CallSiteScope(
00054             (LineScope) lineScope.duplicate(), 
00055             (ProcedureScope) procScope.duplicate(), 
00056             type, getCCTIndex(), this.flat_node_index);
00057 }
00058 
00059 
00061 //SCOPE DISPLAY 
00063 
00064 
00065 /*************************************************************************
00066  *  Returns the user visible name for this scope.
00067  ************************************************************************/
00068     
00069 public String getName()
00070 {
00071     return procScope.getName();
00072 }
00073 
00074 public ProcedureScope getProcedureScope()
00075 {
00076     return this.procScope;
00077 }
00078 
00079 public LineScope getLineScope()
00080 {
00081     return this.lineScope;
00082 }
00083 
00084 
00086 //support for visitors                                                  //
00088 
00089 public void accept(IScopeVisitor visitor, ScopeVisitType vt) {
00090     visitor.visit(this, vt);
00091 }
00092 
00093 public CallSiteScopeType getType() {
00094     return this.type;
00095 }
00096 
00097 }
00098 
00099 

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1