| 287 | } |
| 288 | |
| 289 | uint32_t AFCContainer::SelectIndex() const |
| 290 | { |
| 291 | if (entity_data_list_.size() == current_index_) |
| 292 | { |
| 293 | return current_index_ + 1; |
| 294 | } |
| 295 | else |
| 296 | { |
| 297 | // index starts from 1 |
| 298 | uint32_t index = 1u; |
| 299 | for (auto iter : entity_data_list_) |
| 300 | { |
| 301 | if (iter.first != index) |
| 302 | { |
| 303 | break; |
| 304 | } |
| 305 | |
| 306 | index += 1; |
| 307 | } |
| 308 | |
| 309 | return index; |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | bool AFCContainer::PlaceEntity(const uint32_t index, std::shared_ptr<AFIEntity> pEntity) |
| 314 | { |