Set all the individual cells to their initial values */
| 214 | |
| 215 | /* Set all the individual cells to their initial values */ |
| 216 | void cSpatialResCount::SetCellList(Apto::Array<cCellResource>* in_cell_list_ptr) |
| 217 | { |
| 218 | cell_list_ptr = in_cell_list_ptr; |
| 219 | for (int i = 0; i < cell_list_ptr->GetSize(); i++) { |
| 220 | int cell_id = (*cell_list_ptr)[i].GetId(); |
| 221 | |
| 222 | /* Be sure the user entered a valid cell id or if the the program is loading |
| 223 | the resource for the testCPU that does not have a grid set up */ |
| 224 | |
| 225 | if (cell_id >= 0 && cell_id <= grid.GetSize()) { |
| 226 | Rate((*cell_list_ptr)[i].GetId(), (*cell_list_ptr)[i].GetInitial()); |
| 227 | State((*cell_list_ptr)[i].GetId()); |
| 228 | Element(cell_id).SetInitial((*cell_list_ptr)[i].GetInitial()); |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | /* Set the rate variable for one element using the array index */ |
| 234 |
no test coverage detected