te::process::DataAccessTask Class Reference

#include <DataAccessTaskProcess.h>

Inheritance diagram for te::process::DataAccessTask:
te::process::Task

Public Types

enum class  State {
  NOT_INITIALIZED , MISSING_PARAMETERS , READY_TO_RUN , RUNNING ,
  FINISHED , FINISHED_WITH_ERRORS
}
 

Public Member Functions

void addConnector (Connector *connector)
 Removes a parameter connector to this class. More...
 
 DataAccessTask ()
 
const TaskCapabilitiesgetCapabilities () const
 Gets the current execution state of the task. More...
 
std::string getDataSourceType ()
 
const std::string & getId () const
 
std::vector< Connector * > getInputConnectors () const
 Gets all the output connectors. More...
 
std::vector< Connector * > getOutputConnectors () const
 Checks if the task is valid, that is, if all the required input parameters have values OR connectors associated to them. More...
 
const te::process::ParameterValuegetParameter (std::size_t index) const
 Sets the index-th parameter. This object will optionally take the ownership of the value pointer. More...
 
State getState () const
 Gets the index-th parameter. More...
 
const TaskParametersgetTaskParameters () const
 Sets the task paramters. This class will take the ownership of the given pointer. More...
 
const std::string & getType () const
 Gets the capabilities of the task. More...
 
bool isValid (std::string &errorMessage) const
 Runs the task. More...
 
void removeConnector (Connector *connector)
 Gets all the input connectors. More...
 
void run ()
 
void setDataSourceType (const std::string &type)
 
void setId (const std::string &id)
 Gets the type of the task. More...
 
void setParameter (std::size_t index, te::process::ParameterValue *value, bool takeOwnership)
 Gets the task paramters. More...
 
void setTaskParameters (TaskParameters *taskParameters)
 Adds a parameter connector to this class. More...
 

Protected Member Functions

bool checkConnectorsAreReady ()
 Pushes the parameters into the output connectors. More...
 
void checkForReadyToRun ()
 Runs the task. More...
 
void init (TaskCapabilities *capabilities)
 < Initializes the task. This function must be called by any class that extends this abstraction. The abstraction will take the ownership of the pointer More...
 
void pushParametersToConnectors ()
 This function is called whenever the parameters are changed and is responsible for checking the parameters are valid. If they are, change the task state to Ready to Run. More...
 
void runImpl ()
 

Protected Attributes

std::unique_ptr< TaskCapabilitiesm_capabilities
 
std::vector< Connector * > m_connectors
 
std::string m_driver
 
std::string m_id
 The ID of the task. More...
 
std::unique_ptr< TaskParametersm_parameters
 
State m_state
 
std::string m_taskType
 The type of the task. Used by the factory. More...
 

Detailed Description

Definition at line 37 of file DataAccessTaskProcess.h.

Member Enumeration Documentation

◆ State

enum te::process::Task::State
stronginherited
Enumerator
NOT_INITIALIZED 
MISSING_PARAMETERS 
READY_TO_RUN 
RUNNING 
FINISHED 
FINISHED_WITH_ERRORS 

Definition at line 57 of file Task.h.

Constructor & Destructor Documentation

◆ DataAccessTask()

te::process::DataAccessTask::DataAccessTask ( )

Member Function Documentation

◆ addConnector()

void te::process::Task::addConnector ( Connector connector)
inherited

Removes a parameter connector to this class.

◆ checkConnectorsAreReady()

bool te::process::Task::checkConnectorsAreReady ( )
protectedinherited

Pushes the parameters into the output connectors.

◆ checkForReadyToRun()

void te::process::Task::checkForReadyToRun ( )
protectedinherited

Runs the task.

◆ getCapabilities()

const TaskCapabilities* te::process::Task::getCapabilities ( ) const
inherited

Gets the current execution state of the task.

◆ getDataSourceType()

std::string te::process::DataAccessTask::getDataSourceType ( )

◆ getId()

const std::string& te::process::Task::getId ( ) const
inherited

◆ getInputConnectors()

std::vector<Connector*> te::process::Task::getInputConnectors ( ) const
inherited

Gets all the output connectors.

◆ getOutputConnectors()

std::vector<Connector*> te::process::Task::getOutputConnectors ( ) const
inherited

Checks if the task is valid, that is, if all the required input parameters have values OR connectors associated to them.

◆ getParameter()

const te::process::ParameterValue* te::process::Task::getParameter ( std::size_t  index) const
inherited

Sets the index-th parameter. This object will optionally take the ownership of the value pointer.

◆ getState()

State te::process::Task::getState ( ) const
inherited

Gets the index-th parameter.

◆ getTaskParameters()

const TaskParameters* te::process::Task::getTaskParameters ( ) const
inherited

Sets the task paramters. This class will take the ownership of the given pointer.

◆ getType()

const std::string& te::process::Task::getType ( ) const
inherited

Gets the capabilities of the task.

◆ init()

void te::process::Task::init ( TaskCapabilities capabilities)
protectedinherited

< Initializes the task. This function must be called by any class that extends this abstraction. The abstraction will take the ownership of the pointer

Checks if all the input connectors are ready. If at least one connector is not ready, it returns FALSE.

◆ isValid()

bool te::process::Task::isValid ( std::string &  errorMessage) const
inherited

Runs the task.

◆ pushParametersToConnectors()

void te::process::Task::pushParametersToConnectors ( )
protectedinherited

This function is called whenever the parameters are changed and is responsible for checking the parameters are valid. If they are, change the task state to Ready to Run.

◆ removeConnector()

void te::process::Task::removeConnector ( Connector connector)
inherited

Gets all the input connectors.

◆ run()

void te::process::Task::run ( )
inherited

◆ runImpl()

void te::process::DataAccessTask::runImpl ( )
protectedvirtual

Implements te::process::Task.

◆ setDataSourceType()

void te::process::DataAccessTask::setDataSourceType ( const std::string &  type)

◆ setId()

void te::process::Task::setId ( const std::string &  id)
inherited

Gets the type of the task.

◆ setParameter()

void te::process::Task::setParameter ( std::size_t  index,
te::process::ParameterValue value,
bool  takeOwnership 
)
inherited

Gets the task paramters.

◆ setTaskParameters()

void te::process::Task::setTaskParameters ( TaskParameters taskParameters)
inherited

Adds a parameter connector to this class.

Member Data Documentation

◆ m_capabilities

std::unique_ptr<TaskCapabilities> te::process::Task::m_capabilities
protectedinherited

Definition at line 136 of file Task.h.

◆ m_connectors

std::vector<Connector*> te::process::Task::m_connectors
protectedinherited

Definition at line 138 of file Task.h.

◆ m_driver

std::string te::process::DataAccessTask::m_driver
protected

Definition at line 53 of file DataAccessTaskProcess.h.

◆ m_id

std::string te::process::Task::m_id
protectedinherited

The ID of the task.

Definition at line 134 of file Task.h.

◆ m_parameters

std::unique_ptr<TaskParameters> te::process::Task::m_parameters
protectedinherited

Definition at line 137 of file Task.h.

◆ m_state

State te::process::Task::m_state
protectedinherited

Definition at line 135 of file Task.h.

◆ m_taskType

std::string te::process::Task::m_taskType
protectedinherited

The type of the task. Used by the factory.

Definition at line 133 of file Task.h.


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