Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::ResourceProfilingContextFactory::AbstractSampler Class Referenceabstract

Abstract resource profiling context sampler. More...

#include <kanzi/core.ui/resource/resource_profiling_context_factory.hpp>

Inheritance diagram for kanzi::ResourceProfilingContextFactory::AbstractSampler:
[legend]

Public Member Functions

 AbstractSampler (ResourceProfilingContextFactory &factory)
 The constructor. More...
 
ResourceProfilingContextSharedPtr getContext ()
 Gets the resource profiling context created by this sampler. More...
 
virtual ~AbstractSampler ()
 Destructor. More...
 

Protected Member Functions

virtual ResourceProfilingContextSharedPtr createContextOverride (ResourceProfilingContext::TimeStamp entryTimeStamp)=0
 Creates a resource profiling context. More...
 

Detailed Description

Abstract resource profiling context sampler.

Base class for all context samplers. To create a sampler call the kzResourceProfilingContextSampler() macro inside the scope which may trigger loading or deployment of resources during its execution. If the resource loading or deployment occurs during the execution of the scope, the sampler creates the corresponding context.

See also
kzResourceProfilingContextSampler()

Constructor & Destructor Documentation

◆ AbstractSampler()

kanzi::ResourceProfilingContextFactory::AbstractSampler::AbstractSampler ( ResourceProfilingContextFactory factory)
explicit

The constructor.

Parameters
factoryThe resource profiling context factory.

◆ ~AbstractSampler()

virtual kanzi::ResourceProfilingContextFactory::AbstractSampler::~AbstractSampler ( )
virtual

Destructor.

Member Function Documentation

◆ getContext()

ResourceProfilingContextSharedPtr kanzi::ResourceProfilingContextFactory::AbstractSampler::getContext ( )

Gets the resource profiling context created by this sampler.

When this function is called for the first time, it creates the resource profiling context using the createContextOverride() function.

Returns
The resource profiling context created by this sampler.
See also
createContextOverride()

◆ createContextOverride()

virtual ResourceProfilingContextSharedPtr kanzi::ResourceProfilingContextFactory::AbstractSampler::createContextOverride ( ResourceProfilingContext::TimeStamp  entryTimeStamp)
protectedpure virtual

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