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:
kanzi::GenericResourceProfilingContext::Sampler kanzi::NamedResourceProfilingContext::Sampler kanzi::ResourceProfilingAcquireContext::Sampler kanzi::ResourceProfilingDeployContext::Sampler kanzi::ResourceProfilingLoadContext::Sampler kanzi::ResourceProfilingMainLoopContext::Sampler

Public Member Functions

 AbstractSampler (ResourceProfilingContextFactory &factory)
 The constructor. More...
 
virtual ~AbstractSampler ()
 Destructor. More...
 
ResourceProfilingContextSharedPtr getContext ()
 Gets the resource profiling context created by this sampler. 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

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

The constructor.

Parameters
factoryThe resource profiling context factory.
virtual kanzi::ResourceProfilingContextFactory::AbstractSampler::~AbstractSampler ( )
virtual

Destructor.

Member Function Documentation

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()
virtual ResourceProfilingContextSharedPtr kanzi::ResourceProfilingContextFactory::AbstractSampler::createContextOverride ( ResourceProfilingContext::TimeStamp  entryTimeStamp)
protectedpure virtual

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