------------------------------------ EcsCommandBuffer::AddComponentList
| 116 | // EcsCommandBuffer::AddComponentList |
| 117 | // |
| 118 | void EcsCommandBuffer::AddComponentList(T_EntityId const entity, std::vector<RawComponentPtr> const& components) |
| 119 | { |
| 120 | // get the component pointer buffer for the entity |
| 121 | auto buffer = m_AddComponents.emplace(entity, AddBuffer()).first; |
| 122 | |
| 123 | // add components to buffer |
| 124 | for (RawComponentPtr const& comp : components) |
| 125 | { |
| 126 | // copy construct the component pointer |
| 127 | RawComponentPtr copy(comp.typeIdx, malloc(ComponentRegistry::Instance().GetSize(comp.typeIdx))); |
| 128 | ComponentRegistry::Instance().GetCopyAssign(comp.typeIdx)(comp.data, copy.data); |
| 129 | |
| 130 | buffer->second.components.push_back(copy); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | //---------------------------------------- |
| 135 | // EcsCommandBuffer::RemoveComponentTypes |
nothing calls this directly
no test coverage detected