r3filer
real/code/r3filer.h
r3code
Filer Class
r3Root
R3CLID_ROOT
r3Filer
R3CLID_FILER - 98
SAVEAS, SAVE, LOAD, REGISTERHANDLER, REGISTERIFFFORMHANDLE, REGISTERSAVER, REGISTERLOADER, ENUMSAVERS, ENUMSECTIONS, FETCHSECTIONBIT, REGISTEREXTERNALFILE, OPENFORMAT, AUTOSAVE, ISAUTOSAVENEWER, MAKEAUTOSAVENAME, ADDNOTIFICATION, REMOVENOTIFICATION, ENUMLOADERS, MAKEINDEXEDNAME, LOAD_A, SAVE_A,
FileName, Sections, SectionNames, SaverNames, Selected, NotifyObject, ProgressIndicator, Digits,
int R3RegisterFilerClass(R3APP *app);
R3FIRM_SAVEAS
SAVEAS
R3FIRM_SAVEAS
R3BOOL, TRUE if succeeded
R3TAG*, R3FIRA_FileName, R3FIRA_Sections, R3FIRA_Format
rc = obj.SAVEAS(p3);
Ask filer to save project
R3FIRM_SAVE
SAVE
R3FIRM_SAVE
R3BOOL, TRUE if succeeded
rc = obj.SAVE();
Saves project with the default project name. The default name can be set using the R3FIRA_FileName tag.
R3FIRM_LOAD
LOAD
R3FIRM_LOAD
R3BOOL, TRUE if succeeded
R3TAG*, R3FIRA_FileName, R3FIRA_Sections, R3FIRA_Replace.
rc = obj.LOAD(p3);
Loads project. Sections, filename and replace information must * be given in the tag list.
R3FIRM_REGISTERHANDLER
REGISTERHANDLER
R3FIRM_REGISTERHANDLER
R3TAG*, R3FIRA_Handler, R3FIRA_IffFormId, R3FIRA_IffChunkId, R3FIRA_Name, R3FIRA_WriteMth, R3FIRA_ExportMth, R3FIRA_ImportMth, R3FIRA_ReadMth, R3FIRA_Obligatory,
obj.REGISTERHANDLER(p3);
Register new IFF chunk handler. Class method.
R3FIRM_REGISTERIFFFORMHANDLE
REGISTERIFFFORMHANDLE
R3FIRM_REGISTERIFFFORMHANDLE
R3TAG*, R3FIRA_Handler, R3FIRA_IffFormId, R3FIRA_BeginFormMth, R3FIRA_EndFormMth
obj.REGISTERIFFFORMHANDLE(p3);
Register new IFF form handler. Class method.
R3FIRCM_REGISTERSAVER
REGISTERSAVER
R3FIRCM_REGISTERSAVER
char*, format name
R3BOOL, native
R3CLID, class id
obj.REGISTERSAVER(p1, p2, p3);
Register new saver class. Class method.
R3FIRCM_REGISTERLOADER
REGISTERLOADER
R3FIRCM_REGISTERLOADER
char*, format name
R3CLID, class id
obj.REGISTERLOADER(p1, p3);
Register new loader class. Class method.
R3FIRM_ENUMSAVERS
ENUMSAVERS
R3FIRM_ENUMSAVERS
R3INT, return value from the callback
R3OBJ*, callback object
R3INT, callback method
void*, caller data
rc = obj.ENUMSAVERS(p1, p2, p3);
Enumerate registered savers into the given callback object/method. * The callback syntax is: * rc = (int)R3DoA3(p1, p2, clid, name, p3); * Positive return values continue enumeration.
R3FIRM_ENUMSECTIONS
ENUMSECTIONS
R3FIRM_ENUMSECTIONS
R3INT, return value from the callback
R3OBJ*, callback object
R3INT, callback method
void*, caller data
rc = obj.ENUMSECTIONS(p1, p2, p3);
Enumerate registered sections to given callback object/method. * The callback syntax is: * rc = (int)R3Do(p1, p2, R3FIRA_Handler, handler_obj, R3FIRA_Name, handler_name, R3FIRA_WriteMth, write_mth, R3FIRA_ExportMth, export_mth, R3FIRA_ImportMth, import_mth, R3FIRA_ReadMth, read_mth, R3FIRA_ChunkIdentifier, identifier, R3TAG_END); * Positive return values continue enumeration.
R3FIRM_FETCHSECTIONBIT
FETCHSECTIONBIT
R3FIRM_FETCHSECTIONBIT
R3INT, ordnum of the bit, bit can be generated as 1<<bit
R3INT, chunk id (created with R3MakeID()
rc = obj.FETCHSECTIONBIT(p3);
Fetch 'section bit' corresponding the given chunk id
R3FIRCM_REGISTEREXTERNALFILE
REGISTEREXTERNALFILE
R3FIRCM_REGISTEREXTERNALFILE
R3OBJ*, callback object
R3INT, callback method
char*, folder name
obj.REGISTEREXTERNALFILE(p1, p2, p3);
Register external file enumerator. Class method.
R3FIRM_OPENFORMAT
OPENFORMAT
R3FIRM_OPENFORMAT
R3OBJ*, file format object
R3TAG*, R3FIRA_FileName
rc = obj.OPENFORMAT(p3);
Open file format for reading. No actual data is read.
R3FIRM_AUTOSAVE
AUTOSAVE
R3FIRM_AUTOSAVE
R3BOOL, true if succeeded, FALSE for error.
rc = obj.AUTOSAVE();
Save the current project as autosave file
R3FIRM_ISAUTOSAVENEWER
ISAUTOSAVENEWER
R3FIRM_ISAUTOSAVENEWER
R3BOOL, true if autosave file is newer. FALSE if autosave file is older or it doesn't exist.
char*, filename
rc = obj.ISAUTOSAVENEWER(p3);
Check if autosave file for given file name is newer
R3FIRM_MAKEAUTOSAVENAME
MAKEAUTOSAVENAME
R3FIRM_MAKEAUTOSAVENAME
char, auto save name
char, base name
obj.MAKEAUTOSAVENAME(p1, p3);
Make autosave file name
R3FIRM_ADDNOTIFICATION
ADDNOTIFICATION
R3FIRM_ADDNOTIFICATION
R3BOOL, true if succeeded.
R3TAG*, R3FIRA_PreNotifyCallback, R3FIRA_PostNotifyCallback, R3FIRA_NotifyObject,
rc = obj.ADDNOTIFICATION(p3);
Notify this object for each load / save operations
R3FIRM_REMOVENOTIFICATION
REMOVENOTIFICATION
R3FIRM_REMOVENOTIFICATION
R3BOOL, true if found.
R3TAG*, R3FIRA_PreNotifyMethod, R3FIRA_NotifyMethod, R3FIRA_NotifyObject,
rc = obj.REMOVENOTIFICATION(p3);
Remove object from the notification list
R3FIRM_ENUMLOADERS
ENUMLOADERS
R3FIRM_ENUMLOADERS
R3OBJ*, callback object
R3INT, callback method
void*, caller specific data
obj.ENUMLOADERS(p1, p2, p3);
Enumerate loader objects
R3FIRM_MAKEINDEXEDNAME
MAKEINDEXEDNAME
R3FIRM_MAKEINDEXEDNAME
R3BOOL, true if succeeded
char*, buffer for the resulting string
rc = obj.MAKEINDEXEDNAME(p1, 0);
Create indexed file name. Needed for exporting * all frames in animations.
R3FIRM_LOAD_A
LOAD_A
R3FIRM_LOAD_A
obj.LOAD_A();
Private
R3FIRM_SAVE_A
SAVE_A
R3FIRM_SAVE_A
obj.SAVE_A();
Private
FileName
FileName
R3FIRA_FileName
String
char*
file name
jsobj.SetFileName(value);
value = jsobj.GetFileName();
char* value = ...;
R3SetAttrs(r3obj, R3FIRA_FileName, value, R3TAG_END);
char* value;
R3GetAttrs(r3obj, R3FIRA_FileName, &value, R3TAG_END);
Sections
Sections
R3FIRA_Sections
Integer
R3INT
bit mask which defines which sections needs to be loaded/saved
jsobj.SetSections(value);
R3INT value = ...;
R3SetAttrs(r3obj, R3FIRA_Sections, value, R3TAG_END);
SectionNames
SectionNames
R3FIRA_SectionNames
r3List
R3LIST*
section names
value = jsobj.GetSectionNames();
R3LIST* value;
R3GetAttrs(r3obj, R3FIRA_SectionNames, &value, R3TAG_END);
SaverNames
SaverNames
R3FIRA_SaverNames
r3List
R3LIST*
saver names
value = jsobj.GetSaverNames();
R3LIST* value;
R3GetAttrs(r3obj, R3FIRA_SaverNames, &value, R3TAG_END);
Selected
Selected
R3FIRA_Selected
r3List
R3LIST*
all/selected - tag for SAVEAS method.
jsobj.SetSelected(value);
value = jsobj.GetSelected();
R3LIST* value = ...;
R3SetAttrs(r3obj, R3FIRA_Selected, value, R3TAG_END);
R3LIST* value;
R3GetAttrs(r3obj, R3FIRA_Selected, &value, R3TAG_END);
NotifyObject
NotifyObject
R3FIRA_NotifyObject
Object
R3OBJ*
this object is notified when the filer loads a file
jsobj.SetNotifyObject(value);
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3FIRA_NotifyObject, value, R3TAG_END);
ProgressIndicator
ProgressIndicator
R3FIRA_ProgressIndicator
Object
R3OBJ*
inc/real/code/r3progm.h progress indicator model
jsobj.SetProgressIndicator(value);
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3FIRA_ProgressIndicator, value, R3TAG_END);
Digits
Digits
R3FIRA_Digits
Integer
R3INT
for indexed mode in animations
jsobj.SetDigits(value);
value = jsobj.GetDigits();
R3INT value = ...;
R3SetAttrs(r3obj, R3FIRA_Digits, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3FIRA_Digits, &value, R3TAG_END);
notification callback
Tags