aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Template/TableTemplate.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/Model/Template/TableTemplate.hpp')
-rw-r--r--core/src/Model/Template/TableTemplate.hpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/core/src/Model/Template/TableTemplate.hpp b/core/src/Model/Template/TableTemplate.hpp
index 7f331fa..a9a89d4 100644
--- a/core/src/Model/Template/TableTemplate.hpp
+++ b/core/src/Model/Template/TableTemplate.hpp
@@ -84,7 +84,7 @@ public:
/// \see TableCell
/// \see TableInstantiationParameters
/// \see TableTemplate
-class TableCellArrayGroup
+class TableArrayGroup
{
public:
/// Parameter name mapped to cell location (index from LeftCell).
@@ -108,7 +108,7 @@ public:
struct lxw_workbook;
struct lxw_worksheet;
-/// An object containing the necessary information to instanciate a table template.
+/// An object containing the necessary information to instantiate a table template.
/// \see TableTemplate
class TableInstantiationParameters
{
@@ -137,13 +137,16 @@ public:
/// This current supports exporting to xlsx files.
class TableTemplate : public Template
{
+ friend class TableSingleParamsIter;
+ friend class TableArrayGroupsIter;
+
private:
/// Map from parameter name to index of the parameter cell (stored in mCells).
tsl::array_map<char, int> mName2Parameters;
/// Map from array group name to the index of the array group (stored in mArrayGroups).
tsl::array_map<char, int> mName2ArrayGroups;
std::vector<TableCell> mCells;
- std::vector<TableCellArrayGroup> mArrayGroups;
+ std::vector<TableArrayGroup> mArrayGroups;
std::vector<int> mRowHeights;
std::vector<int> mColumnWidths;
@@ -165,10 +168,10 @@ public:
void SetCellType(Vec2i pos, TableCell::CellType type);
int GetArrayGroupCount() const;
- const TableCellArrayGroup& GetArrayGroup(int id) const;
- TableCellArrayGroup& GetArrayGroup(int id);
- TableCellArrayGroup* AddArrayGroup(int row, int left, int right);
- TableCellArrayGroup* AddArrayGroup(std::string_view name, int row, int left, int right);
+ const TableArrayGroup& GetArrayGroup(int id) const;
+ TableArrayGroup& GetArrayGroup(int id);
+ TableArrayGroup* AddArrayGroup(int row, int left, int right);
+ TableArrayGroup* AddArrayGroup(std::string_view name, int row, int left, int right);
bool ExtendArrayGroupLeft(int id, int n);
bool ExtendArrayGroupRight(int id, int n);
@@ -176,7 +179,7 @@ public:
TableCell* FindCell(std::string_view name);
/// Find an array group by its name.
- TableCellArrayGroup* FindArrayGroup(std::string_view name);
+ TableArrayGroup* FindArrayGroup(std::string_view name);
enum MergeCellsResult
{