Rhino C++ API  8.7
Public Member Functions | List of all members
IRhRdkPlugInUsedContentNotifier Class Referenceabstract

#include <RhRdkPlugIn.h>

Public Member Functions

virtual ~IRhRdkPlugInUsedContentNotifier ()
 
virtual void * EVF (const wchar_t *, void *)=0
 
virtual void GetInstanceIdChange (UUID &uuidOldOut, UUID &uuidNewOut) const =0
 
virtual const ON_SimpleArray< const CRhinoObject * > & GetRhinoObjects (void) const =0
 
virtual void ReportUsedInstanceId (const UUID &uuidInstance)=0
 

Detailed Description

This interface is used in calls to CRhRdkPlugIn::ReportUsedContent() and CRhRdkPlugIn::ChangeContentInstanceId()

When importing a 3dm file or pasting, incoming contents are checked for usage and are only imported if they are being used by objects, layers or plug-ins. RDK will query your plug-in to ask if contents are being used by calling the ReportUsedContent() method. If your plug-in wants to make sure that contents are imported and not discarded, it should override this method to report each used content instance id. This is done by calling ReportUsedInstanceId() for each used content. During the content import, RDK may need to change some of the content instance ids. If it does it will notify all plug-ins. Therefore your plug-in should also override the ChangeContentInstanceId() method to change the recorded instance id of used content. Call GetInstanceIdChange() and update your record of the old instance id to be the new one.

Constructor & Destructor Documentation

◆ ~IRhRdkPlugInUsedContentNotifier()

virtual IRhRdkPlugInUsedContentNotifier::~IRhRdkPlugInUsedContentNotifier ( )
inlinevirtual

Member Function Documentation

◆ EVF()

virtual void* IRhRdkPlugInUsedContentNotifier::EVF ( const wchar_t *  ,
void *   
)
pure virtual

Emergency virtual function for future expansion.

◆ GetInstanceIdChange()

virtual void IRhRdkPlugInUsedContentNotifier::GetInstanceIdChange ( UUID &  uuidOldOut,
UUID &  uuidNewOut 
) const
pure virtual

Call this method from ChangeContentInstanceId() to get the old and new content instance id. You should then change your storage of the old id to be the new id.

◆ GetRhinoObjects()

virtual const ON_SimpleArray<const CRhinoObject*>& IRhRdkPlugInUsedContentNotifier::GetRhinoObjects ( void  ) const
pure virtual

Call this method from ReportUsedContent to get the Rhino objects for which you should check if contents are used.

◆ ReportUsedInstanceId()

virtual void IRhRdkPlugInUsedContentNotifier::ReportUsedInstanceId ( const UUID &  uuidInstance)
pure virtual

Call this method from ReportUsedContent() to add each content you are using.

Parameters
uuidInstanceis the instance id of the content.