Rhino C++ API  8.6
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_InstanceDefinition Class Reference

#include <opennurbs_instance.h>

Inheritance diagram for ON_InstanceDefinition:
ON_ModelComponent ON_Object CRhinoInstanceDefinition

Public Types

enum  {
  no_idef_settings = 0, idef_name_setting = 1, idef_description_setting = 2, idef_url_setting = 4,
  idef_units_setting = 8, idef_source_archive_setting = 0x10, idef_userdata_setting = 0x20, all_idef_settings = 0xFFFFFFFF
}
 
enum  eLinkedComponentAppearance : unsigned char { eLinkedComponentAppearance::Unset = 0, eLinkedComponentAppearance::Active = 1, eLinkedComponentAppearance::Reference = 2 }
 ON_InstanceDefinition::LinkedComponentStates specifies how model components (layers, materials, dimension styles, ...) from linked instance definition files are appear in the active model. More...
 
enum  IDEF_UPDATE_TYPE : unsigned int { IDEF_UPDATE_TYPE::Unset = 0, IDEF_UPDATE_TYPE::Static = 1, IDEF_UPDATE_TYPE::LinkedAndEmbedded = 2, IDEF_UPDATE_TYPE::Linked = 3 }
 
- Public Types inherited from ON_ModelComponent
enum  Attributes : unsigned int {
  NoAttributes = 0U, ComponentSerialNumberAttribute = 0x0001U, TypeAttribute = 0x0002U, ModelSerialNumberAttribute = 0x0004U,
  IdAttribute = 0x0008U, IndexAttribute = 0x0010U, NameAttribute = 0x0020U, ParentIdAttribute = 0x0040U,
  DeletedNameAttribute = 0x0080U, ComponentStatusAttribute = 0x0100U, BinaryArchiveAttributes = 0x78U, AllAttributes = 0x1FFU,
  SystemComponentAttribute = 0x8000U
}
 
enum  Type : unsigned char {
  Type::Unset = 0, Type::Image = 1, Type::TextureMapping = 2, Type::Material = 3,
  Type::RenderMaterial = Material, Type::LinePattern = 4, Type::Layer = 5, Type::Group = 6,
  Type::TextStyle = 7, Type::DimStyle = 8, Type::RenderLight = 9, Type::HatchPattern = 10,
  Type::InstanceDefinition = 11, Type::ModelGeometry = 12, Type::HistoryRecord = 13, Type::RenderContent = 14,
  Type::EmbeddedFile = 15, Type::ObsoleteValue = 16, Type::SectionStyle = 17, Type::NumOf,
  Type::Mixed = 0xFE
}
 The ON_ModelComponent::Type enum has a value for each explicit component type and two special values, Unset and Mixed. Use an ON_ModelComponentTypeIterator instance to iterate over the ON_ModelComponent::Type values. /summary> More...
 
- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 

Public Member Functions

 ON_InstanceDefinition () ON_NOEXCEPT
 
 ON_InstanceDefinition (const ON_InstanceDefinition &)
 
 ~ON_InstanceDefinition ()
 
bool AddInstanceGeometryId (ON_UUID id)
 
const ON_BoundingBox BoundingBox () const
 
void ClearBoundingBox ()
 
void ClearInstanceGeometryIdList ()
 
void ClearLinkedFileContentHash ()
 
void ClearLinkedFileReference ()
 
void ClearLinkedFileRelativePath ()
 
void ClearLinkedIdefReferenceComponentSettings ()
 
const ON_SHA1_Hash ContentHash () const
 
const ON_wString Description () const
 
void Dump (ON_TextLog &text_log) const override
 virtual ON_Object::Dump override More...
 
const ON_SHA1_Hash GeometryContentHash () const
 
bool HasLinkedIdefReferenceComponentSettings () const
 
ON_InstanceDefinition::IDEF_UPDATE_TYPE IdefUpdateType () const
 OBSOLETE - change IdefUpdateType() to InstanceDefinitionType() More...
 
ON_InstanceDefinition::IDEF_UPDATE_TYPE InstanceDefinitionType () const
 
const ON_SimpleArray< ON_UUID > & InstanceGeometryIdList () const
 
bool IsInstanceGeometryId (ON_UUID id) const
 
bool IsLinkedType () const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
ON_InstanceDefinition::eLinkedComponentAppearance LinkedComponentAppearance () const
 
const ON_wStringLinkedFilePath () const
 
const ON_FileReference LinkedFileReference () const
 
const ON_ReferencedComponentSettingsLinkedIdefReferenceComponentSettings () const
 
ON_ReferencedComponentSettingsLinkedIdefReferenceComponentSettings (bool bCreateIfNonePresent)
 
ON::object_type ObjectType () const override
 
ON_InstanceDefinitionoperator= (const ON_InstanceDefinition &)
 
bool Read (ON_BinaryArchive &archive) override
 
bool RemoveInstanceGeometryId (int id_index)
 
bool RemoveInstanceGeometryId (ON_UUID id)
 
void SetBoundingBox (ON_BoundingBox bbox)
 
void SetDescription (const wchar_t *description)
 
bool SetInstanceDefinitionType (const ON_InstanceDefinition::IDEF_UPDATE_TYPE instance_definition_type)
 
void SetInstanceGeometryIdList (const ON_SimpleArray< ON_UUID > &instance_geometry_id_list)
 
bool SetLinkedComponentAppearance (ON_InstanceDefinition::eLinkedComponentAppearance linked_component_appearance)
 
bool SetLinkedFileReference (ON_InstanceDefinition::IDEF_UPDATE_TYPE linked_definition_type, const wchar_t *linked_file_full_path)
 
bool SetLinkedFileReference (ON_InstanceDefinition::IDEF_UPDATE_TYPE linked_definition_type, ON_FileReference linked_file_reference)
 
void SetSkipNestedLinkedDefinitions (bool bSkipNestedLinkedDefinitions)
 
void SetUnitSystem (const ON_UnitSystem &us)
 
void SetUnitSystem (ON::LengthUnitSystem us)
 
void SetURL (const wchar_t *url)
 
void SetURL_Tag (const wchar_t *url_tag)
 
unsigned int SizeOf () const override
 virtual ON_Object:: override More...
 
bool SkipNestedLinkedDefinitions () const
 
const ON_UnitSystemUnitSystem () const
 
const ON_wString URL () const
 
const ON_wString URL_Tag () const
 
bool Write (ON_BinaryArchive &archive) const override
 
- Public Member Functions inherited from ON_ModelComponent
 ON_ModelComponent () ON_NOEXCEPT
 
 ON_ModelComponent (const ON_ModelComponent &source)
 
 ON_ModelComponent (ON_ModelComponent::Type component_type) ON_NOEXCEPT
 
 ON_ModelComponent (ON_ModelComponent::Type component_type, const ON_ModelComponent &source) ON_NOEXCEPT
 Locked status of source attributes is not copied to permit copy and modify operations. More...
 
 ~ON_ModelComponent ()=default
 
bool ChangeName (const wchar_t *new_name, class ON_ComponentManifest *manifest)
 
bool ClearComponentType ()
 
bool ClearId ()
 
bool ClearIndex ()
 
unsigned int ClearModelComponentAttributes (unsigned int attributes_filter)
 
bool ClearModelComponentStatus ()
 
bool ClearModelSerialNumber ()
 
bool ClearName ()
 
bool ClearParentId ()
 
int CompareName (const ON_UUID &other_parent_id, const wchar_t *other_name) const
 
int CompareName (const wchar_t *other_name) const
 
int CompareNameExact (const ON_UUID &other_parent_id, const wchar_t *other_name) const
 
int CompareNameExact (const wchar_t *other_name) const
 
ON_ModelComponent::Type ComponentType () const
 
bool ComponentTypeIsLocked () const
 
bool ComponentTypeIsSet () const
 
ON__UINT64 ContentVersionNumber () const
 
unsigned int CopyFrom (const ON_ModelComponent &src, unsigned int attributes_filter)
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const override
 
const ON_wString DeletedName () const
 
const ON_NameHashDeletedNameHash () const
 
bool DeletedNameIsSet () const
 
bool DeleteName ()
 
void Dump (ON_TextLog &) const override
 
bool EraseIdentification (bool bIgnoreLocks)
 
const wchar_tGetName (ON_wString &component_name) const
 
const ON_UUIDId () const
 
bool IdIsLocked () const
 
bool IdIsNil () const
 
bool IdIsNotNil () const
 
bool IdIsSet () const
 
const ON_UUIDIfIdIsNilSetId ()
 
int Index () const
 
int Index (int unset_index_value) const
 
bool IndexIsLocked () const
 
bool IndexIsSet () const
 
unsigned int InstanceDefinitionModelSerialNumber () const
 
bool IsDeleted () const
 
bool IsHidden () const
 
bool IsLocked () const
 
bool IsReferenceComponent () const
 
bool IsSystemComponent () const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
void LockAllSettingsExceptName ()
 
void LockComponentType ()
 
void LockId ()
 
void LockIndex ()
 
void LockModelComponentStatus ()
 
void LockModelSerialNumber ()
 
void LockName ()
 
void LockParentId ()
 
ON_ComponentStatus ModelComponentStatus () const
 
bool ModelComponentStatusIsLocked () const
 
bool ModelComponentStatusIsSet () const
 
ON_UUID ModelObjectId () const override
 
unsigned int ModelSerialNumber () const
 
bool ModelSerialNumberIsLocked () const
 
bool ModelSerialNumberIsSet () const
 
const ON_wString Name () const
 
const wchar_tNameAsPointer () const
 
const ON_NameHashNameHash () const
 
bool NameIsEmpty () const
 
bool NameIsLocked () const
 
bool NameIsNotEmpty () const
 
bool NameIsSet () const
 
const ON_NameHash NewNameHash (const wchar_t *new_name) const
 
ON_ModelComponentoperator= (const ON_ModelComponent &source)
 
const ON_UUIDParentId () const
 
bool ParentIdIsLocked () const
 
bool ParentIdIsNil () const
 
bool ParentIdIsNotNil () const
 
bool ParentIdIsSet () const
 
bool ReadModelComponentAttributes (class ON_BinaryArchive &archive)
 
unsigned int ReferenceModelSerialNumber () const
 
ON__UINT64 RuntimeSerialNumber () const
 
const ON_UUIDSetAndLockId ()
 
bool SetAsSystemComponent ()
 
bool SetAsUnsetSystemComponent ()
 
bool SetComponentType (ON_ModelComponent::Type component_component_type)
 
bool SetDeletedModelComponentState (bool bDeleted, class ON_ComponentManifest *manifest)
 
void SetHiddenModelComponentState (bool bHidden)
 
const ON_UUIDSetId ()
 
bool SetId (const ON_UUID &component_id)
 
bool SetIdentification (const class ON_ComponentManifestItem &manifest_item, const wchar_t *manifest_name, bool bSetId, bool bParentId, bool bSetName, bool bSetIndex)
 
bool SetIndex (int component_index)
 
bool SetLocalizedSystemComponentName (const wchar_t *system_component_localized_name)
 
void SetLockedModelComponentState (bool bLocked)
 
bool SetModelComponentStatus (ON_ComponentStatus component_status)
 
bool SetModelSerialNumber (unsigned int model_serial_number)
 
bool SetModelSerialNumber (unsigned int model_serial_number, unsigned int reference_model_serial_number, unsigned int instance_definition_model_serial_number)
 
bool SetName (const wchar_t *component_name)
 
bool SetParentId (const ON_UUID &parent_id)
 
unsigned int SizeOf () const override
 
bool UndeleteName ()
 
bool WriteModelComponentAttributes (class ON_BinaryArchive &archive, unsigned int attributes_filter) const
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
bool DetachUserData (class ON_UserData *pUserData)
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 

Static Public Member Functions

static const ON_InstanceDefinitionFromModelComponentRef (const class ON_ModelComponentReference &model_component_reference, const ON_InstanceDefinition *none_return_value)
 
static ON_InstanceDefinition::IDEF_UPDATE_TYPE InstanceDefinitionTypeFromUnsigned (unsigned int idef_type_as_unsigned)
 Converts and integer into an IDEF_UPDATE_TYPE enum. More...
 
static ON_InstanceDefinition::eLinkedComponentAppearance LinkedComponentAppearanceFromUnsigned (unsigned int linked_component_appearance_as_unsigned)
 
- Static Public Member Functions inherited from ON_ModelComponent
static int CompareId (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareIdAndName (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareName (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareNameAndId (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static int CompareNameExact (const ON_ModelComponent &a, const ON_ModelComponent &b)
 
static ON_ModelComponent::Type ComponentTypeFromUnsigned (unsigned int component_type_as_unsigned)
 
static bool ComponentTypeIsValid (ON_ModelComponent::Type component_type)
 
static bool ComponentTypeIsValidAndNotMixed (ON_ModelComponent::Type component_type)
 
static const ON_wString ComponentTypeToString (ON_ModelComponent::Type)
 
static bool IndexRequired (ON_ModelComponent::Type component_type)
 
static unsigned int Internal_SystemComponentHelper ()
 For internal use. Never call this function. More...
 
static const wchar_tIsNamePathSeparator (const wchar_t *s)
 
*static const wchar_tIsReferencePrefixDelimiter (const wchar_t *s)
 
static const wchar_tIsReferencePrefixSeparator (const wchar_t *s)
 
static bool IsValidComponentName (const class ON_ComponentManifest &model_manfest, const ON_ModelComponent &model_component, bool bPermitReferencePrefix, ON_wString &valid_name)
 
static bool IsValidComponentName (const ON_wString &candidate_component_name)
 
static bool IsValidComponentName (const wchar_t *candidate_component_name)
 
static bool IsValidComponentName (size_t length, const wchar_t *candidate_component_name)
 
static bool IsValidComponentNameFirstCodePoint (int length, const wchar_t *candidate_component_name)
 
static bool IsValidComponentNameFirstCodePoint (ON__UINT32 unicode_code_point)
 
static const ON_wString NameLeaf (const wchar_t *name)
 
static const ON_wString NameParent (const wchar_t *name, bool bIncludeReference)
 
static const ON_wString NameReferencePrefix (const wchar_t *name)
 
static ON__UINT64 NextRuntimeSerialNumber ()
 
static const ON_wString RemoveAllReferencePrefixDelimiters (const wchar_t *name)
 
static const ON_wString RemoveReferencePrefix (const wchar_t *name)
 
static const ON_wString RemoveTrailingNamePathSeparator (const wchar_t *name)
 
static const ON_wString RemoveTrailingReferencePrefixDelimiter (const wchar_t *name)
 
static const ON_wString RemoveTrailingReferencePrefixSeparator (const wchar_t *name)
 
static void SplitName (const wchar_t *name, ON_wString &reference_prefix, ON_wString &name_parent, ON_wString &name_leaf)
 
static bool UniqueNameIgnoresCase (ON_ModelComponent::Type component_type)
 
static bool UniqueNameIncludesParent (ON_ModelComponent::Type component_type)
 
static bool UniqueNameRequired (ON_ModelComponent::Type component_type)
 

Static Public Attributes

static const ON_InstanceDefinition Unset
 
- Static Public Attributes inherited from ON_ModelComponent
static const ON_wString NamePathSeparator
 
static const ON_wString ReferencePrefixDelimiter
 
static const ON_wString ReferencePrefixSeparator
 
static const ON_ModelComponent Unset
 
*static const ON_wString WorksessionReferencePrefix *const wchar_t
 

Additional Inherited Members

- Protected Member Functions inherited from ON_ModelComponent
void IncrementContentVersionNumber () const
 

Detailed Description

Description: An ON_InstanceDefinition defines the geometry used by instance references. See Also: ON_InstanceRef

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Bits that identify subsets of the instance definition fields. These bits are used to determine which fields to set when an ON_InstanceDefinition class is used to modify an existing instance definition.

Enumerator
no_idef_settings 
idef_name_setting 

m_name

idef_description_setting 

m_description

idef_url_setting 

all m_url_* fields

idef_units_setting 

m_us and m_unit_scale

idef_source_archive_setting 

all m_source_*, layer style, update depth fields

idef_userdata_setting 
all_idef_settings 

◆ eLinkedComponentAppearance

ON_InstanceDefinition::LinkedComponentStates specifies how model components (layers, materials, dimension styles, ...) from linked instance definition files are appear in the active model.


Enumerator
Unset 

summary> This is the only valid layer style when the instance definition type is ON_InstanceDefinition::IDEF_UPDATE_TYPE::Static or ON_InstanceDefinition::IDEF_UPDATE_TYPE::LinkedAndEmbedded. This style is not valid when the instance definition type ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked. /summary> summary> Model components (layers, materials, dimension styles, ...) from linked instance definition files are embedded as ordinary components in the active model. This layer style may be used when the instance definition type is ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked. /summary>

Active 

summary> Layers from the linked instance definition are reference components in the model. This is the default layer style when the instance definition type is ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked. This layer style may be used when the instance definition type is ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked. /summary>

Reference 

◆ IDEF_UPDATE_TYPE

enum ON_InstanceDefinition::IDEF_UPDATE_TYPE : unsigned int
strong

IDEF_UPDATE_TYPE lists the possible relationships between the instance definition geometry and the archive (m_source_archive) containing the original definition.

Enumerator
Unset 
Static 
LinkedAndEmbedded 
Linked 

Constructor & Destructor Documentation

◆ ON_InstanceDefinition() [1/2]

ON_InstanceDefinition::ON_InstanceDefinition ( )

◆ ~ON_InstanceDefinition()

ON_InstanceDefinition::~ON_InstanceDefinition ( )

◆ ON_InstanceDefinition() [2/2]

ON_InstanceDefinition::ON_InstanceDefinition ( const ON_InstanceDefinition )

Member Function Documentation

◆ AddInstanceGeometryId()

bool ON_InstanceDefinition::AddInstanceGeometryId ( ON_UUID  id)

Description: Add id to the InstanceGeometryIdList(). Parameters: id - [in] non-nil id to add. Returns: True if id is not nil and was added to the InstanceGeometryIdList().

◆ BoundingBox()

const ON_BoundingBox ON_InstanceDefinition::BoundingBox ( ) const

◆ ClearBoundingBox()

void ON_InstanceDefinition::ClearBoundingBox ( )

◆ ClearInstanceGeometryIdList()

void ON_InstanceDefinition::ClearInstanceGeometryIdList ( )

Description: Remove all ids from the InstanceGeometryIdList().

◆ ClearLinkedFileContentHash()

void ON_InstanceDefinition::ClearLinkedFileContentHash ( )

◆ ClearLinkedFileReference()

void ON_InstanceDefinition::ClearLinkedFileReference ( )

Destroy all linked file path information and convert the type to Static.

◆ ClearLinkedFileRelativePath()

void ON_InstanceDefinition::ClearLinkedFileRelativePath ( )

◆ ClearLinkedIdefReferenceComponentSettings()

void ON_InstanceDefinition::ClearLinkedIdefReferenceComponentSettings ( )

◆ ContentHash()

const ON_SHA1_Hash ON_InstanceDefinition::ContentHash ( ) const

Returns: A SHA-1 hash of these instance definitions properties Description() URL() URL_Tag() and all the properties that contribute to the GeometryContentHash().

◆ Description()

const ON_wString ON_InstanceDefinition::Description ( ) const

◆ Dump()

void ON_InstanceDefinition::Dump ( ON_TextLog text_log) const
overridevirtual

virtual ON_Object::Dump override

Reimplemented from ON_Object.

Reimplemented in CRhinoInstanceDefinition.

◆ FromModelComponentRef()

static const ON_InstanceDefinition* ON_InstanceDefinition::FromModelComponentRef ( const class ON_ModelComponentReference model_component_reference,
const ON_InstanceDefinition none_return_value 
)
static

Parameters: model_component_reference - [in] none_return_value - [in] value to return if ON_InstanceDefinition::Cast(model_component_ref.ModelComponent()) is nullptr Returns: If ON_InstanceDefinition::Cast(model_component_ref.ModelComponent()) is not nullptr, that pointer is returned. Otherwise, none_return_value is returned.

◆ GeometryContentHash()

const ON_SHA1_Hash ON_InstanceDefinition::GeometryContentHash ( ) const

◆ HasLinkedIdefReferenceComponentSettings()

bool ON_InstanceDefinition::HasLinkedIdefReferenceComponentSettings ( ) const

Returns: True if this is a linked instance definition with layer settings information.

◆ IdefUpdateType()

ON_InstanceDefinition::IDEF_UPDATE_TYPE ON_InstanceDefinition::IdefUpdateType ( ) const

◆ InstanceDefinitionType()

ON_InstanceDefinition::IDEF_UPDATE_TYPE ON_InstanceDefinition::InstanceDefinitionType ( ) const

◆ InstanceDefinitionTypeFromUnsigned()

static ON_InstanceDefinition::IDEF_UPDATE_TYPE ON_InstanceDefinition::InstanceDefinitionTypeFromUnsigned ( unsigned int  idef_type_as_unsigned)
static

Converts and integer into an IDEF_UPDATE_TYPE enum.

◆ InstanceGeometryIdList()

const ON_SimpleArray<ON_UUID>& ON_InstanceDefinition::InstanceGeometryIdList ( ) const

Returns: A list of object ids in the instance geometry table sorted by id.

◆ IsInstanceGeometryId()

bool ON_InstanceDefinition::IsInstanceGeometryId ( ON_UUID  id) const

Returns: True if id is in the InstanceGeometryIdList().

◆ IsLinkedType()

bool ON_InstanceDefinition::IsLinkedType ( ) const

◆ IsValid()

bool ON_InstanceDefinition::IsValid ( class ON_TextLog text_log = nullptr) const
overridevirtual

Description: Tests an object to see if its data members are correctly initialized. Parameters: text_log - [in] if the object is not valid and text_log is not nullptr, then a brief englis description of the reason the object is not valid is appened to the log. The information appended to text_log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Returns: @untitled table true object is valid false object is invalid, uninitialized, etc.

Reimplemented from ON_Object.

◆ LinkedComponentAppearance()

ON_InstanceDefinition::eLinkedComponentAppearance ON_InstanceDefinition::LinkedComponentAppearance ( ) const

◆ LinkedComponentAppearanceFromUnsigned()

static ON_InstanceDefinition::eLinkedComponentAppearance ON_InstanceDefinition::LinkedComponentAppearanceFromUnsigned ( unsigned int  linked_component_appearance_as_unsigned)
static

◆ LinkedFilePath()

const ON_wString& ON_InstanceDefinition::LinkedFilePath ( ) const

◆ LinkedFileReference()

const ON_FileReference ON_InstanceDefinition::LinkedFileReference ( ) const

◆ LinkedIdefReferenceComponentSettings() [1/2]

const ON_ReferencedComponentSettings* ON_InstanceDefinition::LinkedIdefReferenceComponentSettings ( ) const

Parameters: bCreateIfNonePresent - [in] When bCreateIfNonePresent is true and the idef type is ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked, then ON_ReferencedComponentSettings will be created if none are present. Return: ON_ReferencedComponentSettings pointer or nullptr.

◆ LinkedIdefReferenceComponentSettings() [2/2]

ON_ReferencedComponentSettings* ON_InstanceDefinition::LinkedIdefReferenceComponentSettings ( bool  bCreateIfNonePresent)

Parameters: bCreateIfNonePresent - [in] When bCreateIfNonePresent is true and the idef type is ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked, then ON_ReferencedComponentSettings will be created if none are present. Return: ON_ReferencedComponentSettings pointer or nullptr.

◆ ObjectType()

ON::object_type ON_InstanceDefinition::ObjectType ( ) const
overridevirtual

Description: Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.

Returns: ON::object_type enum value.

Remarks: The default implementation of this virtual function returns ON::unknown_object_type

Reimplemented from ON_Object.

◆ operator=()

ON_InstanceDefinition& ON_InstanceDefinition::operator= ( const ON_InstanceDefinition )

◆ Read()

bool ON_InstanceDefinition::Read ( ON_BinaryArchive binary_archive)
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

◆ RemoveInstanceGeometryId() [1/2]

bool ON_InstanceDefinition::RemoveInstanceGeometryId ( int  id_index)

Description: Remove InstanceGeometryIdList()[id_index] from the InstanceGeometryIdList() array.

◆ RemoveInstanceGeometryId() [2/2]

bool ON_InstanceDefinition::RemoveInstanceGeometryId ( ON_UUID  id)

Description: Remove id from the InstanceGeometryIdList().

◆ SetBoundingBox()

void ON_InstanceDefinition::SetBoundingBox ( ON_BoundingBox  bbox)

◆ SetDescription()

void ON_InstanceDefinition::SetDescription ( const wchar_t description)

◆ SetInstanceDefinitionType()

bool ON_InstanceDefinition::SetInstanceDefinitionType ( const ON_InstanceDefinition::IDEF_UPDATE_TYPE  instance_definition_type)

Parameters: instance_definition_type - [in] ON_InstanceDefinition::IDEF_UPDATE_TYPE::Unset - change the type to Unset and remove all linked file information. ON_InstanceDefinition::IDEF_UPDATE_TYPE::Static - change the type to Static and remove all linked file information. ON_InstanceDefinition::IDEF_UPDATE_TYPE::LinkedAndEmbedded - change the type to from Linked to LinkedAndEmbedded. If the current type is not Linked, then no changes are made. ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked - change the type to from LinkedAndEmbedded to Linked. If the current type is not LinkedAndEmbedded, then no changes are made.

◆ SetInstanceGeometryIdList()

void ON_InstanceDefinition::SetInstanceGeometryIdList ( const ON_SimpleArray< ON_UUID > &  instance_geometry_id_list)

Parameters: instance_geometry_id_list - [in] A list of object ids in the instance geometry table.

◆ SetLinkedComponentAppearance()

bool ON_InstanceDefinition::SetLinkedComponentAppearance ( ON_InstanceDefinition::eLinkedComponentAppearance  linked_component_appearance)

◆ SetLinkedFileReference() [1/2]

bool ON_InstanceDefinition::SetLinkedFileReference ( ON_InstanceDefinition::IDEF_UPDATE_TYPE  linked_definition_type,
const wchar_t linked_file_full_path 
)

◆ SetLinkedFileReference() [2/2]

bool ON_InstanceDefinition::SetLinkedFileReference ( ON_InstanceDefinition::IDEF_UPDATE_TYPE  linked_definition_type,
ON_FileReference  linked_file_reference 
)

Parameters: linked_definition_type - [in] Either ON_InstanceDefinition::IDEF_UPDATE_TYPE::LinkedAndEmbedded or ON_InstanceDefinition::IDEF_UPDATE_TYPE::Linked. linked_file_reference - [in]

◆ SetSkipNestedLinkedDefinitions()

void ON_InstanceDefinition::SetSkipNestedLinkedDefinitions ( bool  bSkipNestedLinkedDefinitions)

◆ SetUnitSystem() [1/2]

void ON_InstanceDefinition::SetUnitSystem ( const ON_UnitSystem us)

◆ SetUnitSystem() [2/2]

void ON_InstanceDefinition::SetUnitSystem ( ON::LengthUnitSystem  us)

Description: Sets m_us and m_unit_scale.

◆ SetURL()

void ON_InstanceDefinition::SetURL ( const wchar_t url)

◆ SetURL_Tag()

void ON_InstanceDefinition::SetURL_Tag ( const wchar_t url_tag)

◆ SizeOf()

unsigned int ON_InstanceDefinition::SizeOf ( ) const
overridevirtual

virtual ON_Object:: override

Reimplemented from ON_Object.

Reimplemented in CRhinoInstanceDefinition.

◆ SkipNestedLinkedDefinitions()

bool ON_InstanceDefinition::SkipNestedLinkedDefinitions ( ) const

Description: This property applies when an instance definition is linked. Returns: true: When reading the file that defines the content of the linked instance definition, skip any linked instance definitions found in that file. false: When reading the file that defines the content of the linked instance definition, recursively load linked instance definitions found in that file.

◆ UnitSystem()

const ON_UnitSystem& ON_InstanceDefinition::UnitSystem ( ) const

◆ URL()

const ON_wString ON_InstanceDefinition::URL ( ) const

◆ URL_Tag()

const ON_wString ON_InstanceDefinition::URL_Tag ( ) const

◆ Write()

bool ON_InstanceDefinition::Write ( ON_BinaryArchive binary_archive) const
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

Member Data Documentation

◆ Unset

const ON_InstanceDefinition ON_InstanceDefinition::Unset
static