Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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:
Singleton< CProfileViewer >

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...
 
CScriptVal 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.

Definition at line 130 of file ProfileViewer.h.

Constructor & Destructor Documentation

CProfileViewer::CProfileViewer ( )

Definition at line 140 of file ProfileViewer.cpp.

CProfileViewer::~CProfileViewer ( )

Definition at line 146 of file ProfileViewer.cpp.

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.

Definition at line 397 of file ProfileViewer.cpp.

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.

Definition at line 324 of file ProfileViewer.cpp.

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.

Definition at line 387 of file ProfileViewer.cpp.

void CProfileViewer::RenderProfile ( )

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

Definition at line 153 of file ProfileViewer.cpp.

void CProfileViewer::SaveToFile ( )

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

Definition at line 552 of file ProfileViewer.cpp.

CScriptVal CProfileViewer::SaveToJS ( ScriptInterface scriptInterface)

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

Definition at line 588 of file ProfileViewer.cpp.

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.

Definition at line 600 of file ProfileViewer.cpp.

Friends And Related Function Documentation

friend class AbstractProfileTable
friend

Definition at line 132 of file ProfileViewer.h.

Member Data Documentation

CProfileViewerInternals* CProfileViewer::m
private

Definition at line 202 of file ProfileViewer.h.


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