EZC3D
Frame.cpp
Go to the documentation of this file.
1 #define EZC3D_API_EXPORTS
2 
10 #include "Frame.h"
11 
13 {
14  _points = std::shared_ptr<ezc3d::DataNS::Points3dNS::Points>(new ezc3d::DataNS::Points3dNS::Points());
15  _analogs = std::shared_ptr<ezc3d::DataNS::AnalogsNS::Analogs>(new ezc3d::DataNS::AnalogsNS::Analogs());
16 }
17 
19 {
20  points().print();
21  analogs().print();
22 }
23 
24 void ezc3d::DataNS::Frame::write(std::fstream &f) const
25 {
26  points().write(f);
27  analogs().write(f);
28 }
29 
31 {
32  return *_points;
33 }
34 
36 {
37  return *_points;
38 }
39 
41 {
42  return *_analogs;
43 }
44 
46 {
47  return *_analogs;
48 }
49 
51 {
52  add(frame.points(), frame.analogs());
53 }
54 
56 {
57  _points = std::shared_ptr<ezc3d::DataNS::Points3dNS::Points>(new ezc3d::DataNS::Points3dNS::Points(point3d_frame));
58 }
59 
61 {
62  _analogs = std::shared_ptr<ezc3d::DataNS::AnalogsNS::Analogs>(new ezc3d::DataNS::AnalogsNS::Analogs(analogs_frame));
63 }
64 
66 {
67  add(point3d_frame);
68  add(analog_frame);
69 }
70 
72 {
73  return points().isempty() && analogs().isempty();
74 }
Frame()
Create an empty frame.
Definition: Frame.cpp:12
std::shared_ptr< ezc3d::DataNS::AnalogsNS::Analogs > _analogs
All the subframes for all the analogs.
Definition: Frame.h:67
Analog holder for C3D analogous data.
Definition: Analogs.h:16
void print() const
Print the frame.
Definition: Frame.cpp:18
bool isempty() const
Return if the frame is empty.
Definition: Frame.cpp:71
Points holder for C3D data 3D points data.
Definition: Points.h:16
const ezc3d::DataNS::Points3dNS::Points & points() const
Return a reference to all the points.
Definition: Frame.cpp:30
const ezc3d::DataNS::AnalogsNS::Analogs & analogs() const
Return a reference to all the analogs.
Definition: Frame.cpp:40
void add(const ezc3d::DataNS::Frame &frame)
Add a frame by copying a sent frame.
Definition: Frame.cpp:50
ezc3d::DataNS::Points3dNS::Points & points_nonConst() const
Return a reference to all the points in order to be modified by the caller.
Definition: Frame.cpp:35
Declaration of Frame class.
std::shared_ptr< ezc3d::DataNS::Points3dNS::Points > _points
All the points for this frame.
Definition: Frame.h:47
ezc3d::DataNS::AnalogsNS::Analogs & analogs_nonConst() const
Return a reference to all the analogs in order to be modified by the caller.
Definition: Frame.cpp:45
void write(std::fstream &f) const
Write a frame to an opened file.
Definition: Frame.cpp:24
Frame holder for C3D data.
Definition: Frame.h:17