Rhino C++ API
8.14
|
#include <opennurbs_object.h>
Public Member Functions | |
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 ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
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) |
virtual void | Dump (ON_TextLog &) const |
void | EmergencyDestroy () |
class ON_UserData * | FirstUserData () const |
virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
class ON_UserData * | GetUserData (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 bool | IsValid (class ON_TextLog *text_log=nullptr) const |
virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
virtual void | MemoryRelocate () |
virtual ON_UUID | ModelObjectId () const |
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) |
virtual ON::object_type | ObjectType () const |
ON_Object & | operator= (const ON_Object &) |
void | PurgeUserData () |
virtual bool | Read (ON_BinaryArchive &binary_archive) |
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) |
virtual unsigned int | SizeOf () const |
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 |
virtual bool | Write (ON_BinaryArchive &binary_archive) const |
Description: Pure virtual base class for all classes that must provide runtime class id or support object level 3DM serialization
|
strong |
Description: When a userdata item is copied or moved from a source object to a destination object, the ON_Object::UserDataConflictResolution enum values specify how conflicts are resolved. Remark: A userdata item "conflict" occurs when both the destination and source object have a user data item with the same value of ON_UserData::m_userdata_uuid.
ON_Object::ON_Object | ( | ) |
|
virtual |
ON_Object::ON_Object | ( | const ON_Object & | ) |
|
virtual |
Description: Call whenever a component status setting is modified by directly changing it on a component in a way that will result in any saved information about the parent object's aggregate component status becoming invalid.
Returns: Aggregate information about the object's component states.
Remarks: This function "should" return a const ON_AggregateComponentStatusEx, but that requires breaking the C++ SDK.
bool ON_Object::AttachUserData | ( | class ON_UserData * | pUserData | ) |
END: User string support User data provides a standard way for extra information to be attached to any class derived from ON_Object. The attached information can persist and be transformed. If you use user data, please carefully read all the comments from here to the end of the file. Description: Attach user data to an object. Parameters: pUserData - [in] user data to attach to object. The ON_UserData pointer passed to AttachUserData() must be created with new.
Returns: If true is returned, then ON_Object will delete the user data when appropriate. If false is returned, then data could not be attached and caller must delete.
Remarks: AttachUserData() will fail if the user data's m_userdata_uuid field is nil or not unique.
unsigned int ON_Object::ClearAllComponentStates | ( | ) | const |
Component status interface
Currently implemented on ON_SubD and ON_Brep Description: Set all active level component states to ON_ComponentStatus::NoneSet. Returns: Number of components where a state setting changed.
|
virtual |
Description: Clear states on an individual component. Parameters: component_index - [in] The states will be cleared on this component. states_to_clear - [in] If a state is set in the states_to_clear parameter, the same state will be cleared on the component.
Returns: 0: no state settings changed on the component. 1: some state setting changed on the component.
|
virtual |
void ON_Object::CopyUserData | ( | const ON_Object & | source_object | ) |
Description: Calls CopyUserData(source_object,ON_Object::UserDataConflictResolution::source_object). Parameters: source_object - [in]
unsigned int ON_Object::CopyUserData | ( | const ON_Object & | source_object, |
ON_UUID | source_userdata_item_id, | ||
ON_Object::UserDataConflictResolution | userdata_conflict_resolution | ||
) |
Description: Expert user tool that copies user data items with positive values of ON_UserData.m_userdata_copycount from source_object to "this. Parameters: source_object - [in] source of user data to copy source_userdata_item_id - [in] If source_userdata_item_id is not nil, then only the user data item with a matching ON_UserData.m_userdata_uuid value will be copied. userdata_conflict_resolution - [in] method to resolve userdata item conflicts. Remarks: Generally speaking you don't need to use CopyUserData(). Simply rely on ON_Object::operator=() or the copy constructor to do the right thing. Returns: Number of user data items that were copied.
|
virtual |
Description: Returns a CRC calculated from the information that defines the object. This CRC can be used as a quick way to see if two objects are not identical. Parameters: current_remainder - [in]; Returns: CRC of the information the defines the object.
Reimplemented in ON_SubDEdgeChainCurve, ON_SubD, ON_Mesh, ON_Brep, ON_NurbsCage, ON_BrepFace, ON_ClippingPlaneSurface, ON_DocumentUserStringList, ON_UserStringList, ON_BrepEdge, ON_SumSurface, ON_NurbsSurface, ON_RevSurface, ON_NurbsCurve, ON_BrepVertex, ON_PolyCurve, ON_Extrusion, ON_CurveProxy, ON_SurfaceProxy, ON_LineCurve, ON_PolylineCurve, ON_ArcCurve, ON_PlaneSurface, and ON_ModelComponent.
|
virtual |
|
virtual |
Expert interface Description: Expert user function. If you are using openNURBS in its default configuration to read and write 3dm archives, you never need to call this function. Many objects employ lazy creation of (runtime) caches that save information to help speed geometric calculations. This function will destroy all runtime information. Parameters: bDelete - [in] if true, any cached information is properly deleted. If false, any cached information is simply discarded. This is useful when the cached information may be in alternate memory pools that are managed in nonstandard ways.
Reimplemented in ON_SubDEdgeChainCurve, ON_SubD, ON_Mesh, ON_MorphControl, ON_Brep, ON_NurbsCage, ON_BrepFace, CRhinoInstanceObject, ON_BrepLoop, CRhinoSubDObject, ON_BrepTrim, CRhinoPolyEdgeSegment, CRhinoPointCloudObject, ON_PolyEdgeSegment, CRhinoTextDot, CRhinoBrepObject, ON_Curve, CRhinoObject, ON_Extrusion, ON_Surface, ON_CurveProxy, ON_PolyCurve, ON_PolyEdgeCurve, ON_SurfaceProxy, ON_SumSurface, CRhinoPolyEdge, ON_RevSurface, CRhinoExtrusionObject, and CRhinoInstanceDefinition.
bool ON_Object::DetachUserData | ( | class ON_UserData * | pUserData | ) |
Description: Remove user data from an object. Parameters: pUserData - [in] user data to attach to object. The ON_UserData pointer passed to DetachUserData() must have been previously attached using AttachUserData().
Returns: If true is returned, then the user data was attached to this object and it was detached. If false is returned, then the user data was not attached to this object to begin with. In all cases, you can be assured that the user data is no longer attached to "this". Remarks: Call delete pUserData if you want to destroy the user data.
|
virtual |
Description: Creates a text dump of the object. Remarks: Dump() is intended for debugging and is not suitable for creating high quality text descriptions of an object.
The default implementations of this virtual function prints the class's name.
Reimplemented in ON_NurbsCage, ON_3dmRenderSettings, ON_UserStringList, ON_InstanceDefinition, ON_Material, ON_ModelGeometryComponent, CRhinoInstanceDefinition, ON_UserData, ON_TextDot, ON_Leader, ON_NurbsCurve, ON_PolylineCurve, ON_SubDEdgeChainCurve, ON_SubDComponentRef, ON_MeshComponentRef, ON_SubD, ON_Mesh, ON_Brep, ON_MorphControl, ON_BrepFace, ON_BrepLoop, ON_ClippingPlaneSurface, ON_Hatch, ON_DocumentUserStringList, ON_BrepTrim, ON_DimStyle, ON_HatchPattern, ON_UnknownUserData, ON_BrepEdge, ON_TextContent, ON_NurbsSurface, ON_CurveProxy, ON_TextureMapping, ON_TextStyle, ON_Texture, ON_SumSurface, ON_Viewport, ON_ArcCurve, ON_Linetype, ON_PolyCurve, ON_RevSurface, ON_HistoryRecord, ON_BrepVertex, ON_CurveOnSurface, ON_SurfaceProxy, ON_PointCloud, ON_Extrusion, ON_LineCurve, ON_Layer, ON_PlaneSurface, ON_Text, ON_Bitmap, ON_PointGrid, ON_Point, ON_SectionStyle, ON_3dmObjectAttributes, ON_DetailView, ON_Light, CRhinoGroupGeometry, ON_ModelComponent, ON_HLDCurve, and CRhinoObjectAttributes.
void ON_Object::EmergencyDestroy | ( | ) |
Description: Sets m_user_data_list = 0.
class ON_UserData* ON_Object::FirstUserData | ( | ) | const |
Description: User data is stored as a linked list of ON_UserData classes. FirstUserData gets the first item in the linked list. This is the most recent item attached using AttachUserData(). Remark: To iterate through all the user data on an object, call FirstUserData() and then use ON_UserData::Next() to traverse the list.
|
virtual |
Parameters: states_filter - [in]
bAllEqualStates - [in] If a state is set in states_filter, all active level components with the same state set will be included in the components_with_set_states[] array.
If bAllEqualStates is true, then ON_ComponentStatus::AllEqualStates() is used to test for inclusion.
If bAllEqualStates is false, then ON_ComponentStatus::SomeEqualStates() is used to test for inclusion.
components_with_set_states - [out] Returns: Number of returned components.
class ON_UserData* ON_Object::GetUserData | ( | const ON_UUID & | userdata_uuid | ) | const |
Description: Get a pointer to user data. Parameters: userdata_uuid - [in] value of the user data's m_userdata_uuid field. Remarks: The returned user data is still attached to the object. Deleting the returned user data will automatically remove the user data from the object.
bool ON_Object::GetUserString | ( | const wchar_t * | key, |
ON_wString & | string_value | ||
) | const |
Description: Get user string from the object. Parameters: key - [in] id used to retrieve the string. string_value - [out] Returns: True if a string with id was found.
int ON_Object::GetUserStringKeys | ( | ON_ClassArray< ON_wString > & | user_string_keys | ) | const |
Description: Get a list of all user string keys on the object. Parameters: user_string_keys - [out] user string keys are appended to this list. Returns: Number of elements appended to the user_strings list.
int ON_Object::GetUserStrings | ( | ON_ClassArray< ON_UserString > & | user_strings | ) | const |
Description: Get a list of all user strings on the object. Parameters: user_strings - [out] user strings are appended to this list. Returns: Number of elements appended to the user_strings list.
bool ON_Object::IsCorrupt | ( | bool | bRepair, |
bool | bSilentError, | ||
class ON_TextLog * | text_log | ||
) | const |
Description: Check for corrupt data values that are likely to cause crashes. Parameters: bRepair - [in] If true, const_cast<> will be used to change the corrupt data so that crashes are less likely. bSilentError - [in] If true, ON_ERROR will not be called when corruption is detected. text_log - [out] If text_log is not null, then a description of corruption is printed using text_log. Remarks: Ideally, IsCorrupt() would be a virtual function on ON_Object, but doing that at this point would break the public SDK.
bool ON_Object::IsKindOf | ( | const ON_ClassId * | pClassId | ) | const |
Description: Low level tool to test if an object is derived from a specified class. Parameters: pClassId - [in] use classname::ClassId() Returns: true if the instantiated object is derived from the class whose id is passed as the argument. Example:
ON_Object* p = ....; if ( p->IsKindOf( ON_NurbsCurve::ClassId() ) ) { it's a NURBS curve }
Remarks: The primary reason for IsKindOf() is to support the static Cast() members declared in the ON_OBJECT_DECLARE macro. If we determine that dynamic_cast is properly supported and implemented by all supported compilers, then IsKindOf() may disappear. If an application needs to determine if a pointer points to a class derived from ON_SomeClassName, then call ON_SomeClassName::Cast(mystery pointer) and check for a non-null return.
|
virtual |
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 english description of the reason the object is not valid is appended 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 in CRhinoInstanceObject, CRhinoPlugIn, CRhinoObject, CRhinoWidgetGeometry, CRhinoGroupGeometry, ON_SubDEdgeChainCurve, ON_SubDComponentRef, ON_MeshComponentRef, ON_SubD, ON_Mesh, ON_Brep, ON_MorphControl, ON_BrepRegion, ON_BrepFaceSide, ON_NurbsCage, ON_BrepFace, ON_TextDot, ON_BrepLoop, ON_InstanceRef, ON_Hatch, ON_DocumentUserStringList, ON_UserDataHolder, ON_BrepTrim, ON_EmbeddedBitmap, ON_DimStyle, ON_HatchPattern, ON_UnknownUserData, ON_BrepEdge, ON_WindowsBitmap, ON_InstanceDefinition, ON_NurbsSurface, ON_CurveProxy, ON_TextureMapping, ON_NurbsCurve, ON_TextStyle, ON_Texture, ON_Material, ON_SumSurface, ON_Viewport, ON_ArcCurve, ON_Linetype, ON_RevSurface, ON_HistoryRecord, ON_BrepVertex, ON_Dimension, ON_PolyCurve, ON_TextContent, ON_CurveOnSurface, ON_SurfaceProxy, ON_Annotation, ON_Extrusion, ON_PointCloud, ON_Geometry, ON_LineCurve, ON_Leader, ON_PolylineCurve, ON_Layer, ON_PlaneSurface, ON_PointGrid, ON_Point, ON_SectionStyle, ON_3dmObjectAttributes, ON_DetailView, ON_Light, ON_Text, ON_UserData, and ON_ModelComponent.
|
virtual |
Description: Call whenever a component status setting is modified by directly changing it on a component in a way that will result in any saved information about the parent object's aggregate component status becoming invalid.
Remarks: The implementations of this function are nearly instant. and this function may be called as frequently as needed. The next time AggregateComponentStatus() is called the information used to return the value will be updated.
|
virtual |
Description: The MemoryRelocate() function is called when an object's location in memory is changed. For example, if an object resides in a chunk of memory that is grown by calling a realloc that has to allocate a new chunk and copy the contents of the old chunk to the new chunk, then the location of the object's memory changes. In practice this happens when classes derived from ON_Object are stored in dynamic arrays, like the default implementation of ON_ObjectArray<>'s that use realloc to grow the dynamic array.
Reimplemented in ON_SubD, ON_Mesh, ON_Brep, ON_MorphControl, CRhinoInstanceObject, CRhinoPointCloudObject, CRhinoObject, CRhinoGroupObject, CRhinoDetailViewObject, ON_DetailView, CRhinoClippingPlaneObject, CRhinoLight, and CRhinoPointObject.
|
virtual |
Description: 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 ). Returns: The id used to identify the object in the opennurbs model.
Reimplemented in CRhinoObject, ON_Light, and ON_ModelComponent.
void ON_Object::MoveUserData | ( | ON_Object & | source_object | ) |
Description: Calls MoveUserData(source_object,ON_Object::UserDataConflictResolution::source_object,true). Parameters: source_object - [in]
unsigned int ON_Object::MoveUserData | ( | ON_Object & | source_object, |
ON_UUID | source_userdata_item_id, | ||
ON_Object::UserDataConflictResolution | userdata_conflict_resolution, | ||
bool | bDeleteAllSourceItems | ||
) |
Description: Expert user tool that moves user data items from source_object to "this. Parameters: source_object - [in] source of user data to copy source_userdata_item_id - [in] If source_userdata_item_id is not nil, then only the user data item with a matching ON_UserData.m_userdata_uuid value will be moved. userdata_conflict_resolution - [in] method to resolve userdata item conflicts. bDeleteAllSourceItems - [in] If bDeleteAllSourceItems is true, then any userdata items that are not copied from source_object are deleted. Remarks: Generally speaking you don't need to use MoveUserData(). Simply rely on ON_Object::operator=() or the copy constructor to do the right thing. Returns: Number of user data items that were moved.
|
virtual |
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 in CRhinoAnnotation, CRhinoLeader, CRhinoObject, ON_SubDComponentRef, ON_MeshComponentRef, ON_SubD, ON_Mesh, ON_Brep, CRhinoNamedViewCameraIcon, CRhinoProxyObject, CRhinoPhantomObject, ON_MorphControl, ON_NurbsCage, CRhinoInstanceObject, ON_TextDot, ON_ClippingPlaneSurface, ON_InstanceRef, CRhinoSubDObject, ON_Hatch, CRhinoGripObject, CRhinoWidget, ON_InstanceDefinition, ON_TextContent, ON_BrepEdge, CRhinoMorphControl, ON_Material, ON_Curve, ON_Surface, CRhinoCageObject, CRhinoPointCloudObject, ON_PointCloud, ON_Extrusion, CRhinoGroupObject, ON_Layer, CRhinoHatch, ON_Annotation, ON_Leader, ON_PointGrid, ON_Point, ON_Light, ON_DetailView, CRhinoDimension, CRhinoDetailViewObject, CRhinoBrepObject, CRhinoTextDot, CRhinoClippingPlaneObject, CRhinoMeshObject, CRhinoPointObject, CRhinoLight, CRhinoCurveObject, and CRhinoExtrusionObject.
void ON_Object::PurgeUserData | ( | ) |
Description: PurgeUserData() removes all user data from object.
Remarks: Use delete GetUserData(...) to destroy a single piece of user data.
|
virtual |
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 in ON_Leader, ON_SubDEdgeChainCurve, ON_BrepRegion, ON_BrepFaceSide, ON_InstanceRef, ON_DocumentUserStringList, ON_UserStringList, ON_NurbsCurve, ON_TextureMapping, ON_Texture, ON_HistoryRecord, ON_PolylineCurve, ON_Extrusion, ON_DetailView, ON_SubD, ON_MorphControl, ON_NurbsCage, ON_DimOrdinate, ON_InstanceDefinition, ON_Material, ON_EmbeddedFile, ON_TextDot, ON_Mesh, ON_Brep, ON_BrepFace, ON_Centermark, ON_BrepLoop, ON_RdkUserData, ON_DimRadial, ON_XMLUserData, ON_3dmRenderSettings, ON_ClippingPlaneSurface, ON_Hatch, ON_BrepTrim, ON_EmbeddedBitmap, ON_DimAngular, ON_WindowsBitmapEx, ON_DimStyle, ON_HatchPattern, ON_RdkMaterialInstanceIdObsoleteUserData, ON_DimLinear, ON_BrepEdge, ON_UnknownUserData, ON_TextContent, ON_WindowsBitmap, ON_NurbsSurface, ON_PolyEdgeSegment, ON_CurveProxy, ON_TextStyle, ON_Viewport, ON_SumSurface, ON_Linetype, ON_ArcCurve, ON_RevSurface, ON_PolyCurve, ON_BrepVertex, ON_DisplacementUserData, CRhinoPolylineOnMeshUserData, ON_CurveOnSurface, ON_SurfaceProxy, ON_PointCloud, ON_LineCurve, ON_Layer, ON_PlaneSurface, ON_Text, ON_PointGrid, ON_Point, ON_SectionStyle, ON_Light, ON_3dmObjectAttributes, and ON_Bitmap.
|
virtual |
Description: Set states on an individual component. Parameters: component_index - [in] The states will be set on this component. states_to_set - [in] If a state is set in the states_to_set parameter, the same state will be set on the component.
Returns: 0: no state settings changed on the component. 1: some state setting changed on the component.
|
virtual |
Description: Copy status settings to an individual component. Parameters: component_index - [in] The states will be copied to this component. status_to_copy - [in] Returns: 0: no state settings changed on the component. 1: some state setting changed on the component.
bool ON_Object::SetUserString | ( | const wchar_t * | key, |
const wchar_t * | string_value | ||
) |
BEGIN: User string support Description: Attach a user string to the object. This information will persist through copy construction, operator=, and file IO. Parameters: key - [in] id used to retrieve this string. string_value - [in] If nullptr, the string with this id will be removed. Returns: True if successful.
int ON_Object::SetUserStrings | ( | int | count, |
const ON_UserString * | user_strings, | ||
bool | bReplace | ||
) |
Description: Append entries to the user string list Parameters: count - [in] number of element in us[] array user_strings - [in] entries to append. bReplace - [in] If bReplace is true, then existing entries with the same key are updated with the new entry's value. If bReplace is false, then existing entries are not updated. Returns: Number of entries added, deleted, or modified.
|
virtual |
Returns: An estimate of the amount of memory the class uses in bytes.
Reimplemented in ON_SubDEdgeChainCurve, ON_SubDComponentRef, ON_MeshComponentRef, ON_SubD, ON_Mesh, ON_Brep, ON_MorphControl, CRhinoObject, ON_NurbsCage, ON_BrepFace, ON_BrepLoop, CRhinoSubDObject, ON_ClippingPlaneSurface, ON_EmbeddedBitmap, ON_BrepTrim, ON_UserStringList, ON_UnknownUserData, ON_InstanceDefinition, ON_BrepEdge, ON_WindowsBitmap, ON_TextureMapping, ON_Texture, ON_SumSurface, ON_Curve, ON_NurbsSurface, ON_RevSurface, ON_Surface, ON_NurbsCurve, ON_BrepVertex, ON_PointCloud, ON_PolyCurve, ON_Extrusion, ON_CurveProxy, ON_SurfaceProxy, ON_CurveOnSurface, ON_Bitmap, ON_LineCurve, ON_PolylineCurve, ON_ArcCurve, CRhinoInstanceDefinition, ON_PlaneSurface, ON_UserData, ON_3dmObjectAttributes, ON_DetailView, and ON_ModelComponent.
bool ON_Object::ThisIsNullptr | ( | bool | bSilentError | ) | const |
Description: Tests to see if this is null in ways that will prevent compilers like CLang from thinking the test is not necessary. The reason the runtime test is being performed is to find bugs that call member functions on null pointers.
void ON_Object::TransformUserData | ( | const class ON_Xform & | xform | ) |
Description: Objects derived from ON_Geometry must call TransformUserData() in their Transform() member function. Parameters: xform - [in] transformation to apply to user data
|
virtual |
Description: Uses the destination_manifest to update references to other components. This is typically done when a component's references came from a "source" context and are being updated to the "destination" context. For example, inserting one model into another when index, id, and name conflicts need to be resolved at the time of insertion. Parameters: source_manifest - [in] A manifest of the source context with indices and ids corresponding to the current component references. If this manifest is not available, pass ON_ComponentManifest::Empty. destination_manifest - [in] A manifest of the destination context with indices and ids corresponding to the desired component references. If this manifest is not available, pass ON_ComponentManifest::Empty. manifest_map - [in] A map from the source (current) referenced component index/id values to the destination (desired) component index/id values. Returns: True if successful. False indicates a referenced component was not found in the manifest and the reference was changed to a default value. Example: If this object is an ON_Layer, the line pattern and render material references are updated. If this object is an ON_DimStyle, the text style reference is updated. If this object is an ON_3dmObjectAttributes, the layer, material, line pattern, and group references are updated.
Reimplemented in ON_3dmObjectAttributes, ON_Layer, and ON_ModelGeometryComponent.
int ON_Object::UserStringCount | ( | ) | const |
Returns: Number of user strings on the object.
|
virtual |
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 in ON_Leader, ON_SubDEdgeChainCurve, ON_BrepRegion, ON_BrepFaceSide, ON_InstanceRef, ON_DocumentUserStringList, ON_UserStringList, ON_NurbsCurve, ON_TextureMapping, ON_Texture, ON_HistoryRecord, ON_Extrusion, ON_PolylineCurve, ON_DetailView, ON_SubD, ON_MorphControl, ON_NurbsCage, ON_DimOrdinate, ON_InstanceDefinition, ON_Material, ON_EmbeddedFile, ON_TextDot, ON_Mesh, ON_Brep, ON_BrepFace, ON_Centermark, ON_BrepLoop, ON_RdkUserData, ON_DimRadial, ON_XMLUserData, ON_3dmRenderSettings, ON_ClippingPlaneSurface, ON_Hatch, ON_BrepTrim, ON_EmbeddedBitmap, ON_DimAngular, ON_WindowsBitmapEx, ON_DimStyle, ON_HatchPattern, ON_RdkMaterialInstanceIdObsoleteUserData, ON_DimLinear, ON_UnknownUserData, ON_BrepEdge, ON_TextContent, ON_WindowsBitmap, ON_NurbsSurface, ON_PolyEdgeSegment, ON_CurveProxy, ON_TextStyle, ON_Viewport, ON_SumSurface, ON_ArcCurve, ON_Linetype, ON_RevSurface, ON_PolyCurve, ON_BrepVertex, CRhinoPolylineOnMeshUserData, ON_CurveOnSurface, ON_SurfaceProxy, ON_PointCloud, ON_LineCurve, ON_Layer, ON_PlaneSurface, ON_Text, ON_PointGrid, ON_Point, ON_SectionStyle, ON_Light, ON_3dmObjectAttributes, and ON_Bitmap.