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 
58 
61 
62  public:
66 
67  public:
68  sotReader(const std::string n);
69  virtual ~sotReader(void) {}
70 
71  void load(const std::string &filename);
72  void clear(void);
73  void rewind(void);
74 
75  protected:
76  typedef std::list<std::vector<double> > DataType;
77  DataType dataSet;
78  DataType::const_iterator currentData;
80 
81  int rows, cols;
82 
84  const unsigned int time);
85  dynamicgraph::Matrix &getNextMatrix(dynamicgraph::Matrix &res,
86  const unsigned int time);
87  void resize(const int &nbRow, const int &nbCol);
88 
89  public:
90  /* --- PARAMS --- */
91  void display(std::ostream &os) const;
92  virtual void initCommands();
93 };
94 
95 #endif /* #ifndef __SOT_TRACER_H__ */
SignalTimeDependent< dynamicgraph::Matrix, int > matrixSOUT
Definition: reader.hh:65
Eigen::VectorXd Vector
Vec3f n
bool iteratorSet
Definition: reader.hh:79
std::list< std::vector< double > > DataType
Definition: reader.hh:76
DataType::const_iterator currentData
Definition: reader.hh:78
virtual ~sotReader(void)
Definition: reader.hh:69
SignalTimeDependent< dynamicgraph::Vector, int > vectorSOUT
Definition: reader.hh:64
#define SOTREADER_EXPORT
Definition: reader.hh:47
DataType dataSet
Definition: reader.hh:77
#define DYNAMIC_GRAPH_ENTITY_DECL()
virtual void display(std::ostream &os) const
Eigen::MatrixXd Matrix
int cols
filename
SignalPtr< Flags, int > selectionSIN
Definition: reader.hh:63
void load(Archive &ar, hpp::fcl::BVSplitter< BV > &splitter_, const unsigned int)
int rows
Definition: reader.hh:81


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