SourceXtractorPlusPlus  0.13
Please provide a description of the project.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SourceXtractor::TaskProvider Class Reference

#include <TaskProvider.h>

Collaboration diagram for SourceXtractor::TaskProvider:
[legend]

Public Member Functions

virtual ~TaskProvider ()=default
 Destructor. More...
 
 TaskProvider (std::shared_ptr< TaskFactoryRegistry > task_factory_registry)
 
template<class T >
std::shared_ptr< const T > getTask (const PropertyId &property_id) const
 Template version of getTask() that includes casting the returned pointer to the appropriate type. More...
 

Protected Member Functions

virtual std::shared_ptr< const TaskgetTask (const PropertyId &property_id) const
 Requests a Task that will be used to compute the property corresponding to the property_id. More...
 

Private Attributes

std::shared_ptr< TaskFactoryRegistrym_task_factory_registry
 
std::unordered_map< PropertyId, std::shared_ptr< Task > > m_tasks
 

Detailed Description

Definition at line 42 of file TaskProvider.h.

Constructor & Destructor Documentation

◆ ~TaskProvider()

virtual SourceXtractor::TaskProvider::~TaskProvider ( )
virtualdefault

Destructor.

◆ TaskProvider()

SourceXtractor::TaskProvider::TaskProvider ( std::shared_ptr< TaskFactoryRegistry task_factory_registry)
inline

Definition at line 49 of file TaskProvider.h.

Member Function Documentation

◆ getTask() [1/2]

template<class T >
std::shared_ptr<const T> SourceXtractor::TaskProvider::getTask ( const PropertyId property_id) const
inline

Template version of getTask() that includes casting the returned pointer to the appropriate type.

Definition at line 54 of file TaskProvider.h.

◆ getTask() [2/2]

std::shared_ptr< const Task > SourceXtractor::TaskProvider::getTask ( const PropertyId property_id) const
protectedvirtual

Requests a Task that will be used to compute the property corresponding to the property_id.

Definition at line 33 of file TaskProvider.cpp.

References SourceXtractor::PropertyId::getTypeId(), std::lock(), m_task_factory_registry, and m_tasks.

Here is the call graph for this function:

Member Data Documentation

◆ m_task_factory_registry

std::shared_ptr<TaskFactoryRegistry> SourceXtractor::TaskProvider::m_task_factory_registry
private

Definition at line 62 of file TaskProvider.h.

Referenced by getTask().

◆ m_tasks

std::unordered_map<PropertyId, std::shared_ptr<Task> > SourceXtractor::TaskProvider::m_tasks
private

Definition at line 63 of file TaskProvider.h.

Referenced by getTask().


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