EZC3D
|
Analog holder for C3D analogous data. More...
#include <Analogs.h>
Public Member Functions | |
Analogs () | |
Create an empty holder for the analogous data. | |
void | print () const |
Print the subframes. More... | |
void | write (std::fstream &f) const |
Write the subframes to an opened file. More... | |
size_t | nbSubframes () const |
Get the number of subframes. More... | |
void | nbSubframes (size_t nbSubframes) |
Resize the number of subframes. Warning, this function drops data if subframes is downsized. More... | |
const ezc3d::DataNS::AnalogsNS::SubFrame & | subframe (size_t idx) const |
Get a particular subframe of index idx from the analogous data set. More... | |
ezc3d::DataNS::AnalogsNS::SubFrame & | subframe_nonConst (size_t idx) |
Get a particular subframe of index idx from the analogous data set in order to be modified by the caller. More... | |
void | subframe (const ezc3d::DataNS::AnalogsNS::SubFrame &subframe, size_t idx=SIZE_MAX) |
Add/replace a subframe to the analogous data set. More... | |
const std::vector< ezc3d::DataNS::AnalogsNS::SubFrame > & | subframes () const |
Get all the subframes from the analogous data set. More... | |
bool | isempty () const |
Return if the analogs are empty. More... | |
Protected Attributes | |
std::vector< ezc3d::DataNS::AnalogsNS::SubFrame > | _subframe |
Holder for the subframes. | |
bool ezc3d::DataNS::AnalogsNS::Analogs::isempty | ( | ) | const |
Return if the analogs are empty.
Definition at line 83 of file Analogs.cpp.
size_t ezc3d::DataNS::AnalogsNS::Analogs::nbSubframes | ( | ) | const |
Get the number of subframes.
Definition at line 33 of file Analogs.cpp.
void ezc3d::DataNS::AnalogsNS::Analogs::nbSubframes | ( | size_t | nbSubframes | ) |
Resize the number of subframes. Warning, this function drops data if subframes is downsized.
nbSubframes | The number of subframes to be in the holder |
Definition at line 38 of file Analogs.cpp.
void ezc3d::DataNS::AnalogsNS::Analogs::print | ( | ) | const |
Print the subframes.
Print the subframes to the console by calling sequentially the print method of each subframes
Definition at line 17 of file Analogs.cpp.
const ezc3d::DataNS::AnalogsNS::SubFrame & ezc3d::DataNS::AnalogsNS::Analogs::subframe | ( | size_t | idx | ) | const |
Get a particular subframe of index idx from the analogous data set.
idx | The index of the subframe |
Get a particular subframe of index idx from the analogous data set.
Throw a std::out_of_range exception if idx is larger than the number of subframes
Definition at line 43 of file Analogs.cpp.
void ezc3d::DataNS::AnalogsNS::Analogs::subframe | ( | const ezc3d::DataNS::AnalogsNS::SubFrame & | subframe, |
size_t | idx = SIZE_MAX |
||
) |
Add/replace a subframe to the analogous data set.
subframe | The subframe to add |
idx | The index of the subframe in the analogous data set |
Add or replace a subframe to the analogous data set.
If no idx is sent, then the subframe is appended to the analogous data set. If the idx correspond to a pre-existing subframe, it replaces it. If idx is larger than the number of subframes, it resize the analogous data set accordingly and add the subframe where it belongs but leaves the other created subframes empty.
Definition at line 67 of file Analogs.cpp.
ezc3d::DataNS::AnalogsNS::SubFrame & ezc3d::DataNS::AnalogsNS::Analogs::subframe_nonConst | ( | size_t | idx | ) |
Get a particular subframe of index idx from the analogous data set in order to be modified by the caller.
idx | The index of the subframe |
Get a particular subframe of index idx from the analogous data in the form of a non-const reference. The user can thereafter modify these points at will, but with the caution it requires.
Throw a std::out_of_range exception if idx is larger than the number of subframes
Definition at line 55 of file Analogs.cpp.
const std::vector< ezc3d::DataNS::AnalogsNS::SubFrame > & ezc3d::DataNS::AnalogsNS::Analogs::subframes | ( | ) | const |
Get all the subframes from the analogous data set.
Definition at line 78 of file Analogs.cpp.
void ezc3d::DataNS::AnalogsNS::Analogs::write | ( | std::fstream & | f | ) | const |
Write the subframes to an opened file.
f | Already opened fstream file with write access |
Write all the subframes to a file by calling sequentially the write method of each subframe
Definition at line 26 of file Analogs.cpp.