SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
scl::SNonControlTaskBase Class Referenceabstract

#include <SNonControlTaskBase.hpp>

Inheritance diagram for scl::SNonControlTaskBase:
Inheritance graph
[legend]
Collaboration diagram for scl::SNonControlTaskBase:
Collaboration graph
[legend]

Public Member Functions

 SNonControlTaskBase ()
 
bool init (const std::string &arg_name, const std::string &arg_type, const std::vector< scl::sString2 > &arg_nonstd_params)
 
bool setParentController (const SControllerMultiTask *arg_parent)
 
virtual bool initTaskParams ()=0
 
virtual const std::string & getType () const
 
virtual const std::string & getName () const
 
virtual bool hasBeenInit () const
 

Public Attributes

const SControllerMultiTaskparent_controller_
 
std::string type_task_
 
scl::sBool has_been_activated_
 
std::vector< sString2task_nonstd_params_
 
std::string name_
 
sBool has_been_init_
 

Protected Attributes

std::string type_
 

Detailed Description

Contains all the data required to compute some (arbitrary) non-control related computation.

For instance a logging task could log a ton of data to a stream. Or an I/O task could send the latest model details to a remote location that can render them.

Any arbitrary task works as long as it doesn't require some sort of interference with the controller..

NOTE : YOU CAN NOT USE THIS TASK DATA STRUCTURE DIRECTLY. You must subclass it, re-implement the function: virtual bool initTaskParams()=0; to parse all the custom parameters (from the xml file) stored in task_nonstd_params_. The function must then return true.

Constructor & Destructor Documentation

scl::SNonControlTaskBase::SNonControlTaskBase ( )

Constructor

Member Function Documentation

virtual const std::string& scl::SObject::getName ( ) const
inlinevirtualinherited

Get the object's type

virtual const std::string& scl::SObject::getType ( ) const
inlinevirtualinherited

Get the object's type

virtual bool scl::SObject::hasBeenInit ( ) const
inlinevirtualinherited

Get the object's type

bool scl::SNonControlTaskBase::init ( const std::string &  arg_name,
const std::string &  arg_type,
const std::vector< scl::sString2 > &  arg_nonstd_params 
)

Initialization function.

NOTE : This function also activates the task.

Parameters
arg_nonstd_paramsThese are ignored during SNonControlTaskBase initialization. However, subclasses may choose to use them and/or require various values
virtual bool scl::SNonControlTaskBase::initTaskParams ( )
pure virtual

Processes the task's non standard parameters, which the init() function stores in the task_nonstd_params_.

NOTE: This function is called by init() and must be implemented by all subclasses. Else it will be impossible to initialize the task. Ie. init() will always return false.

Implemented in scl::SNonControlTaskParsedData.

bool scl::SNonControlTaskBase::setParentController ( const SControllerMultiTask arg_parent)

Sets the parent controller

Member Data Documentation

scl::sBool scl::SNonControlTaskBase::has_been_activated_

Whether the task is active or inactive Default = false. True after init()

sBool scl::SObject::has_been_init_
inherited

Whether the object is ready for use

std::string scl::SObject::name_
inherited

The object's name

const SControllerMultiTask* scl::SNonControlTaskBase::parent_controller_

The parent controller

std::vector<sString2> scl::SNonControlTaskBase::task_nonstd_params_

A set of additional options that may be used by users to initialize this specific task. These typically go above and beyond the standard options.

Eg.The parent link and the pos in parent, which are required by op point tasks but not by gc tasks. These will be stored like: task_options_[0].data_[0] = "parent_link"; task_options_[0].data_[1] = "base"; task_options_[1].data_[0] = "pos_in_parent"; task_options_[1].data_[1] = "0.0 0.0 0.0";

std::string scl::SObject::type_
protectedinherited

The object's type. Should only be set by the constructor

std::string scl::SNonControlTaskBase::type_task_

The type of the task


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