Rhino C++ API  8.6
Public Member Functions | List of all members
CRhRdkContentIOPlugIn Class Referenceabstract

#include <RhRdkContentIOPlugIn.h>

Inheritance diagram for CRhRdkContentIOPlugIn:
CRhRdkExtension CRhRdkObject CRhRdkContentIOPlugInEx

Public Member Functions

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 UUID InterfaceId (void) const override
 
virtual const RDK_DEPRECATED wchar_t * Kind (void) const
 
virtual CRhRdkContentLoad (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
 
- Public Member Functions inherited from CRhRdkExtension
 CRhRdkExtension ()
 
virtual ~CRhRdkExtension ()
 
virtual UUID PlugInId (void) const =0
 
bool Unregister (void)
 
- Public Member Functions inherited from CRhRdkObject
 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from CRhRdkObject
static void CheckMemory (void)
 
static void PopulateDebuggingInfo (void)
 

Detailed Description

This class allows a plug-in to provide custom file formats for loading and saving content.

Please use CRhRdkContentIOPlugInEx instead of CRhRdkContentIOPlugIn.

Member Function Documentation

◆ CanLoad()

virtual bool CRhRdkContentIOPlugIn::CanLoad ( void  ) const
pure virtual
Returns
true if the plug-in is capable of loading content.

◆ CanSave()

virtual bool CRhRdkContentIOPlugIn::CanSave ( void  ) const
pure virtual
Returns
true if the plug-in is capable of saving content.

◆ Description()

virtual const wchar_t* CRhRdkContentIOPlugIn::Description ( void  ) const
pure virtual
Returns
The description of the file format (e.g., "JPEG Files"

◆ EVF()

virtual void* CRhRdkContentIOPlugIn::EVF ( const wchar_t *  ,
void *   
)
inlineoverridevirtual

Emergency virtual function for future expansion.

Reimplemented from CRhRdkObject.

◆ FileExtension()

virtual const wchar_t* CRhRdkContentIOPlugIn::FileExtension ( void  ) const
pure virtual
Returns
The file extension used by the plug-in (e.g., "jpg")

◆ InterfaceId()

virtual UUID CRhRdkContentIOPlugIn::InterfaceId ( void  ) const
overridevirtual

Returns the unique interface id of this extension.

Implements CRhRdkExtension.

Reimplemented in CRhRdkContentIOPlugInEx.

◆ Kind()

virtual const RDK_DEPRECATED wchar_t* CRhRdkContentIOPlugIn::Kind ( void  ) const
inlinevirtual

This method is deprecated in favor of the one below.

◆ Load()

virtual CRhRdkContent* CRhRdkContentIOPlugIn::Load ( const CRhinoDoc pDoc,
const wchar_t *  wszFullPath,
CRhRdkContent::Kinds  kind 
) const
pure virtual

Create a new content and load it from a custom content file.

Parameters
pDocis a pointer to a Rhino document. May be nullptr.
wszFullPathis the filename to load from.
kindis 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.
Note
The content is not actually attached to any document, it is just loaded. The pDoc parameter is only used for unpacking embedded files, if necessary.
This method is deprecated in favor of CRhRdkContentIOPlugInEx::LoadMultiple().
Returns
A pointer to the new content if loaded successfully, else nullptr.

◆ RdkPlugInId()

virtual UUID CRhRdkContentIOPlugIn::RdkPlugInId ( void  ) const
pure virtual
Returns
The unique id of the client's RDK plug-in.

◆ Save()

virtual bool CRhRdkContentIOPlugIn::Save ( const wchar_t *  wszFullPath,
const CRhRdkContent content,
const IRhRdkPreviewSceneServer pSceneServer 
) const
pure virtual

Save an existing content to a custom content file.

Parameters
wszFullPathis the full paths to the filename to save to.
contentis the content to save.
pSceneServeris a pointer to a scene server that can be used to render a preview image. for storing in the file.
Note
This parameter is nullptr when content is a texture.
Returns
true if saved successfully, else false.

◆ SupportedKinds()

virtual CRhRdkContentKindList CRhRdkContentIOPlugIn::SupportedKinds ( void  ) const
pure virtual
Returns
The kind(s) of content that this plug-in can load/save.