From df1a386b067a62c879b48b1eeca50b2982b4f92d Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 28 Jun 2021 21:53:17 -0700 Subject: Add table content list, cell status indicator --- core/src/Model/Template/TableTemplate.hpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'core/src/Model/Template/TableTemplate.hpp') 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 mName2Parameters; /// Map from array group name to the index of the array group (stored in mArrayGroups). tsl::array_map mName2ArrayGroups; std::vector mCells; - std::vector mArrayGroups; + std::vector mArrayGroups; std::vector mRowHeights; std::vector 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 { -- cgit v1.2.3-70-g09d2