#include <RhRdkContentIOPlugIn.h>
|
| CRhRdkContentIOPlugInEx () |
|
virtual | ~CRhRdkContentIOPlugInEx () |
|
virtual bool | CanLoadMultiple (void) const =0 |
|
virtual UUID | InterfaceId (void) const override final |
|
virtual bool | LoadMultiple (const CRhinoDoc *pDoc, const ON_ClassArray< ON_wString > &aFullPath, CRhRdkContent::Kinds kind, unsigned int flags, void *pReserved) const =0 |
|
virtual void | ReportContentAndFile (CRhRdkContent &c, const wchar_t *wszFullPath, unsigned int flags, void *pReserved) const |
|
virtual void | ReportDeferredContentAndFile (CRhRdkContent &c, const wchar_t *wszFullPath, unsigned int flags, void *pReserved) const |
|
void | SetReport (class CRhRdkContentIOLoadMultipleReport *) const |
|
virtual bool | CanLoad (void) const =0 |
|
virtual bool | CanSave (void) const =0 |
|
virtual const wchar_t * | Description (void) const =0 |
|
virtual void * | EVF (const wchar_t *, void *) override |
|
virtual const wchar_t * | FileExtension (void) const =0 |
|
virtual const RDK_DEPRECATED wchar_t * | Kind (void) const |
|
virtual CRhRdkContent * | Load (const CRhinoDoc *pDoc, const wchar_t *wszFullPath, CRhRdkContent::Kinds kind) const =0 |
|
virtual UUID | RdkPlugInId (void) const =0 |
|
virtual bool | Save (const wchar_t *wszFullPath, const CRhRdkContent &content, const IRhRdkPreviewSceneServer *pSceneServer) const =0 |
|
virtual CRhRdkContentKindList | SupportedKinds (void) const =0 |
|
| CRhRdkExtension () |
|
virtual | ~CRhRdkExtension () |
|
virtual UUID | PlugInId (void) const =0 |
|
bool | Unregister (void) |
|
| CRhRdkObject () |
|
virtual | ~CRhRdkObject () |
|
void | operator delete (void *buf) |
|
void | operator delete[] (void *buf) |
|
void * | operator new (size_t size) |
|
void * | operator new[] (size_t size) |
|
This class is an extension of CRhRdkContentIOPlugIn. It adds support for loading multiple contents from a file.
◆ anonymous enum
anonymous enum : unsigned int |
Enumerator |
---|
LoadMultiple_Normal | |
LoadMultiple_Preload | |
◆ CRhRdkContentIOPlugInEx()
CRhRdkContentIOPlugInEx::CRhRdkContentIOPlugInEx |
( |
| ) |
|
◆ ~CRhRdkContentIOPlugInEx()
virtual CRhRdkContentIOPlugInEx::~CRhRdkContentIOPlugInEx |
( |
| ) |
|
|
virtual |
◆ CanLoadMultiple()
virtual bool CRhRdkContentIOPlugInEx::CanLoadMultiple |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- true if the plug-in is capable of loading multiple contents.
◆ InterfaceId()
virtual UUID CRhRdkContentIOPlugInEx::InterfaceId |
( |
void |
| ) |
const |
|
finaloverridevirtual |
◆ LoadMultiple()
Create any number of new contents and load them from a custom content file.
- Parameters
-
pDoc | is a pointer to a Rhino document. May be nullptr. |
aFullPath | is a list of full paths of files to load from. Each file can contain any number of contents. |
kind | is only used by I/O plug-ins that support multiple kinds. It tells the plug-in which content kind to create. If the plug-in only supports a single content kind, it can ignore this parameter. |
flags | is a set of flags from the enum above. |
- Note
- The contents are not actually attached to any document, they are just loaded. The pDoc parameter is only used for unpacking embedded files, if necessary.
-
After loading each content from a file, you should call ReportContentAndFile() to report the content and the file it was loaded from. However, during file drag and drop, the LoadMultiple_Preload flag is specified, and if your loading process is time-consuming or displays a dialog, then for each file, you must create a 'deferred' content instead of loading any real contents. A deferred content is a lightweight content of the same kind which is fast to create. It represents all the contents that will eventually be loaded from the file. This is needed because during drag and drop, the contents are created when the drag enters a window. On dropping, any deferred contents will be properly loaded by calling LoadMultiple() again for each individual file extension that was dragged. In this case, instead of calling ReportContentAndFile() you must call ReportDeferredContentAndFile().
- Returns
- true if all contents loaded successfully, false if any one failed.
◆ ReportContentAndFile()
virtual void CRhRdkContentIOPlugInEx::ReportContentAndFile |
( |
CRhRdkContent & |
c, |
|
|
const wchar_t * |
wszFullPath, |
|
|
unsigned int |
flags, |
|
|
void * |
pReserved |
|
) |
| const |
|
virtual |
This is called from your implementation of LoadMultiple() to add a content and the file it was loaded from when the LoadMultiple_Preload flag is not set.
- See also
- CRhRdkContentIOPlugInEx::LoadMultiple() for an explanation of this method's use.
- Parameters
-
c | is the content that was loaded. |
wszFullPath | is the full path to the file that 'c' was loaded from. |
flags | is reserved for future use; you should pass zero. |
pReserved | is reserved for future use; you should pass nullptr. |
◆ ReportDeferredContentAndFile()
virtual void CRhRdkContentIOPlugInEx::ReportDeferredContentAndFile |
( |
CRhRdkContent & |
c, |
|
|
const wchar_t * |
wszFullPath, |
|
|
unsigned int |
flags, |
|
|
void * |
pReserved |
|
) |
| const |
|
virtual |
This is called from your implementation of LoadMultiple() to add a 'deferred' content and the file it will be loaded from, when the LoadMultiple_Preload flag is set.
- See also
- CRhRdkContentIOPlugInEx::LoadMultiple() for an explanation of this method's use.
- Parameters
-
c | is the deferred content. |
wszFullPath | is the full path to the file that 'c' will be loaded from. |
flags | is reserved for future use; you should pass zero. |
pReserved | is reserved for future use; you should pass nullptr. |
◆ SetReport()
void CRhRdkContentIOPlugInEx::SetReport |
( |
class CRhRdkContentIOLoadMultipleReport * |
| ) |
const |