task-abstract.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_TASKABSTRACT_H__
11 #define __SOT_TASKABSTRACT_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
18 #include <Eigen/SVD>
19 #include <dynamic-graph/linear-algebra.h>
20 namespace dg = dynamicgraph;
21 
22 /* STD */
23 #include <string>
24 
25 /* SOT */
26 #include "sot/core/api.hh"
27 #include <dynamic-graph/all-signals.h>
28 #include <dynamic-graph/entity.h>
29 #include <sot/core/multi-bound.hh>
30 
31 /* --------------------------------------------------------------------- */
32 /* --- CLASS ----------------------------------------------------------- */
33 /* --------------------------------------------------------------------- */
34 
35 namespace dynamicgraph {
36 namespace sot {
37 
48 
49 class SOT_CORE_EXPORT TaskAbstract : public dg::Entity {
50 public:
51  /* Use a derivative of this class to store computational memory. */
53  public:
55 
56  public:
57  MemoryTaskAbstract(void) : timeLastChange(0){};
58  virtual ~MemoryTaskAbstract(void){};
59 
60  public:
61  virtual void display(std::ostream &os) const = 0;
62  friend std::ostream &operator<<(std::ostream &os,
63  const MemoryTaskAbstract &tcm) {
64  tcm.display(os);
65  return os;
66  }
67  };
68 
69 public:
71 
72 protected:
73  void taskRegistration(void);
74 
75 public:
76  TaskAbstract(const std::string &n);
77 
78 public: /* --- SIGNALS --- */
79  dg::SignalTimeDependent<VectorMultiBound, int> taskSOUT;
80  dg::SignalTimeDependent<dg::Matrix, int> jacobianSOUT;
81 };
82 
83 } /* namespace sot */
84 } /* namespace dynamicgraph */
85 
86 #endif /* #ifndef __SOT_TASKABSTRACT_H__ */
SOT_CORE_EXPORT
#define SOT_CORE_EXPORT
Definition: api.hh:20
multi-bound.hh
dynamicgraph::sot::TaskAbstract::MemoryTaskAbstract
Definition: task-abstract.hh:52
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
dynamicgraph::sot::TaskAbstract::MemoryTaskAbstract::display
virtual void display(std::ostream &os) const =0
dynamicgraph::sot::TaskAbstract
Definition: task-abstract.hh:49
api.hh
dynamicgraph::sot::TaskAbstract::MemoryTaskAbstract::operator<<
friend std::ostream & operator<<(std::ostream &os, const MemoryTaskAbstract &tcm)
Definition: task-abstract.hh:62
dynamicgraph::sot::TaskAbstract::MemoryTaskAbstract::MemoryTaskAbstract
MemoryTaskAbstract(void)
Definition: task-abstract.hh:57
dynamicgraph::sot::TaskAbstract::MemoryTaskAbstract::timeLastChange
int timeLastChange
Definition: task-abstract.hh:54
dynamicgraph::sot::TaskAbstract::taskSOUT
dg::SignalTimeDependent< VectorMultiBound, int > taskSOUT
Definition: task-abstract.hh:79
dynamicgraph::sot::TaskAbstract::memoryInternal
MemoryTaskAbstract * memoryInternal
Definition: task-abstract.hh:70
dynamicgraph::sot::TaskAbstract::jacobianSOUT
dg::SignalTimeDependent< dg::Matrix, int > jacobianSOUT
Definition: task-abstract.hh:80
dynamicgraph::sot::TaskAbstract::MemoryTaskAbstract::~MemoryTaskAbstract
virtual ~MemoryTaskAbstract(void)
Definition: task-abstract.hh:58