16 #if !defined(ON_MODEL_COMPONENT_INC_) 17 #define ON_MODEL_COMPONENT_INC_ 36 unsigned int SizeOf()
const override;
40 ON__UINT32 current_remainder
47 #pragma region RH_C_SHARED_ENUM [ON_ModelComponent::Type] [Rhino.DocObjects.ModelComponentType] [public:byte] 53 enum class Type : unsigned char
78 InstanceDefinition = 11,
91 unsigned int component_type_as_unsigned
105 static bool ComponentTypeIsValid(
117 static bool ComponentTypeIsValidAndNotMixed(
134 static bool UniqueNameRequired(
148 static bool UniqueNameIncludesParent(
161 static bool UniqueNameIgnoresCase(
165 static bool IndexRequired(
177 static bool IsValidComponentNameFirstCodePoint(
178 ON__UINT32 unicode_code_point
196 static bool IsValidComponentNameFirstCodePoint(
198 const wchar_t* candidate_component_name
201 static bool IsValidComponentName(
202 const wchar_t* candidate_component_name
205 static bool IsValidComponentName(
209 static bool IsValidComponentName(
211 const wchar_t* candidate_component_name
225 static bool IsValidComponentName(
228 bool bPermitReferencePrefix,
276 ComponentSerialNumberAttribute = 0x0001U,
277 TypeAttribute = 0x0002U,
278 ModelSerialNumberAttribute = 0x0004U,
279 IdAttribute = 0x0008U,
280 IndexAttribute = 0x0010U,
281 NameAttribute = 0x0020U,
282 ParentIdAttribute = 0x0040U,
283 DeletedNameAttribute = 0x0080U,
284 ComponentStatusAttribute = 0x0100U,
289 BinaryArchiveAttributes = 0x78U,
292 AllAttributes = 0x1FFU,
294 SystemComponentAttribute = 0x8000U
297 unsigned int CopyFrom(
299 unsigned int attributes_filter
302 bool WriteModelComponentAttributes(
304 unsigned int attributes_filter
307 bool ReadModelComponentAttributes(
331 bool SetModelSerialNumber(
332 unsigned int model_serial_number
349 bool SetModelSerialNumber(
350 unsigned int model_serial_number,
351 unsigned int reference_model_serial_number,
352 unsigned int instance_definition_model_serial_number
366 unsigned int ModelSerialNumber()
const;
386 unsigned int ReferenceModelSerialNumber()
const;
406 unsigned int InstanceDefinitionModelSerialNumber()
const;
414 bool ClearModelSerialNumber();
422 void LockModelSerialNumber();
429 bool ModelSerialNumberIsLocked()
const;
436 bool ModelSerialNumberIsSet()
const;
442 bool IsReferenceComponent()
const;
465 bool SetComponentType(
474 bool ClearComponentType();
480 void LockComponentType();
486 bool ComponentTypeIsLocked()
const;
492 bool ComponentTypeIsSet()
const;
510 bool IdIsNil()
const;
511 bool IdIsNotNil()
const;
537 const ON_UUID& IfIdIsNilSetId();
567 bool IdIsLocked()
const;
573 bool IdIsSet()
const;
611 int unset_index_value
642 bool IndexIsLocked()
const;
648 bool IndexIsSet()
const;
655 const ON_UUID& ParentId()
const;
657 bool ParentIdIsNil()
const;
658 bool ParentIdIsNotNil()
const;
663 bool ClearParentId();
665 bool ParentIdIsLocked()
const;
666 bool ParentIdIsSet()
const;
675 bool SetModelComponentStatus(
679 bool ClearModelComponentStatus();
681 void LockModelComponentStatus();
683 bool ModelComponentStatusIsLocked()
const;
685 bool ModelComponentStatusIsSet()
const;
693 bool IsDeleted()
const;
705 bool SetDeletedModelComponentState(
717 bool IsLocked()
const;
719 void SetLockedModelComponentState(
730 bool IsHidden()
const;
732 void SetHiddenModelComponentState(
766 const wchar_t* GetName(
793 const wchar_t* new_name
839 static const ON_wString ReferencePrefixDelimiter;
884 static const ON_wString ReferencePrefixSeparator;
939 static const wchar_t* IsReferencePrefixDelimiter(
960 static const wchar_t* IsReferencePrefixSeparator(
981 static const wchar_t* IsNamePathSeparator(
992 static void SplitName(
1020 const wchar_t* name,
1021 bool bIncludeReference
1039 static const ON_wString RemoveReferencePrefix(
1047 static const ON_wString RemoveAllReferencePrefixDelimiters(
1057 static const ON_wString RemoveTrailingReferencePrefixDelimiter(
1065 static const ON_wString RemoveTrailingReferencePrefixSeparator(
1073 static const ON_wString RemoveTrailingNamePathSeparator(
1098 const wchar_t* NameAsPointer()
const;
1104 bool NameIsEmpty()
const;
1110 bool NameIsNotEmpty()
const;
1128 const wchar_t* component_name
1141 const wchar_t* new_name,
1162 bool NameIsLocked()
const;
1171 bool NameIsSet()
const;
1179 bool DeletedNameIsSet()
const;
1194 bool UndeleteName();
1196 void LockAllSettingsExceptName();
1197 bool SetLocalizedSystemComponentName(
1198 const wchar_t* system_component_localized_name
1210 const ON_UUID& other_parent_id,
1211 const wchar_t* other_name
1214 const wchar_t* other_name
1227 int CompareNameExact(
1228 const ON_UUID& other_parent_id,
1229 const wchar_t* other_name
1231 int CompareNameExact(
1232 const wchar_t* other_name
1245 static int CompareName(
1261 static int CompareNameExact(
1266 static int CompareId(
1276 static int CompareNameAndId(
1286 static int CompareIdAndName(
1306 bool SetIdentification(
1308 const wchar_t* manifest_name,
1332 unsigned int ClearModelComponentAttributes(
1333 unsigned int attributes_filter
1342 ON__UINT64 RuntimeSerialNumber()
const;
1353 ON__UINT64 ContentVersionNumber()
const;
1387 bool IsSystemComponent()
const;
1389 bool EraseIdentification(
1393 bool SetAsSystemComponent();
1394 bool SetAsUnsetSystemComponent();
1397 bool Internal_SetAsSystemComponent(
1398 bool bUnsetSystemComponent
1406 void IncrementContentVersionNumber()
const;
1409 const ON__UINT64 m_runtime_serial_number;
1410 mutable ON__UINT64 m_content_version_number = 0;
1411 ON__UINT32 m_model_serial_number = 0;
1412 ON__UINT32 m_reference_model_serial_number = 0;
1413 ON__UINT32 m_linked_idef_serial_number = 0;
1416 ON__UINT16 m_locked_status = 0;
1417 ON__UINT16 m_set_status = 0;
1419 ON__UINT8 m_reserved1 = 0;
1420 ON__UINT16 m_reserved2 = 0;
1435 ON__INT32 m_component_index = ON_UNSET_INT_INDEX;
1436 ON__UINT32 m_reserved3 = 0;
1438 ON_UUID m_component_id = ON_nil_uuid;
1439 ON_UUID m_component_parent_id = ON_nil_uuid;
1447 static unsigned int Internal_SystemComponentHelper();
1533 static bool EqualContent(
1548 ON__UINT64 ComponentRuntimeSerialNumber()
const;
1554 ON__UINT64 ComponentContentVersionNumber()
const;
1574 bool IsUnset()
const;
1577 ON_UUID m_component_id = ON_nil_uuid;
1578 ON__UINT64 m_component_serial_number = 0;
1579 ON__UINT64 m_component_content_version_number = 0;
1583 unsigned char m_reserved1 = 0;
1584 unsigned char m_reserved2 = 0;
1585 unsigned char m_reserved3 = 0;
1586 unsigned int m_reserved4 = 0;
1633 unsigned int TypeCount() const;
1678 ON__INT32 m_type_count = 0;
1681 ON__INT32 m_current_index = ON_UNSET_UINT_INDEX;
1689 static const ON_ModelComponentReference Empty;
1692 ON_ModelComponentReference() ON_NOEXCEPT;
1693 ~ON_ModelComponentReference();
1694 ON_ModelComponentReference(
const ON_ModelComponentReference&) ON_NOEXCEPT;
1695 ON_ModelComponentReference& operator=(
const ON_ModelComponentReference&);
1697 #if defined(ON_HAS_RVALUEREF) 1698 ON_ModelComponentReference( ON_ModelComponentReference&& ) ON_NOEXCEPT;
1699 ON_ModelComponentReference& operator=( ON_ModelComponentReference&& );
1702 ON_ModelComponentReference(
1703 std::shared_ptr<ON_ModelComponent>& sp
1706 ON_ModelComponentReference& operator=(
1707 std::shared_ptr<ON_ModelComponent>& sp
1720 static ON_ModelComponentReference CreateConstantSystemComponentReference(
1738 static ON_ModelComponentReference CreateForExperts(
1740 bool bManagedComponentReference
1749 ON__UINT64 ModelComponentRuntimeSerialNumber()
const ON_NOEXCEPT;
1750 const ON_UUID ModelComponentId()
const ON_NOEXCEPT;
1751 const ON_NameHash ModelComponentNameHash()
const ON_NOEXCEPT;
1752 int ModelComponentIndex()
const ON_NOEXCEPT;
1754 unsigned int ReferenceCount()
const ON_NOEXCEPT;
1756 bool IsEmpty()
const ON_NOEXCEPT;
1763 #pragma ON_PRAGMA_WARNING_PUSH 1764 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 1767 std::shared_ptr<ON_ModelComponent> m_sp;
1768 #pragma ON_PRAGMA_WARNING_POP 1771 #if defined(ON_DLL_TEMPLATE) Definition: opennurbs_model_component.h:1534
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
The ON_ModelComponent class is a base class for all components in a model and manages the index...
Definition: opennurbs_model_component.h:24
void Dump(ON_TextLog &) const override
Creates a text dump of the object.
Definition: opennurbs_string.h:2020
virtual unsigned int SizeOf() const
Definition: opennurbs_archive.h:1044
Type
The ON_ModelComponent::Type enum has a value for each explicit component type and two special values...
Definition: opennurbs_model_component.h:52
Definition: opennurbs_model_component.h:1406
virtual void Dump(ON_TextLog &) const
Creates a text dump of the object.
Attributes
Definition: opennurbs_model_component.h:258
Definition: opennurbs_archive.h:478
Definition: opennurbs_compstat.h:88
virtual bool IsValid(class ON_TextLog *text_log=nullptr) const
Tests an object to see if its data members are correctly initialized.
Pure virtual base class for all classes that must provide runtime class id or support object level 3D...
Definition: opennurbs_object.h:460
An ON_NameHash is designed to help search for and compare attribute names like the ON_ModelComponent...
Definition: opennurbs_string.h:3434
Definition: opennurbs_array.h:409
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
static const ON_ComponentStatus NoneSet
Definition: opennurbs_compstat.h:92
Definition: opennurbs_model_component.h:1622
virtual ON__UINT32 DataCRC(ON__UINT32 current_remainder) const
Returns a CRC calculated from the information that defines the object. This CRC can be used as a quic...
virtual ON_UUID ModelObjectId() const
All objects in an opennurbs model have an id ( ON_Layer.m_layer_id, ON_Font.m_font_id, ON_Material.m_material_id, ON_3dmObjectAttributes.m_uuid ).