edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter Class Reference

Inheritance diagram for edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter:
Inheritance graph
[legend]
Collaboration diagram for edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setMetric (BaseMetric newMetric)
 Update the metric for this column.
 ColumnViewerSorter (TreeViewer viewer, TreeColumn column, BaseMetric newMetric, int colNum)
 Class to sort a column.
void setSorter (ColumnViewerSorter sorter, int direction)
 Sort the column according to the direction.
int compare (Viewer viewer, Object e1, Object e2)
 general comparison for sorting
void sort (Viewer viewer, Object[] elements)

Static Public Attributes

static final int ASC = 1
static final int NONE = 0
static final int DESC = -1

Protected Member Functions

int doCompare (Viewer viewer, Object e1, Object e2)
 This method is to compare one object to another Please implement this method in the child class if necessary.

Private Member Functions

int doCompare (Scope node1, Scope node2)
 Compare the names of node 1 and node 2.

Private Attributes

int direction = 0
TreeColumn column
TreeViewer viewer
int iColNumber
BaseMetric metric

Detailed Description

Definition at line 24 of file ColumnViewerSorter.java.


Constructor & Destructor Documentation

edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ColumnViewerSorter ( TreeViewer  viewer,
TreeColumn  column,
BaseMetric  newMetric,
int  colNum 
)

Member Function Documentation

int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.compare ( Viewer  viewer,
Object  e1,
Object  e2 
)
int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare ( Viewer  viewer,
Object  e1,
Object  e2 
) [protected]
int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare ( Scope  node1,
Scope  node2 
) [private]

Compare the names of node 1 and node 2.

However, if both scopes are of type CallSiteScope, compare the line numbers of the nodes

Parameters:
node1 
node2 
Returns:

Definition at line 145 of file ColumnViewerSorter.java.

References edu.rice.cs.hpc.data.experiment.scope.LineScope.getLineNumber(), edu.rice.cs.hpc.data.experiment.scope.CallSiteScope.getLineScope(), and edu.rice.cs.hpc.data.experiment.scope.Scope.getName().

Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.compare(), and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare().

void edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setMetric ( BaseMetric  newMetric  ) 

Update the metric for this column.

Parameters:
newMetric 

Definition at line 40 of file ColumnViewerSorter.java.

References edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.metric.

Referenced by edu.rice.cs.hpc.viewer.scope.BaseScopeView.initTableColumns().

void edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter ( ColumnViewerSorter  sorter,
int  direction 
)
void edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.sort ( Viewer  viewer,
Object[]  elements 
)

Definition at line 188 of file ColumnViewerSorter.java.


Member Data Documentation


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

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1