Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::CProfileScope Class Reference

Class where the objects profile their own life-time. More...

#include <nirtcpp/core/engine/IProfiler.hpp>

Collaboration diagram for nirt::CProfileScope:
Collaboration graph

Public Member Functions

 CProfileScope (s32 id)
 Construct with an known id.
 
 CProfileScope (s32 id, const core::stringw &name, const core::stringw &groupName)
 Object will create the given name, groupName combination for the id if it doesn't exist already.
 
 CProfileScope (const core::stringw &name, const core::stringw &groupName)
 Object will create an id for the given name, groupName combination if they don't exist already.
 

Protected Attributes

s32 Id
 
IProfilerProfiler
 

Detailed Description

Class where the objects profile their own life-time.

This is a comfort wrapper around the IProfiler start/stop mechanism which is easier to use when you want to profile a scope. You only have to create an object and it will profile it's own lifetime for the given id.

Constructor & Destructor Documentation

◆ CProfileScope() [1/3]

nirt::CProfileScope::CProfileScope ( s32  id)
inline

Construct with an known id.

This is the fastest scope constructor, but the id must have been added before.

Parameters
idAny id which you did add to the profiler before.

◆ CProfileScope() [2/3]

nirt::CProfileScope::CProfileScope ( s32  id,
const core::stringw name,
const core::stringw groupName 
)
inline

Object will create the given name, groupName combination for the id if it doesn't exist already.

Parameters
idShould be >= 0 as negative id's are reserved for Nirtcpp. Also very large numbers (near INT_MAX) might have been created already by the automatic add function of ::IProfiler.
nameName for displaying profile data.
groupNameEach id belongs into a group - this helps on displaying profile data.

◆ CProfileScope() [3/3]

nirt::CProfileScope::CProfileScope ( const core::stringw name,
const core::stringw groupName 
)
inline

Object will create an id for the given name, groupName combination if they don't exist already.

Slowest scope constructor, but usually still fine unless speed is very critical.

Parameters
nameName for displaying profile data.
groupNameEach id belongs into a group - this helps on displaying profile data.

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

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print