reader.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_TRACER_H__
11 #define __SOT_TRACER_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
19 
20 /* STD */
21 #include <boost/function.hpp>
22 #include <fstream>
23 #include <list>
24 #include <string>
25 #include <vector>
26 
27 /* SOT & DG*/
28 #include <dynamic-graph/entity.h>
33 
34 #include <sot/core/flags.hh>
35 
36 /* --------------------------------------------------------------------- */
37 /* --- API ------------------------------------------------------------- */
38 /* --------------------------------------------------------------------- */
39 
40 #if defined(WIN32)
41 #if defined(reader_EXPORTS)
42 #define SOTREADER_EXPORT __declspec(dllexport)
43 #else
44 #define SOTREADER_EXPORT __declspec(dllimport)
45 #endif
46 #else
47 #define SOTREADER_EXPORT
48 #endif
49 
50 /* --------------------------------------------------------------------- */
51 /* --- TRACER ---------------------------------------------------------- */
52 /* --------------------------------------------------------------------- */
53 
54 namespace dynamicgraph {
55 namespace sot {
56 
59 
60  public:
64 
65  public:
66  sotReader(const std::string n);
67  virtual ~sotReader(void) {}
68 
69  void load(const std::string &filename);
70  void clear(void);
71  void rewind(void);
72 
73  protected:
74  typedef std::list<std::vector<double> > DataType;
76  DataType::const_iterator currentData;
78 
80 
82  const std::size_t time);
83  dynamicgraph::Matrix &getNextMatrix(dynamicgraph::Matrix &res,
84  const std::size_t time);
85  void resize(const size_type &nbRow, const size_type &nbCol);
86 
87  public:
88  /* --- PARAMS --- */
89  void display(std::ostream &os) const;
90  virtual void initCommands();
91 };
92 } // namespace sot
93 } // namespace dynamicgraph
94 #endif /* #ifndef __SOT_TRACER_H__ */
signal-ptr.h
signal-time-dependent.h
signal-base.h
dynamicgraph::SignalPtr
dynamicgraph
dynamicgraph::Entity
SOTREADER_EXPORT
#define SOTREADER_EXPORT
Definition: reader.hh:47
exception-traces.h
dynamicgraph::Matrix
Eigen::MatrixXd Matrix
DYNAMIC_GRAPH_ENTITY_DECL
#define DYNAMIC_GRAPH_ENTITY_DECL()
load
void load(Archive &ar, hpp::fcl::BVSplitter< BV > &splitter_, const unsigned int)
dynamicgraph::sot::sotReader::DataType
std::list< std::vector< double > > DataType
Definition: reader.hh:74
dynamicgraph::sot::sotReader::vectorSOUT
SignalTimeDependent< dynamicgraph::Vector, sigtime_t > vectorSOUT
Definition: reader.hh:62
dynamicgraph::sot::sotReader::~sotReader
virtual ~sotReader(void)
Definition: reader.hh:67
dynamicgraph::size_type
Matrix::Index size_type
display
dynamicgraph::Vector
Eigen::VectorXd Vector
flags.hh
dynamicgraph::sot::sotReader::matrixSOUT
SignalTimeDependent< dynamicgraph::Matrix, sigtime_t > matrixSOUT
Definition: reader.hh:63
linear-algebra.h
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t >
dynamicgraph::sot::sotReader::rows
size_type rows
Definition: reader.hh:79
dynamicgraph::sot::sotReader::iteratorSet
bool iteratorSet
Definition: reader.hh:77
dynamicgraph::sot::sotReader::dataSet
DataType dataSet
Definition: reader.hh:75
cols
int cols
dynamicgraph::sot::sotReader::selectionSIN
SignalPtr< Flags, sigtime_t > selectionSIN
Definition: reader.hh:61
dynamicgraph::sot::sotReader::currentData
DataType::const_iterator currentData
Definition: reader.hh:76
n
Vec3f n
dynamicgraph::sot::sotReader
Definition: reader.hh:57


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31