Go to the documentation of this file.
16 #ifndef SURGSIM_DATASTRUCTURES_DATAGROUPCOPIER_H
17 #define SURGSIM_DATASTRUCTURES_DATAGROUPCOPIER_H
21 #include <unordered_map>
27 namespace DataStructures
58 std::shared_ptr<const IndexDirectory> target)
const;
68 #endif // SURGSIM_DATASTRUCTURES_DATAGROUPCOPIER_H
DataGroupCopyMap m_map
The map from source to target.
Definition: DataGroupCopier.h:61
A simple bidirectional mapping between names (strings) and distinct consecutive non-negative indices.
Definition: IndexDirectory.h:32
void copy(const DataGroup &source, DataGroup *target)
Copies the NamedData entries with the same names.
Definition: DataGroupCopier.cpp:42
Definition: CompoundShapeToGraphics.cpp:29
A collection of NamedData objects.
Definition: DataGroup.h:68
NamedDataCopyMap findMap(std::shared_ptr< const IndexDirectory > source, std::shared_ptr< const IndexDirectory > target) const
Find the entries (by name) from the source to target IndexDirectories, and return the matching entrie...
Definition: DataGroupCopier.cpp:56
std::unordered_map< int, int > NamedDataCopyMap
The type used for copying values between two NamedData objects that cannot assign to each other.
Definition: NamedData.h:32
DataGroupCopier(const DataGroup &source, DataGroup *target)
Construct a copier.
Definition: DataGroupCopier.cpp:28
A class that assists in copying from one DataGroup to another, when assignment is not possible.
Definition: DataGroupCopier.h:37
std::array< NamedDataCopyMap, 9 > DataGroupCopyMap
The type used for copying values between two DataGroups that cannot assign to each other.
Definition: DataGroupCopier.h:30