Copy components from one componentstore into this one @param other the other component store to copy from */
| 171 | @param other the other component store to copy from |
| 172 | */ |
| 173 | void AddComponentsFrom(const ComponentStore& other) { |
| 174 | for (const auto& c : other.components) { |
| 175 | //add the componets of the current type to the global list |
| 176 | components[c.first].insert(components[c.first].begin(), c.second.begin(), c.second.end()); |
| 177 | } |
| 178 | //add to the redundant store |
| 179 | for (const auto& c : other.componentsRedundant) { |
| 180 | componentsRedundant[c.first].insert(componentsRedundant[c.first].begin(), c.second.begin(), c.second.end()); |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | Remove components from this store if they are also present in another |