Rhino C++ API  8.14
Public Member Functions | List of all members
CRhRdkFileType Class Referencefinal

#include <RhRdkPlugIn.h>

Public Member Functions

 CRhRdkFileType (const wchar_t *wszType=nullptr, const wchar_t *wszDescription=nullptr)
 
void AddFileExtension (const wchar_t *wszExtension)
 
const ON_wStringDescription (void) const
 
const ON_wStringFileType (void) const
 
bool HasFileExtension (const wchar_t *wszExtension) const
 
ON_wString MakeFileExtensionPattern (void) const
 

Detailed Description

Represents a file type. A file type can have multiple file extensions.

Constructor & Destructor Documentation

◆ CRhRdkFileType()

CRhRdkFileType::CRhRdkFileType ( const wchar_t *  wszType = nullptr,
const wchar_t *  wszDescription = nullptr 
)

Member Function Documentation

◆ AddFileExtension()

void CRhRdkFileType::AddFileExtension ( const wchar_t *  wszExtension)

Add a file extension to the type. Do not include the period. e.g., "mytype"

◆ Description()

const ON_wString& CRhRdkFileType::Description ( void  ) const

Get the localized description of the file type. e.g., Description for type "MYTYPE" could be "My file type".

◆ FileType()

const ON_wString& CRhRdkFileType::FileType ( void  ) const

Get the file type. This is a string that uniquely identifies the type (e.g., "MYTYPE").

◆ HasFileExtension()

bool CRhRdkFileType::HasFileExtension ( const wchar_t *  wszExtension) const
Returns
true if the file type is associated with a certain file extension, else false.
Parameters
wszExtensionis the extension to check.

◆ MakeFileExtensionPattern()

ON_wString CRhRdkFileType::MakeFileExtensionPattern ( void  ) const
Returns
A 'pattern' string made from the type's file extensions. e.g., "*.myt;*.mytype" This pattern is used in file open and save dialogs.