|
EZC3D
|
Group of parameter of a C3D file. More...
#include <Group.h>
Public Member Functions | |
| Group (const std::string &name="", const std::string &description="") | |
| Create an empty group of parameter. More... | |
| void | print () const |
| Print the group by calling the print method of all the parameters. | |
| void | write (std::fstream &f, int groupIdx, std::streampos &dataStartPosition) const |
| Write the group to an opened file by calling the write method of all the parameters. More... | |
| int | read (ezc3d::c3d &c3d, const Parameters ¶ms, std::fstream &file, int nbCharInName) |
| Read and store a group of parameter from an opened C3D file. More... | |
| const std::string & | name () const |
| Get the name of the group. More... | |
| void | name (const std::string name) |
| Set the name of the group. More... | |
| const std::string & | description () const |
| Get the description of the group. More... | |
| void | description (const std::string description) |
| Set the description of the group. More... | |
| bool | isLocked () const |
| Get the locking status of the group. More... | |
| void | lock () |
| Set the locking status of the group to true. | |
| void | unlock () |
| Set the locking status of the group to false. | |
| size_t | nbParameters () const |
| Get the number of parameters. More... | |
| size_t | parameterIdx (std::string parameterName) const |
| Get the index of a parameter in the group. More... | |
| const ezc3d::ParametersNS::GroupNS::Parameter & | parameter (size_t idx) const |
| Get a particular parameter of index idx from the group. More... | |
| ezc3d::ParametersNS::GroupNS::Parameter & | parameter_nonConst (size_t idx) |
| Get a particular parameter of index idx from the group in order to be modified by the caller. More... | |
| const ezc3d::ParametersNS::GroupNS::Parameter & | parameter (std::string parameterName) const |
| Get a particular parameter with the name parameterName from the group. More... | |
| ezc3d::ParametersNS::GroupNS::Parameter & | parameter_nonConst (std::string parameterName) |
| Get a particular parameter with the name parameterName from the group in the form of a non-const reference. More... | |
| int | parameter (c3d &c3d, const Parameters ¶ms, std::fstream &file, int nbCharInName) |
| Add a parameter to the group from a C3D file. More... | |
| void | parameter (const ezc3d::ParametersNS::GroupNS::Parameter ¶meter) |
| Add/replace a parameter to the group. More... | |
| const std::vector< ezc3d::ParametersNS::GroupNS::Parameter > & | parameters () const |
| Get all the parameter from the group. More... | |
Protected Attributes | |
| std::string | _name |
| The name of the group. | |
| std::string | _description |
| The description of the group. | |
| bool | _isLocked |
| The lock status of the group. | |
| std::vector< ezc3d::ParametersNS::GroupNS::Parameter > | _parameters |
| Holder for the parameters of the group. | |
| ezc3d::ParametersNS::GroupNS::Group::Group | ( | const std::string & | name = "", |
| const std::string & | description = "" |
||
| ) |
| const std::string & ezc3d::ParametersNS::GroupNS::Group::description | ( | ) | const |
| void ezc3d::ParametersNS::GroupNS::Group::description | ( | const std::string | description | ) |
| bool ezc3d::ParametersNS::GroupNS::Group::isLocked | ( | ) | const |
| const std::string & ezc3d::ParametersNS::GroupNS::Group::name | ( | ) | const |
| void ezc3d::ParametersNS::GroupNS::Group::name | ( | const std::string | name | ) |
| size_t ezc3d::ParametersNS::GroupNS::Group::nbParameters | ( | ) | const |
| const ezc3d::ParametersNS::GroupNS::Parameter & ezc3d::ParametersNS::GroupNS::Group::parameter | ( | size_t | idx | ) | const |
| const ezc3d::ParametersNS::GroupNS::Parameter & ezc3d::ParametersNS::GroupNS::Group::parameter | ( | std::string | parameterName | ) | const |
| int ezc3d::ParametersNS::GroupNS::Group::parameter | ( | ezc3d::c3d & | c3d, |
| const Parameters & | params, | ||
| std::fstream & | file, | ||
| int | nbCharInName | ||
| ) |
| void ezc3d::ParametersNS::GroupNS::Group::parameter | ( | const ezc3d::ParametersNS::GroupNS::Parameter & | parameter | ) |
| ezc3d::ParametersNS::GroupNS::Parameter & ezc3d::ParametersNS::GroupNS::Group::parameter_nonConst | ( | size_t | idx | ) |
Get a particular parameter of index idx from the group in order to be modified by the caller.
| idx | The index of the parameter |
Get a particular parameter of index idx from the group in the form of a non-const reference. The user can thereafter modify the parameter at will, but with the caution it requires.
Throw a std::out_of_range exception if idx is larger than the number of parameters
| ezc3d::ParametersNS::GroupNS::Parameter & ezc3d::ParametersNS::GroupNS::Group::parameter_nonConst | ( | std::string | parameterName | ) |
Get a particular parameter with the name parameterName from the group in the form of a non-const reference.
| parameterName | The name of the parameter |
Get a particular parameterwith the name parameterName from the group in the form of a non-const reference. The user can thereafter modify the parameter at will, but with the caution it requires.
Throw a std::invalid_argument if parameterName is not found
| size_t ezc3d::ParametersNS::GroupNS::Group::parameterIdx | ( | std::string | parameterName | ) | const |
Get the index of a parameter in the group.
| parameterName | Name of the parameter |
Search for the index of a parameter into the group by the name of this parameter.
Throw a std::invalid_argument if parameterName is not found
| const std::vector< ezc3d::ParametersNS::GroupNS::Parameter > & ezc3d::ParametersNS::GroupNS::Group::parameters | ( | ) | const |
| int ezc3d::ParametersNS::GroupNS::Group::read | ( | ezc3d::c3d & | c3d, |
| const Parameters & | params, | ||
| std::fstream & | file, | ||
| int | nbCharInName | ||
| ) |
Read and store a group of parameter from an opened C3D file.
| c3d | C3D reference to copy the data in |
| params | Reference to a valid parameter |
| file | The file stream already opened with read access |
| nbCharInName | The number of character of the group name |
| void ezc3d::ParametersNS::GroupNS::Group::write | ( | std::fstream & | f, |
| int | groupIdx, | ||
| std::streampos & | dataStartPosition | ||
| ) | const |
Write the group to an opened file by calling the write method of all the parameters.
| f | Already opened fstream file with write access |
| groupIdx | Index of the group that this particular parameter is in |
| dataStartPosition | The position in the file where the data start (special case for POINT:DATA_START parameter) |
1.8.14