Choreonoid  1.8
PlainSeqFileLoader.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_UTIL_PLAIN_SEQ_FILE_LOADER_H
7 #define CNOID_UTIL_PLAIN_SEQ_FILE_LOADER_H
8 
9 #include "NullOut.h"
10 #include <list>
11 #include <vector>
12 #include <string>
13 #include "exportdecl.h"
14 
15 namespace cnoid {
16 
17 class CNOID_EXPORT PlainSeqFileLoader
18 {
19 public:
20  typedef std::list<std::vector<double>> Seq;
21  typedef Seq::iterator iterator;
22 
23  bool load(const std::string& filename, std::ostream& os = nullout());
24 
25  inline iterator begin() { return seq.begin(); }
26  inline iterator end() { return seq.end(); }
27 
28  inline int numParts() { return numParts_; }
29  inline int numFrames() { return numFrames_; }
30  inline double timeStep() { return timeStep_; }
31 
32 private:
33  Seq seq;
34  int numParts_;
35  int numFrames_;
36  double timeStep_;
37 };
38 
39 }
40 
41 #endif
cnoid::PlainSeqFileLoader::numParts
int numParts()
Definition: PlainSeqFileLoader.h:28
cnoid::PlainSeqFileLoader
Definition: PlainSeqFileLoader.h:17
cnoid::PlainSeqFileLoader::iterator
Seq::iterator iterator
Definition: PlainSeqFileLoader.h:21
cnoid::Seq
Definition: Seq.h:16
cnoid::PlainSeqFileLoader::numFrames
int numFrames()
Definition: PlainSeqFileLoader.h:29
NullOut.h
cnoid::nullout
std::ostream & nullout()
Definition: NullOut.cpp:26
cnoid::PlainSeqFileLoader::begin
iterator begin()
Definition: PlainSeqFileLoader.h:25
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::PlainSeqFileLoader::timeStep
double timeStep()
Definition: PlainSeqFileLoader.h:30
cnoid::PlainSeqFileLoader::end
iterator end()
Definition: PlainSeqFileLoader.h:26
cnoid::PlainSeqFileLoader::Seq
std::list< std::vector< double > > Seq
Definition: PlainSeqFileLoader.h:20