EZC3D
Data.h
Go to the documentation of this file.
1 #ifndef DATA_H
2 #define DATA_H
3 
11 #include <Frame.h>
12 
18 class EZC3D_API ezc3d::DataNS::Data{
19  //---- CONSTRUCTORS ----//
20 public:
24  Data();
25 
32  std::fstream &file);
33 
34 
35  //---- STREAM ----//
36 public:
43  void print() const;
44 
51  void write(std::fstream &f) const;
52 
53 
54  //---- FRAME ----//
55 protected:
56  std::vector<ezc3d::DataNS::Frame> _frames;
57 public:
62  size_t nbFrames() const;
63 
73  const ezc3d::DataNS::Frame& frame(size_t idx) const;
74 
87 
100  void frame(const ezc3d::DataNS::Frame& frame, size_t idx = SIZE_MAX);
101 
106  const std::vector<ezc3d::DataNS::Frame>& frames() const;
107 
108 };
109 
110 #endif
ezc3d::DataNS::Frame & frame_nonConst(size_t idx)
Get the frame of index idx in order to be modified by the caller.
Definition: Data.cpp:125
void print() const
Print the data.
Definition: Data.cpp:93
const std::vector< ezc3d::DataNS::Frame > & frames() const
Get all the frames from the data set.
Definition: Data.cpp:148
Data()
Create a ready to fill Data class.
Definition: Data.cpp:14
Namespace ezc3d.
Definition: ezc3d.h:68
size_t nbFrames() const
Get the number of frames in the data structure.
Definition: Data.cpp:108
Declaration of Frame class.
std::vector< ezc3d::DataNS::Frame > _frames
Storage of the data.
Definition: Data.h:56
Main class for C3D holder.
Definition: ezc3d.h:154
Data of the C3D file.
Definition: Data.h:18
Frame holder for C3D data.
Definition: Frame.h:17
const ezc3d::DataNS::Frame & frame(size_t idx) const
Get the frame of index idx.
Definition: Data.cpp:113
void write(std::fstream &f) const
Write all the data to an opened file.
Definition: Data.cpp:102