Rhino C++ API  8.13
Public Member Functions | Static Public Attributes | List of all members
ON_ManifestMap Class Reference

#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, const ON_UUID &source_component_id, const ON_ComponentManifest &destination_manifest, int *destination_component_index) const
 
bool GetAndValidateDestinationIndex (ON_ModelComponent::Type component_type, int source_component_index, 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)
 
bool UpdatetMapItemDestination (const class ON_ManifestMapItem &map_item, bool bIgnoreSourceIndex)
 

Static Public Attributes

static const ON_ManifestMap Empty
 

Detailed Description

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 ( )

The default constructor would work prfectly, except there is a bug in Apple's CLANG that requires either an explicitly implemented constructor or an explicitly implemented copy constructor together with a hack to initialize the static ON_ComponentManifest::Empty. Apple CLANG BUG ///< ON_ManifestMap() = default;

◆ ~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,
const ON_UUID source_component_id,
const ON_ComponentManifest destination_manifest,
int *  destination_component_index 
) const

◆ GetAndValidateDestinationIndex() [2/2]

bool ON_ManifestMap::GetAndValidateDestinationIndex ( ON_ModelComponent::Type  component_type,
int  source_component_index,
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. Remarks: 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() [1/2]

bool ON_ManifestMap::UpdatetMapItemDestination ( const class ON_ManifestMapItem map_item)

Parameters: map_item - [in] The source settings must exactly 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).

◆ UpdatetMapItemDestination() [2/2]

bool ON_ManifestMap::UpdatetMapItemDestination ( const class ON_ManifestMapItem map_item,
bool  bIgnoreSourceIndex 
)

Parameters: map_item - [in] The source settings must exactly match source settings of an existing map. The destination settings are the new values to assign. bIgnoreSourceIndex - [in] If true, the value of map_item.SourceIndex() is ignored. Otherwise, it must exactly match the source index setting of an existing map. 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