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 (const DataGroup &source, DataGroup *target)
| Copies the NamedData entries with the same names. More...

## Private Member Functions

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

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

## DataGroupCopier()

SurgSim::DataStructures::DataGroupCopier::DataGroupCopier | ( | const DataGroup & | source,
|  | DataGroup * | target
| ) |  |

Construct a copier.

Parameters

  source | The source DataGroup.
  target | The target DataGroup.

## Member Function Documentation

## copy()

void SurgSim::DataStructures::DataGroupCopier::copy | ( | const DataGroup & | source,
|  | DataGroup * | target
| ) |  |

Copies the NamedData entries with the same names.

Resets entries in the target that are reset in the source. The source and target IndexDirectories are assumed to be the same as the source and target used in the constructor.

Parameters

  source | The source DataGroup.
  target | The target DataGroup.

## findMap()

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

  source | The source IndexDirectory.
  target | The target IndexDirectory.

Returns
  The map from source to target indices.

## Member Data Documentation

## m_map

DataGroupCopyMap SurgSim::DataStructures::DataGroupCopier::m_map

private

The map from source to target.

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

- SurgSim/DataStructures/DataGroupCopier.h
- SurgSim/DataStructures/DataGroupCopier.cpp