![]() |
Polygon Crucher SDK - Documentation
Documentation
|
CFileExt is the class that allows to add a custom file parser for supporting a new file format. You have to give a specific class identifier, provide the format extensions, the read/write capabilities of the parser... More...
CFileExt is the class that allows to add a custom file parser for supporting a new file format. You have to give a specific class identifier, provide the format extensions, the read/write capabilities of the parser...
#include <FileInfo.h>
Public Member Functions | |
void | Init () |
CXString | GetDescription () const |
CXString | GetExtension () const |
unsigned int | GetClass () const |
unsigned int | GetProperties () const |
unsigned int | GetKindOf () const |
unsigned int | GetLoader () const |
unsigned int | GetSaver () const |
Public Attributes | |
CXString | description |
CXString | ext |
unsigned int | fileclass |
A tag created with MAKE_CUSTOM_ID. | |
unsigned int | properties |
unsigned int | loader |
unsigned int | saver |
Inform about the file saver: MOOTOOLS_PARSER, PLUGIN_PARSER, CALLBACK_PARSER or something else (ie. ImageMagick). | |
InitIOPluginFunc | iocallback |
The function which allows to create parser. | |
Specify what is the loader of the file: MOOTOOLS_PARSER, PLUGIN_PARSER, CALLBACK_PARSER or something else (ie. ImageMagick).
MOOTOOLS_PARSER is internal. The only allowed value are:
PLUGIN_PARSER when extension registered from a DLL. Such dll have .moox extension and contains an exported function bool Init3DParser(IoPluginMode mode, void *data) that declares extension handled by the plugin. When loaded, such the SDK call IO_INIT_PLUGIN to get information of the handled extensions. Then this function will be called with IoPluginMode = IO_GET_PARSER each time the extension (associated to the file class you define) is asked to be read/write.
CALLBACK_PARSER, when you add extension using a callback function. You have to call fileRegisterFile and set iocallback to a function that have the following type: bool Your_Callback(IoPluginMode mode, void *data). This function will be called with IoPluginMode = IO_GET_PARSER each time the extension (associated to the file class you define) is asked to be read/write.
flags that tells about the type and the content of the file Cf. FILEPROP