CoriEngine
Loading...
Searching...
No Matches
Cori::Profiling::Trackable< DerivedType, BasePack > Class Template Reference

For InstanceMetrics to work with a type it should derive from this. More...

#include <Trackable.hpp>

Public Member Functions

 Trackable (const Trackable &)=delete
Trackableoperator= (const Trackable &)=delete
 Trackable (Trackable &&)=delete
Trackableoperator= (Trackable &&)=delete

Protected Member Functions

 Trackable ()
 ~Trackable ()

Detailed Description

template<typename DerivedType, typename... BasePack>
class Cori::Profiling::Trackable< DerivedType, BasePack >

For InstanceMetrics to work with a type it should derive from this.

Template Parameters
DerivedTypeClass type you're deriving Trackable for. Example: class Example : public Trackable<Example>
BasePackOptional parameter, the types for whom DerivedType will be considered a derived class when using InstanceMetrics. Can be several types.

Some examples:
I have a class called OpenGLTexture2D, and it is defined something like this:
|–|class OpenGLTexture2D final : public Texture2D, public Profiling::Trackable<OpenGLTexture2D, Texture2D, Texture>
This way it will be considered derived for Texture2D and Texture in InstanceMetrics.
And calling:
|–|ProfilingInstanceMetrics<Graphics::Texture>::Report();
Will report you data about OpenGLTexture2D, and also calling:
|–|ProfilingInstanceMetrics<Graphics::Texture2D>::Report();
Will report you data about OpenGLTexture2D.
Also when defining a class like this:
|–|class SpriteAtlas : public Profiling::Trackable<SpriteAtlas>
Calling:
|–|ProfilingInstanceMetrics<Graphics::SpriteAtlas>::Report();
Will report the data about SpriteAtlas instances.

Definition at line 29 of file Trackable.hpp.

Constructor & Destructor Documentation

◆ Trackable() [1/3]

template<typename DerivedType, typename... BasePack>
Cori::Profiling::Trackable< DerivedType, BasePack >::Trackable ( const Trackable< DerivedType, BasePack > & )
delete
Here is the call graph for this function:

◆ Trackable() [2/3]

template<typename DerivedType, typename... BasePack>
Cori::Profiling::Trackable< DerivedType, BasePack >::Trackable ( Trackable< DerivedType, BasePack > && )
delete
Here is the call graph for this function:

◆ Trackable() [3/3]

template<typename DerivedType, typename... BasePack>
Cori::Profiling::Trackable< DerivedType, BasePack >::Trackable ( )
inlineprotected

Definition at line 37 of file Trackable.hpp.

Here is the call graph for this function:

◆ ~Trackable()

template<typename DerivedType, typename... BasePack>
Cori::Profiling::Trackable< DerivedType, BasePack >::~Trackable ( )
inlineprotected

Definition at line 42 of file Trackable.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

template<typename DerivedType, typename... BasePack>
Trackable & Cori::Profiling::Trackable< DerivedType, BasePack >::operator= ( const Trackable< DerivedType, BasePack > & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

template<typename DerivedType, typename... BasePack>
Trackable & Cori::Profiling::Trackable< DerivedType, BasePack >::operator= ( Trackable< DerivedType, BasePack > && )
delete
Here is the call graph for this function:

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