Pyrogenesis  trunk
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
CProfileViewer Class Reference

Class CProfileViewer: Manage and display profiling tables. More...

#include <ProfileViewer.h>

Inheritance diagram for CProfileViewer:
Inheritance graph
[legend]
Collaboration diagram for CProfileViewer:
Collaboration graph
[legend]

Public Member Functions

 CProfileViewer ()
 
 ~CProfileViewer ()
 
void RenderProfile ()
 RenderProfile: Render the profile display using OpenGL if the user has enabled it. More...
 
InReaction Input (const SDL_Event_ *ev)
 Input: Filter and handle any input events that the profile display is interested in. More...
 
void AddRootTable (AbstractProfileTable *table, bool front=false)
 AddRootTable: Add a new profile table as a root table (i.e. More...
 
void SaveToFile ()
 SaveToFile: Save the current profiler data (for all profile tables) to a file in the 'logs' directory. More...
 
JS::Value SaveToJS (ScriptInterface &scriptInterface)
 SaveToJS: Return a script value containing the current profiler data (for all profile tables). More...
 
void ShowTable (const CStr &table)
 ShowTable: Set the named profile table to be the displayed one. More...
 
- Public Member Functions inherited from Singleton< CProfileViewer >
 Singleton ()
 
 ~Singleton ()
 

Static Public Member Functions

static InReaction InputThunk (const SDL_Event_ *ev)
 InputThunk: Delegate to the singleton's Input() member function if the singleton has been initialized. More...
 
- Static Public Member Functions inherited from Singleton< CProfileViewer >
static CProfileViewerGetSingleton ()
 
static CProfileViewerGetSingletonPtr ()
 
static bool IsInitialised ()
 

Private Attributes

CProfileViewerInternalsm
 

Friends

class AbstractProfileTable
 

Detailed Description

Class CProfileViewer: Manage and display profiling tables.

Constructor & Destructor Documentation

CProfileViewer::CProfileViewer ( )
CProfileViewer::~CProfileViewer ( )

Member Function Documentation

void CProfileViewer::AddRootTable ( AbstractProfileTable table,
bool  front = false 
)

AddRootTable: Add a new profile table as a root table (i.e.

the tables that you cycle through via the profile hotkey).

Note
Tables added via this function are automatically removed from the list of root tables when they are deleted.
Parameters
tableThis table is added as a root table.
frontIf true then the table will be the new first in the list, else it will be the last.
InReaction CProfileViewer::Input ( const SDL_Event_ ev)

Input: Filter and handle any input events that the profile display is interested in.

In particular, this function handles enable/disable of the profile display as well as navigating the information tree.

Parameters
evThe incoming event.
Returns
IN_PASS or IN_HANDLED depending on whether the event relates to the profiling display.
InReaction CProfileViewer::InputThunk ( const SDL_Event_ ev)
static

InputThunk: Delegate to the singleton's Input() member function if the singleton has been initialized.

This allows our input handler to be installed via in_add_handler like a normal, global function input handler.

void CProfileViewer::RenderProfile ( )

RenderProfile: Render the profile display using OpenGL if the user has enabled it.

void CProfileViewer::SaveToFile ( )

SaveToFile: Save the current profiler data (for all profile tables) to a file in the 'logs' directory.

JS::Value CProfileViewer::SaveToJS ( ScriptInterface scriptInterface)

SaveToJS: Return a script value containing the current profiler data (for all profile tables).

void CProfileViewer::ShowTable ( const CStr &  table)

ShowTable: Set the named profile table to be the displayed one.

If it is not found, no profile is displayed.

Parameters
tableThe table name (matching AbstractProfileTable::GetName), or the empty string to display no table.

Friends And Related Function Documentation

friend class AbstractProfileTable
friend

Member Data Documentation

CProfileViewerInternals* CProfileViewer::m
private

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