edu.rice.cs.hpc.viewer.window.ViewerWindow Class Reference

This class is used to record information about one hpcviewer window. More...

Collaboration diagram for edu.rice.cs.hpc.viewer.window.ViewerWindow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

IWorkbenchWindow getWinObj ()
void setWinObj (IWorkbenchWindow window)
int getNextDbNum ()
 Get the next database number to be used in this window.
Database getDb (String dbPath)
int getOpenDatabases ()
 Returns the number of open databases in this window.
int addDatabase (Database database)
 Adds a new database to to the array of open databases in this window.
int removeDatabase (String databasePath)
 Removes a database from the list of open databases in this window.
int getDbNum (Experiment experiment)
void dispose ()
Database[] getDatabases ()
Experiment[] getExperiments ()
String[] getDatabasePaths ()
 get the path names for each database currently opened in this window.
String getDatabasePath (File file)
String getDatabasePath (String filename)
void checkService ()
int reserveDatabaseNumber ()
boolean showCCTLabel ()
 check if we are in debug mode (showing CCT label) or not
boolean showFlatLabel ()
 check if we are in debug mode (showing Flat label) or not

Static Public Attributes

static int maxDbNum = 5
 The maximum number of performance databases that can be opened in one window.

Package Attributes

ArrayList< DatabasedbObj = new ArrayList<Database>(maxDbNum)
 An array of performance databases (indexed by database number) that have been opened in this window.

Private Member Functions

void filterAllDatabases (boolean filter)
boolean isDebugMode (Command command)
 check if we are in debug mode for a given command

Private Attributes

IWorkbenchWindow winObj
 The workbench window with which this class is associated.
Command cmdDebugCCT
Command cmdDebugFlat
AtomicInteger numAggregateDatabase = new AtomicInteger(1)
 number of databases (whether has been closed or not) this number is useful to make sure the view is always unique

Detailed Description

This class is used to record information about one hpcviewer window.

It contains information about each of the databases that have been opened in this window and an instance of the workbench window with which it is associated.

Each database opened within a window creates a Database object which is kept in dbObj array. The index into this array will be used as a database number. This number plus 1 (to avoid showing a 0) will be displayed in the view titles for all metrics views created when the database is opened. The view titles will also contain the experiment name (which was moved from the window title to the view titles). This allows the user to see which database was the source for the data in each metric view.

Author:
mohrg

Definition at line 37 of file ViewerWindow.java.


Member Function Documentation

int edu.rice.cs.hpc.viewer.window.ViewerWindow.addDatabase ( Database  database  ) 

Adds a new database to to the array of open databases in this window.

Parameters:
database 
Returns:

Definition at line 154 of file ViewerWindow.java.

References edu.rice.cs.hpc.viewer.window.ViewerWindow.checkService(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.

Referenced by edu.rice.cs.hpc.viewer.experiment.ExperimentView.generateView().

void edu.rice.cs.hpc.viewer.window.ViewerWindow.checkService (  ) 
void edu.rice.cs.hpc.viewer.window.ViewerWindow.dispose (  ) 
void edu.rice.cs.hpc.viewer.window.ViewerWindow.filterAllDatabases ( boolean  filter  )  [private]
String edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePath ( String  filename  ) 

Definition at line 259 of file ViewerWindow.java.

String edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePath ( File  file  ) 
String [] edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePaths (  ) 
Database [] edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabases (  ) 
Database edu.rice.cs.hpc.viewer.window.ViewerWindow.getDb ( String  dbPath  ) 
int edu.rice.cs.hpc.viewer.window.ViewerWindow.getDbNum ( Experiment  experiment  ) 
Experiment [] edu.rice.cs.hpc.viewer.window.ViewerWindow.getExperiments (  ) 
int edu.rice.cs.hpc.viewer.window.ViewerWindow.getNextDbNum (  ) 

Get the next database number to be used in this window.

Returns:

Definition at line 122 of file ViewerWindow.java.

References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.

int edu.rice.cs.hpc.viewer.window.ViewerWindow.getOpenDatabases (  ) 
IWorkbenchWindow edu.rice.cs.hpc.viewer.window.ViewerWindow.getWinObj (  ) 
boolean edu.rice.cs.hpc.viewer.window.ViewerWindow.isDebugMode ( Command  command  )  [private]

check if we are in debug mode for a given command

Parameters:
command 
Returns:

Definition at line 324 of file ViewerWindow.java.

Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.showCCTLabel(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.showFlatLabel().

int edu.rice.cs.hpc.viewer.window.ViewerWindow.removeDatabase ( String  databasePath  ) 

Removes a database from the list of open databases in this window.

Parameters:
databasePath 
Returns:
the current number of database (usually db.size - 1 if no error occurs) <0 if there's an error

Definition at line 167 of file ViewerWindow.java.

References edu.rice.cs.hpc.viewer.window.ViewerWindow.checkService(), edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj, edu.rice.cs.hpc.viewer.window.Database.dispose(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.getDb().

Referenced by edu.rice.cs.hpc.viewer.actions.CloseDatabase.execute().

int edu.rice.cs.hpc.viewer.window.ViewerWindow.reserveDatabaseNumber (  ) 
void edu.rice.cs.hpc.viewer.window.ViewerWindow.setWinObj ( IWorkbenchWindow  window  ) 
boolean edu.rice.cs.hpc.viewer.window.ViewerWindow.showCCTLabel (  ) 

check if we are in debug mode (showing CCT label) or not

Returns:
true if we need to show CCT label

Definition at line 304 of file ViewerWindow.java.

References edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugCCT, and edu.rice.cs.hpc.viewer.window.ViewerWindow.isDebugMode().

Referenced by edu.rice.cs.hpc.viewer.scope.StyledScopeLabelProvider.getText().

boolean edu.rice.cs.hpc.viewer.window.ViewerWindow.showFlatLabel (  ) 

check if we are in debug mode (showing Flat label) or not

Returns:
true if we need to show Flat label

Definition at line 313 of file ViewerWindow.java.

References edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugFlat, and edu.rice.cs.hpc.viewer.window.ViewerWindow.isDebugMode().

Referenced by edu.rice.cs.hpc.viewer.scope.StyledScopeLabelProvider.getText().


Member Data Documentation

The maximum number of performance databases that can be opened in one window.

Definition at line 42 of file ViewerWindow.java.

AtomicInteger edu.rice.cs.hpc.viewer.window.ViewerWindow.numAggregateDatabase = new AtomicInteger(1) [private]

number of databases (whether has been closed or not) this number is useful to make sure the view is always unique

Definition at line 58 of file ViewerWindow.java.

Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.reserveDatabaseNumber().


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1