LHABlock, containing a vector of LHAElement.
More...
#include <lhaData.h>
LHABlock, containing a vector of LHAElement.
When reading a LHA File, all elements of a given block are stored in a LHABlock.
- See also
- LHAElement
◆ LHABlock()
| mty::lha::LHABlock::LHABlock |
( |
std::string const & |
t_name | ) |
|
Constructor with one (optional) parameter.
- Parameters
-
◆ addElement() [1/4]
| void mty::lha::LHABlock::addElement |
( |
size_t |
id, |
|
|
size_t |
id_sup, |
|
|
FloatType |
value |
|
) |
| |
Adds an elements to the block.
- Parameters
-
| id | Id of the element. |
| id_sup | Supplementary id for the element. |
| value | Value of the element. |
◆ addElement() [2/4]
| void mty::lha::LHABlock::addElement |
( |
size_t |
id, |
|
|
FloatType |
value |
|
) |
| |
Adds an elements to the block.
- Parameters
-
| id | Id of the element. |
| value | Value of the element. |
◆ addElement() [3/4]
| void mty::lha::LHABlock::addElement |
( |
LHAElement const & |
t_element | ) |
|
Adds an elements to the block.
- Parameters
-
◆ addElement() [4/4]
| void mty::lha::LHABlock::addElement |
( |
LHAElement && |
t_element | ) |
|
Adds an elements to the block.
- Parameters
-
◆ getElement() [1/2]
| std::optional< LHAElement > mty::lha::LHABlock::getElement |
( |
size_t |
id | ) |
const |
Returns the first element (if found) with id id.
- Parameters
-
| id | Id of the element to search. |
- Returns
- A std::optional containing the first element with id id if found.
-
std::nullopt else.
◆ getElement() [2/2]
| std::optional< LHAElement > mty::lha::LHABlock::getElement |
( |
size_t |
id, |
|
|
size_t |
id_sup = -1 |
|
) |
| const |
Returns the first element (if found) with id id and position pos.
- Parameters
-
| id | Id of the element to search. |
| pos | Matrix coordinates of the elements. |
- Returns
- A std::optional containing the first element corresponding to id and pos if found.
-
std::nullopt else.
◆ getMultipleElements()
| std::vector< LHAElement > mty::lha::LHABlock::getMultipleElements |
( |
size_t |
id | ) |
const |
Returns all the elements for a given id. If there is multiple ones, for example a matrix, they are stored linearly in the container.
- Parameters
-
| id | Id of the elements to return. |
- Returns
- The LHAElement with id id.
- Note
- If the sortElements() has been called, the elements in the vector are sorted by position (if more than one). In that case, for a matrix, elements are sorted by row and by column ((0, 0) (0, 1) (1, 0) (1, 1) etc).
◆ getName()
| std::string const& mty::lha::LHABlock::getName |
( |
| ) |
const |
|
inline |
- Returns
- The name of the block.
◆ setName()
| void mty::lha::LHABlock::setName |
( |
std::string const & |
t_name | ) |
|
|
inline |
Sets the name of the block.
- Parameters
-
| t_name | New name of the block. |
The documentation for this class was generated from the following files: