ON_ManifestIdentificationMap is used to record a map from a source manifest to a destination manifest when the index or id values change. This is common when reading and writing archives and when merging models. More...

#include <opennurbs_archive.h>

Public Member Functions

 ON_ManifestMap () ON_NOEXCEPT
 
 ON_ManifestMap (const ON_ManifestMap &)
 
 ~ON_ManifestMap ()
 
bool AddMapItem (const class ON_ManifestMapItem &map_item)
 
bool GetAndValidateDestinationId (ON_ModelComponent::Type component_type, const ON_UUID &source_component_id, const ON_ComponentManifest &destination_manifest, ON_UUID *destination_component_id) const
 
bool GetAndValidateDestinationIndex (ON_ModelComponent::Type component_type, int source_component_index, const ON_ComponentManifest &destination_manifest, int *destination_component_index) const
 
bool GetAndValidateDestinationIndex (ON_ModelComponent::Type component_type, const ON_UUID &source_component_id, const ON_ComponentManifest &destination_manifest, int *destination_component_index) const
 
bool IsEmpty () const
 
bool IsNotEmpty () const
 
unsigned int MapItemCount () const
 
const class ON_ManifestMapItemMapItemFromSourceId (const ON_UUID &source_item_id) const
 
const class ON_ManifestMapItemMapItemFromSourceIndex (ON_ModelComponent::Type component_type, int source_component_index) const
 
ON_ManifestMapoperator= (const ON_ManifestMap &)
 
bool UpdatetMapItemDestination (const class ON_ManifestMapItem &map_item)
 

Static Public Attributes

static const ON_ManifestMap Empty
 

Detailed Description

ON_ManifestIdentificationMap is used to record a map from a source manifest to a destination manifest when the index or id values change. This is common when reading and writing archives and when merging models.

Constructor & Destructor Documentation

◆ ON_ManifestMap() [1/2]

ON_ManifestMap::ON_ManifestMap ( )

◆ ~ON_ManifestMap()

ON_ManifestMap::~ON_ManifestMap ( )

◆ ON_ManifestMap() [2/2]

ON_ManifestMap::ON_ManifestMap ( const ON_ManifestMap )

Member Function Documentation

◆ AddMapItem()

bool ON_ManifestMap::AddMapItem ( const class ON_ManifestMapItem map_item)

◆ GetAndValidateDestinationId()

bool ON_ManifestMap::GetAndValidateDestinationId ( ON_ModelComponent::Type  component_type,
const ON_UUID source_component_id,
const ON_ComponentManifest destination_manifest,
ON_UUID destination_component_id 
) const

◆ GetAndValidateDestinationIndex() [1/2]

bool ON_ManifestMap::GetAndValidateDestinationIndex ( ON_ModelComponent::Type  component_type,
int  source_component_index,
const ON_ComponentManifest destination_manifest,
int *  destination_component_index 
) const

◆ GetAndValidateDestinationIndex() [2/2]

bool ON_ManifestMap::GetAndValidateDestinationIndex ( ON_ModelComponent::Type  component_type,
const ON_UUID source_component_id,
const ON_ComponentManifest destination_manifest,
int *  destination_component_index 
) const

◆ IsEmpty()

bool ON_ManifestMap::IsEmpty ( ) const
Returns
True if there are no ON_ManifestMapItem elements.

◆ IsNotEmpty()

bool ON_ManifestMap::IsNotEmpty ( ) const
Returns
True if there is at least one ON_ManifestMapItem element.

◆ MapItemCount()

unsigned int ON_ManifestMap::MapItemCount ( ) const
Returns
Number of map items.

Some of these items may not change id or index.

◆ MapItemFromSourceId()

const class ON_ManifestMapItem& ON_ManifestMap::MapItemFromSourceId ( const ON_UUID source_item_id) const

◆ MapItemFromSourceIndex()

const class ON_ManifestMapItem& ON_ManifestMap::MapItemFromSourceIndex ( ON_ModelComponent::Type  component_type,
int  source_component_index 
) const

◆ operator=()

ON_ManifestMap& ON_ManifestMap::operator= ( const ON_ManifestMap )

◆ UpdatetMapItemDestination()

bool ON_ManifestMap::UpdatetMapItemDestination ( const class ON_ManifestMapItem map_item)
Parameters
map_item[in] The source settings must exacty match source settings of an existing map. The destination settings are the new values to assign. Return: True if a mapping was successfully updated (even when the destation settings did not change).

Member Data Documentation

◆ Empty

const ON_ManifestMap ON_ManifestMap::Empty
static