te::mem::PreparedItemCopy Class Reference

This class is used to optimize the copy of several dataSetItems by caching the mapping between the columns from the input and the output. More...

#include <PreparedItemCopy.h>

Public Member Functions

void copyValues (const te::da::DataSetItem *source, te::mem::DataSetItem *destination, bool copyGeometries=true) const
 Copies the values from the source dataSet item to the destination dataSet item by matching the column names. If a column from the source does not exist in the destination, it will not be copied. More...
 
 PreparedItemCopy ()
 
void reset ()
 
 ~PreparedItemCopy ()
 

Protected Member Functions

void copyValues (const te::da::DataSetItem *source, te::mem::DataSetItem *destination, const ColumnMapping &vecColumnsMapping) const
 Copies the values from the source dataSet item to the destination dataSet item using the given pre calculated vecColumnsMapping. More...
 
ColumnMapping prepareCopyValues (const te::da::DataSetItem *source, te::mem::DataSetItem *destination, bool copyGeometries) const
 Creates a list mapping the input columns to the output columns. This is used to optmize significantly when you need to copy several items with the same column order. More...
 

Protected Attributes

ColumnMapping m_columnMapping
 

Detailed Description

This class is used to optimize the copy of several dataSetItems by caching the mapping between the columns from the input and the output.

Definition at line 54 of file PreparedItemCopy.h.

Constructor & Destructor Documentation

◆ PreparedItemCopy()

te::mem::PreparedItemCopy::PreparedItemCopy ( )

◆ ~PreparedItemCopy()

te::mem::PreparedItemCopy::~PreparedItemCopy ( )

Member Function Documentation

◆ copyValues() [1/2]

void te::mem::PreparedItemCopy::copyValues ( const te::da::DataSetItem source,
te::mem::DataSetItem destination,
bool  copyGeometries = true 
) const

Copies the values from the source dataSet item to the destination dataSet item by matching the column names. If a column from the source does not exist in the destination, it will not be copied.

◆ copyValues() [2/2]

void te::mem::PreparedItemCopy::copyValues ( const te::da::DataSetItem source,
te::mem::DataSetItem destination,
const ColumnMapping vecColumnsMapping 
) const
protected

Copies the values from the source dataSet item to the destination dataSet item using the given pre calculated vecColumnsMapping.

◆ prepareCopyValues()

ColumnMapping te::mem::PreparedItemCopy::prepareCopyValues ( const te::da::DataSetItem source,
te::mem::DataSetItem destination,
bool  copyGeometries 
) const
protected

Creates a list mapping the input columns to the output columns. This is used to optmize significantly when you need to copy several items with the same column order.

◆ reset()

void te::mem::PreparedItemCopy::reset ( )

Member Data Documentation

◆ m_columnMapping

ColumnMapping te::mem::PreparedItemCopy::m_columnMapping
mutableprotected

Definition at line 83 of file PreparedItemCopy.h.


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