Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
dynamicgraph::sot::PoolStorage Class Reference

This singleton class keep tracks of all features and tasks. More...

#include <pool.hh>

Public Types

Define types to simplify the writing
typedef std::map< std::string, TaskAbstract * > Tasks
 Sorted set of tasks with unique key (name). More...
 
typedef std::map< std::string, FeatureAbstract * > Features
 Sorted set of features with unique key (name). More...
 

Public Member Functions

void writeCompletionList (std::ostream &os)
 
void writeGraph (const std::string &aFileName)
 This method write a graph description on the file named FileName. More...
 
 ~PoolStorage (void)
 Default destructor. More...
 
Methods related to the handling of the features
void registerFeature (const std::string &entname, FeatureAbstract *ent)
 Registering a feature. More...
 
FeatureAbstractgetFeature (const std::string &name)
 Get a reference to a feature. More...
 
Methods related to the handling of the tasks
void registerTask (const std::string &entname, TaskAbstract *ent)
 Registering a task. More...
 
TaskAbstractgetTask (const std::string &name)
 Get a reference to a task. More...
 

Static Public Member Functions

static void destroy ()
 destroy unique instance of the class More...
 
static PoolStoragegetInstance ()
 Get unique instance of the class. More...
 

Protected Attributes

Fields of the class to manage the three entities.

Also the name is singular, those are true sets.

Tasks task
 Set of controllers. More...
 
Features feature
 Set of features. More...
 

Private Member Functions

 PoolStorage ()
 

Static Private Attributes

static PoolStorageinstance_
 

Detailed Description

This singleton class keep tracks of all features and tasks.

Three kinds of objects are handled:

This class provides the necessary operations to register, unregister each instance of thoses classes. As tasks and features derived from Entities, they should be registered as such.

Note
From the code it is not very clear why we should not unregister from the tasks and the features...

The role of this class is also to look for the object supporting a command, and to apply this command.

It also returns references to signals from their fully-qualified names.

Definition at line 63 of file pool.hh.

Member Typedef Documentation

◆ Features

Sorted set of features with unique key (name).

Definition at line 72 of file pool.hh.

◆ Tasks

typedef std::map<std::string, TaskAbstract *> dynamicgraph::sot::PoolStorage::Tasks

Sorted set of tasks with unique key (name).

Definition at line 69 of file pool.hh.

Constructor & Destructor Documentation

◆ ~PoolStorage()

dynamicgraph::sot::PoolStorage::~PoolStorage ( void  )

Default destructor.

◆ PoolStorage()

dynamicgraph::sot::PoolStorage::PoolStorage ( )
private

Member Function Documentation

◆ destroy()

static void dynamicgraph::sot::PoolStorage::destroy ( )
static

destroy unique instance of the class

◆ getFeature()

FeatureAbstract & dynamicgraph::sot::PoolStorage::getFeature ( const std::string &  name)

Get a reference to a feature.

Definition at line 82 of file pool.cpp.

◆ getInstance()

static PoolStorage* dynamicgraph::sot::PoolStorage::getInstance ( )
static

Get unique instance of the class.

◆ getTask()

TaskAbstract & dynamicgraph::sot::PoolStorage::getTask ( const std::string &  name)

Get a reference to a task.

Definition at line 55 of file pool.cpp.

◆ registerFeature()

void dynamicgraph::sot::PoolStorage::registerFeature ( const std::string &  entname,
FeatureAbstract ent 
)

Registering a feature.

Definition at line 66 of file pool.cpp.

◆ registerTask()

void dynamicgraph::sot::PoolStorage::registerTask ( const std::string &  entname,
TaskAbstract ent 
)

Registering a task.

Definition at line 40 of file pool.cpp.

◆ writeCompletionList()

void dynamicgraph::sot::PoolStorage::writeCompletionList ( std::ostream &  os)

◆ writeGraph()

void dynamicgraph::sot::PoolStorage::writeGraph ( const std::string &  aFileName)

This method write a graph description on the file named FileName.

Member Data Documentation

◆ feature

Features dynamicgraph::sot::PoolStorage::feature
protected

Set of features.

Definition at line 85 of file pool.hh.

◆ instance_

PoolStorage* dynamicgraph::sot::PoolStorage::instance_
staticprivate

Definition at line 124 of file pool.hh.

◆ task

Tasks dynamicgraph::sot::PoolStorage::task
protected

Set of controllers.

Definition at line 82 of file pool.hh.


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


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:27