VizKit  3.3.7
Classes | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
VizKit::VisualTiming Class Reference

Provides facilities to deal with and calculate time values. More...

#include <VisualTiming.h>

List of all members.

Classes

struct  DurationItem
 A data entry that stores timing values of a duration item. More...

Static Public Member Functions

static void dispose (void)
 Disposes the visual timing.
static void update (void)
 Refreshes the current timestamp.
static uint32 getElapsedMilliSecsSinceReset (const char *const durationName)
 Returns the number of milliseconds that have elapsed since first call of the duration item.
static uint32 getElapsedMilliSecsSinceReset (const VisualItemIdentifier &visualDurationIdentifier)
 Returns the number of milliseconds that have elapsed since first call of the duration item.
static uint32 getElapsedMilliSecsSinceLastCall (const char *const durationName)
 Returns the number of milliseconds that have elapsed since the last call of the duration item.
static uint32 getElapsedMilliSecsSinceLastCall (const VisualItemIdentifier &visualDurationIdentifier)
 Returns the number of milliseconds that have elapsed since the last call of the duration item.
static void resetTimestamp (const char *const durationName)
 Resets the stored timing values for this duration item.
static void resetTimestamp (const VisualItemIdentifier &visualDurationIdentifier)
 Resets the stored timing values for this duration item.
static const char *const getCurrentMillisecsDateTime (void)
 Returns the current date and time including milliseconds.
static void addDurationItemToDurationMap (const VisualItemIdentifier &visualDurationIdentifier)
 Adds a duration item to the duration map.

Private Types

typedef std::map
< VisualItemIdentifier,
DurationItem * > 
DurationMap
 A DurationMap is a map of duration items.
typedef DurationMap::iterator DurationMapIterator
 A DurationMapIterator is the iterator of a DurationMap.

Private Member Functions

 VisualTiming ()
 The constructor.
 ~VisualTiming ()
 The destructor.
 VisualTiming (const VisualTiming &other)
 Copy constructor.
VisualTimingoperator= (const VisualTiming &other)
 Assignment operator.

Static Private Member Functions

static VisualTiminggetInstance (void)
 Returns a pointer to the VisualTiming.

Private Attributes

DurationMap durationMap
 The map of the duration items.
char dateTimeStr [32]
 The frequency of QueryPerformanceFrequency.

Static Private Attributes

static VisualTimingtheVisualTiming = NULL
 Returns the difference between one timestamp and another.

Detailed Description

Provides facilities to deal with and calculate time values.

All public methods are declared static.


Member Typedef Documentation

A DurationMap is a map of duration items.

typedef DurationMap::iterator VizKit::VisualTiming::DurationMapIterator [private]

A DurationMapIterator is the iterator of a DurationMap.


Constructor & Destructor Documentation

The constructor.

VisualTiming is a singleton class. The constructor is private. New instance of class can only be created internally.

The destructor.

VizKit::VisualTiming::VisualTiming ( const VisualTiming other) [private]

Copy constructor.

Parameters:
otherAnother VisualTiming.
Remarks:
Explicitely declared in private section and not implemented to enforce uniqueness of singleton pattern.

Member Function Documentation

void VisualTiming::addDurationItemToDurationMap ( const VisualItemIdentifier visualDurationIdentifier) [static]

Adds a duration item to the duration map.

Parameters:
visualDurationIdentifierThe identifier of the duration item.
void VisualTiming::dispose ( void  ) [static]

Disposes the visual timing.

const char *const VisualTiming::getCurrentMillisecsDateTime ( void  ) [static]

Returns the current date and time including milliseconds.

The date and time are represented as YYYYMMDDHHMISS000 (year-month-day-hour-minute-seconds-milliseconds).

uint32 VisualTiming::getElapsedMilliSecsSinceLastCall ( const char *const  durationName) [static]

Returns the number of milliseconds that have elapsed since the last call of the duration item.

Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the last render call.

Parameters:
durationNameThe identifier of the duration.
Returns:
The number of milliseconds that have elapsed since the last call.
uint32 VisualTiming::getElapsedMilliSecsSinceLastCall ( const VisualItemIdentifier visualDurationIdentifier) [static]

Returns the number of milliseconds that have elapsed since the last call of the duration item.

Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the last render call.

Parameters:
visualDurationIdentifierThe identifier of the duration.
Returns:
The number of milliseconds that have elapsed since the last call.
uint32 VisualTiming::getElapsedMilliSecsSinceReset ( const char *const  durationName) [static]

Returns the number of milliseconds that have elapsed since first call of the duration item.

Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the duration item first asked for its elapsed milliseconds.

Parameters:
durationNameThe identifier of the duration.
Returns:
The number of milliseconds that have elapsed since first call of the duration item.
uint32 VisualTiming::getElapsedMilliSecsSinceReset ( const VisualItemIdentifier visualDurationIdentifier) [static]

Returns the number of milliseconds that have elapsed since first call of the duration item.

Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the duration item first asked for its elapsed milliseconds.

Parameters:
visualDurationIdentifierThe identifier of the duration.
Returns:
The number of milliseconds that have elapsed since first call of the duration item.
VisualTiming * VisualTiming::getInstance ( void  ) [static, private]

Returns a pointer to the VisualTiming.

Initializes VisualTiming if neccessary. VisualTiming is a singleton.

Returns:
A pointer to the VisualTiming.
VisualTiming& VizKit::VisualTiming::operator= ( const VisualTiming other) [private]

Assignment operator.

Remarks:
Explicitely declared in private section and not implemented to enforce uniqueness of singleton pattern.
void VisualTiming::resetTimestamp ( const char *const  durationName) [static]

Resets the stored timing values for this duration item.

Time is measured individually for single duration items. The duration items are itentified by name. This function resets the timing values for this duration item.

Parameters:
durationNameThe identifier of the duration.
void VisualTiming::resetTimestamp ( const VisualItemIdentifier visualDurationIdentifier) [static]

Resets the stored timing values for this duration item.

Time is measured individually for single duration items. The duration items are itentified by name. This function resets the timing values for this duration item.

Parameters:
visualDurationIdentifierThe identifier of the duration.
void VisualTiming::update ( void  ) [static]

Refreshes the current timestamp.


Member Data Documentation

The frequency of QueryPerformanceFrequency.

Windows only. A string representing date and time (YYYYMMDDHHMISS).

The map of the duration items.

VisualTiming * VisualTiming::theVisualTiming = NULL [static, private]

Returns the difference between one timestamp and another.

Parameters:
young_timestampThe timestamp that was recorded before old_timestamp.
old_timestampThe timestamp that was recorded after young_timestamp.
Returns:
The difference between young_timestamp and old_timestamp. The timestamp of the current render call. VisualTiming is a singleton class. Pointer to private instance is handled internally.

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

Generated on Sun May 3 2015 20:26:31 for VizKit by doxygen 1.8.0