EZC3D
Subframe.h
Go to the documentation of this file.
1 #ifndef SUBFRAME_H
2 #define SUBFRAME_H
3 
11 #include <Channel.h>
12 
17  //---- CONSTRUCTORS ----//
18 public:
22  SubFrame();
23 
24 
25  //---- STREAM ----//
26 public:
33  void print() const;
34 
41  void write(std::fstream &f) const;
42 
43 
44  //---- CHANNELS ----//
45 protected:
46  std::vector<ezc3d::DataNS::AnalogsNS::Channel> _channels;
47 public:
52  size_t nbChannels() const;
53 
58  void nbChannels(size_t nChannels);
59 
69  const ezc3d::DataNS::AnalogsNS::Channel& channel(size_t idx) const;
70 
82 
95  void channel(const ezc3d::DataNS::AnalogsNS::Channel& channel, size_t idx = SIZE_MAX);
96 
101  const std::vector<ezc3d::DataNS::AnalogsNS::Channel>& channels() const;
102 
107  bool isempty() const;
108 };
109 
110 #endif
void print() const
Print the subframe.
Definition: Subframe.cpp:17
ezc3d::DataNS::AnalogsNS::Channel & channel_nonConst(size_t idx)
Get a particular analog channel of index idx from the analogous data with write access.
Definition: Subframe.cpp:53
const ezc3d::DataNS::AnalogsNS::Channel & channel(size_t idx) const
Get a particular analog channel of index idx from the analogous data.
Definition: Subframe.cpp:41
SubFrame()
Create an empty subframe for analogous data.
Definition: Subframe.cpp:12
Namespace ezc3d.
Definition: ezc3d.h:68
size_t nbChannels() const
Get the number of analog channels.
Definition: Subframe.cpp:31
Subframe for the analogous data.
Definition: Subframe.h:16
Channel of an analogous data.
Definition: Channel.h:16
bool isempty() const
Return if the subframe is empty.
Definition: Subframe.cpp:81
Declaration of Channel class.
const std::vector< ezc3d::DataNS::AnalogsNS::Channel > & channels() const
Get all the analog channels from the analogous data.
Definition: Subframe.cpp:76
void write(std::fstream &f) const
Write the subframe to an opened file.
Definition: Subframe.cpp:24
std::vector< ezc3d::DataNS::AnalogsNS::Channel > _channels
Holder for the channels.
Definition: Subframe.h:46