Rhino C++ API  8.6
Public Member Functions | List of all members
ON_ReferencedComponentSettings Class Reference

#include <opennurbs_instance.h>

Public Member Functions

 ON_ReferencedComponentSettings ()=default
 
 ON_ReferencedComponentSettings (const ON_ReferencedComponentSettings &src)
 
 ~ON_ReferencedComponentSettings ()
 
void AfterLayerTableAddedToModel (const class ON_ComponentManifest &source_archive_manifest, const class ON_ComponentManifest &model_manifest, const class ON_ManifestMap &archive_to_model_map)
 
void AfterReferenceLayerTableRead (const class ON_ComponentManifest &source_archive_manifest, const class ON_ComponentManifest &model_manifest, const class ON_ManifestMap &archive_to_model_map, ON_Layer *linked_definition_parent_layer, unsigned int layer_count, ON_Layer **layers)
 
void BeforeLinkedDefinitionWrite (const class ON_ComponentManifest &model_manifest, const class ON_ComponentManifest &destination_archive_manifest, const class ON_ManifestMap &model_to_archive_map, const ON_Layer *linked_definition_parent_layer, void *context, const ON_Layer *(*ModelLayerFromIdFunc)(void *context, const ON_UUID &))
 
bool HasLayerInformation () const
 
bool HasLayerTableInformation () const
 
bool HasParentLayerInformation () const
 
bool IsEmpty () const
 
bool IsNotEmpty () const
 
ON_ReferencedComponentSettingsoperator= (const ON_ReferencedComponentSettings &src)
 
bool Read (ON_BinaryArchive &archive)
 
bool Write (ON_BinaryArchive &archive) const
 

Detailed Description

Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete openNURBS copyright information see http://www.opennurbs.org.

Constructor & Destructor Documentation

◆ ON_ReferencedComponentSettings() [1/2]

ON_ReferencedComponentSettings::ON_ReferencedComponentSettings ( )
default

◆ ~ON_ReferencedComponentSettings()

ON_ReferencedComponentSettings::~ON_ReferencedComponentSettings ( )

◆ ON_ReferencedComponentSettings() [2/2]

ON_ReferencedComponentSettings::ON_ReferencedComponentSettings ( const ON_ReferencedComponentSettings src)

Member Function Documentation

◆ AfterLayerTableAddedToModel()

void ON_ReferencedComponentSettings::AfterLayerTableAddedToModel ( const class ON_ComponentManifest source_archive_manifest,
const class ON_ComponentManifest model_manifest,
const class ON_ManifestMap archive_to_model_map 
)

Description: Update the mapping from from reference file layer id to runtime model layer id. Typically this is done immediately after the reference file layers are added to the runtime model. Parameters: source_archive_manifest - [in] manifest of archive being read (may partially read) model_manifest - [in] manifest of runtime model (may partially created) archive_to_model_map - [in] Manifest map from reference file settings to runtime model settings. This map typically exists while the archive is being read and is destroyed after reading is complete. That's why the mapping has to be saved.

◆ AfterReferenceLayerTableRead()

void ON_ReferencedComponentSettings::AfterReferenceLayerTableRead ( const class ON_ComponentManifest source_archive_manifest,
const class ON_ComponentManifest model_manifest,
const class ON_ManifestMap archive_to_model_map,
ON_Layer linked_definition_parent_layer,
unsigned int  layer_count,
ON_Layer **  layers 
)

Description: Update runtime layer color visibility, locked, ... settings in the layer table read from a reference file to the values to use in the runtime model. This is typically done right after the reference file layer table is read and before the layers are added to the runtime model. Parameters: source_archive_manifest - [in] manifest of archive being read (may partially read) model_manifest - [in] manifest of runtime model (may partially created) layer_count - [in] length of layers[] array; layers - [in/out] The input values should be the layer table read from the referenced file. The output values have color, visibility, locked, ... settings updated to the state they had the last time the model file (not the referenced file) was saved. linked_definition_parent_layer - [in/out] If linked_definition_parent_layer is not nullptr, its color, visibility, ... settings are updated to the state they had the last time the model file (not the referenced file) was saved. Remarks: The layer idenitification information (name, index, id) are not changed by this function.

◆ BeforeLinkedDefinitionWrite()

void ON_ReferencedComponentSettings::BeforeLinkedDefinitionWrite ( const class ON_ComponentManifest model_manifest,
const class ON_ComponentManifest destination_archive_manifest,
const class ON_ManifestMap model_to_archive_map,
const ON_Layer linked_definition_parent_layer,
void *  context,
const ON_Layer *(*)(void *context, const ON_UUID &)  ModelLayerFromIdFunc 
)

Description: Save the current runtime layer color, visibility, ... states. Typically this is done immediately before a linked instance definition or worksession reference information is written. Calling the Write() function destroys the information created by BeforeWrite() because it is generally out-of-date if modeling resumes after writing. Parameters: model_manifest - [in] manifest of runtime model destination_archive_manifest - [in] manifest of archive being written (may partially written) model_to_archive_map - [in] Manifest map from model to destination_archive_manifest. linked_definition_parent_layer - [in] nullptr or the parent layer context - [in] first parameter passed to ModelLayerFromIdFunc ModelLayerFromIdFunc - [in] Function to get model layers from id

◆ HasLayerInformation()

bool ON_ReferencedComponentSettings::HasLayerInformation ( ) const

◆ HasLayerTableInformation()

bool ON_ReferencedComponentSettings::HasLayerTableInformation ( ) const

◆ HasParentLayerInformation()

bool ON_ReferencedComponentSettings::HasParentLayerInformation ( ) const

◆ IsEmpty()

bool ON_ReferencedComponentSettings::IsEmpty ( ) const

◆ IsNotEmpty()

bool ON_ReferencedComponentSettings::IsNotEmpty ( ) const

◆ operator=()

ON_ReferencedComponentSettings& ON_ReferencedComponentSettings::operator= ( const ON_ReferencedComponentSettings src)

◆ Read()

bool ON_ReferencedComponentSettings::Read ( ON_BinaryArchive archive)

◆ Write()

bool ON_ReferencedComponentSettings::Write ( ON_BinaryArchive archive) const