All data in a DOP-C table belongs to a row with a unique ID. These rows must be explicitly inserted by code, and may be removed at any time. The row ID does not necessarily correspond to the row index, that being the physical position of the row in memory.
To insert a row in a given table,
simply use the Table::insert()
method.
Table table;
size_t id = table.insert();
The Table::insert()
method returns the ID of the freshly inserted row.
This ID can be used to modify and reference the row elements.
Field<int> a(&table);
a(id) = 69;
std::cout << a(id) << std::endl;
To remove a row, we need its ID.
table.remove(id);
After the row is removed, we cannot in principle reference the row elements any longer.