Public Member Functions | Private Member Functions | Private Attributes | List of all members
SurgSim::DataStructures::DataGroupCopier Class Reference

A class that assists in copying from one DataGroup to another, when assignment is not possible. More...

#include <SurgSim/DataStructures/DataGroupCopier.h>

Public Member Functions

 DataGroupCopier (const DataGroup &source, DataGroup &target)
 Construct a copier. More...
 
void copy ()
 Copies the NamedData entries with the same names. Resets entries in the target that are reset in the source. More...
 

Private Member Functions

void findMap ()
 Find the entries (by name) from the source to target DataGroups. More...
 
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 entries. More...
 

Private Attributes

const DataGroupm_source
 The source DataGroup. More...
 
DataGroupm_target
 The target DataGroup. More...
 
DataGroupCopyMap m_map
 The map from source to target. More...
 

Detailed Description

A class that assists in copying from one DataGroup to another, when assignment is not possible.

See also
SurgSim::DataStructures::DataGroup

Constructor & Destructor Documentation

SurgSim::DataStructures::DataGroupCopier::DataGroupCopier ( const DataGroup source,
DataGroup target 
)

Construct a copier.

Parameters
sourceThe source DataGroup.
targetThe target DataGroup.

Member Function Documentation

void SurgSim::DataStructures::DataGroupCopier::copy ( )

Copies the NamedData entries with the same names. Resets entries in the target that are reset in the source.

void SurgSim::DataStructures::DataGroupCopier::findMap ( )
private

Find the entries (by name) from the source to target DataGroups.

NamedDataCopyMap SurgSim::DataStructures::DataGroupCopier::findMap ( std::shared_ptr< const IndexDirectory source,
std::shared_ptr< const IndexDirectory target 
) const
private

Find the entries (by name) from the source to target IndexDirectories, and return the matching entries.

Parameters
sourceThe source IndexDirectory.
targetThe target IndexDirectory.
Returns
The map from source to target indices.

Member Data Documentation

DataGroupCopyMap SurgSim::DataStructures::DataGroupCopier::m_map
private

The map from source to target.

const DataGroup& SurgSim::DataStructures::DataGroupCopier::m_source
private

The source DataGroup.

DataGroup& SurgSim::DataStructures::DataGroupCopier::m_target
private

The target DataGroup.


The documentation for this class was generated from the following files: