kanzi::ResourceProfilingLoadTask Class Reference

Resource profiling wrapper for load task. More...

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

Inheritance diagram for kanzi::ResourceProfilingLoadTask:
kanzi::ResourceManager::LoadTask

Public Member Functions

virtual void loadFunction (const ResourceLoaderThreadContext *context) KZ_OVERRIDE
 Calls loadFunction() of the m_loadTask object and measures its execution time. More...
 
virtual void finishFunction (const ResourceLoaderThreadContext *context) KZ_OVERRIDE
 Calls finishFunction() of the m_loadTask object and measures its execution time. More...
 
virtual ResourceSharedPtr getResult () KZ_OVERRIDE
 Gets the deployed resource. More...
 
- Public Member Functions inherited from kanzi::ResourceManager::LoadTask
 LoadTask ()
 Constructor. More...
 
 LoadTask (const Type type)
 Constructor. More...
 
virtual ~LoadTask ()
 Destructor. More...
 
Type getType () const
 Gets the type of a load task. More...
 
ResourceManagergetResourceManager () const
 Gets the resource manager of a load task. More...
 

Static Public Member Functions

static ProfiledLoadTaskSharedPtr wrapTask (ResourceProfilingDataSampleSharedPtr profilingDataSample, ResourceManager::LoadTaskSharedPtr loadTask)
 Creates a new resource profiling load task. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::ResourceManager::LoadTask
enum  Type { LoadAndFinish, FinishOnly }
 The type of the load task. More...
 
enum  State {
  Initialized, WaitingToLoad, Loading, WaitingForDependencies,
  WaitingToFinish, Finishing, Finished
}
 The state of the load task. More...
 
- Protected Member Functions inherited from kanzi::ResourceManager::LoadTask
void enqueueDependencies (UrlContainer urls)
 Adds resource dependencies for a load task. More...
 

Detailed Description

Resource profiling wrapper for load task.

Use this wrapper to measure the time that the loading task spends loading and deploying resources. The wrapper derives from ResourceManager::LoadTask and implements the load task interface. The original loading task object is passed to the constructor of this class and stored in m_loadTask. The loadFunction() and finishFunction() functions call the corresponding functions of the original object and measure the execution time which is then passed to the corresponding resource profiling contexts.

Member Function Documentation

static ProfiledLoadTaskSharedPtr kanzi::ResourceProfilingLoadTask::wrapTask ( ResourceProfilingDataSampleSharedPtr  profilingDataSample,
ResourceManager::LoadTaskSharedPtr  loadTask 
)
inlinestatic

Creates a new resource profiling load task.

Parameters
profilingDataSampleThe profiling data sample.
loadTaskThe original load task.
virtual void kanzi::ResourceProfilingLoadTask::loadFunction ( const ResourceLoaderThreadContext context)
virtual

Calls loadFunction() of the m_loadTask object and measures its execution time.

Parameters
contextThe context of the loading thread.

Implements kanzi::ResourceManager::LoadTask.

virtual void kanzi::ResourceProfilingLoadTask::finishFunction ( const ResourceLoaderThreadContext context)
virtual

Calls finishFunction() of the m_loadTask object and measures its execution time.

Parameters
contextThe context of the deploying thread.

Implements kanzi::ResourceManager::LoadTask.

virtual ResourceSharedPtr kanzi::ResourceProfilingLoadTask::getResult ( )
virtual

Gets the deployed resource.

Returns
The deployed resource.

Implements kanzi::ResourceManager::LoadTask.


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