Texas Instruments TI-89 Developer's Manual page 97

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Chapter 7: Flash Application Layout
/* FILE * PlayerFileTable */
#define OO_PLAYER_FILE_TABLE (65537)
#define GetPlayerFileTable(obj) \
(FILE *)OO_GetAppAttr(obj,65537)
#define SetPlayerFileTable(obj,value) \
OO_SetAppAttr(obj,65537,(void *)value)
/* int PlayerFileOpen(AppID, char const *) */
#define OO_PLAYER_FILE_OPEN (65538)
#define PlayerFileOpen(obj,a) \
((int (* const)(AppID, char const *))OO_GetAppAttr(obj,65538))(obj,a)
/* int PlayerFileRead(AppID, int, char *, int) */
#define OO_PLAYER_FILE_READ (65539)
#define PlayerFileRead(obj,a,b,c) \
((int (* const)(AppID, int, char *,
int))OO_GetAppAttr(obj,65539))(obj,a,b,c)
/* int PlayerFileWrite(AppID, int, char const *, int) */
#define OO_PLAYER_FILE_WRITE (65540)
#define PlayerFileWrite(obj,a,b,c) \
((int (* const)(AppID, int, char const *,
int))OO_GetAppAttr(obj,65540))(obj,a,b,c)
/* void PlayerFileClose(AppID, int) */
#define OO_PLAYER_FILE_CLOSE (65541)
#define PlayerFileClose(obj,a) \
((void (* const)(AppID, int))OO_GetAppAttr(obj,65541))(obj,a)
A symbolic name is created for each frame slot number. The name consists of "OO_" prefixed
to the name of each variable or function converted to upper case letters and underscores.
A Get . . . macro is created for each variable attribute. It is used to get the value of an object
attribute. It expands into a call to OO_GetAppAttr with the slot number of the attribute to
retrieve. Note the return value is cast to the type of the variable.
A Set . . . macro is created for each variable attribute. It is used to change the value of an
object attribute. It expands into a call to OO_SetAppAttr.
A method call macro is created for each function attribute. It expands into a call to
OO_GetAppAttr to get the address of the routine to execute. The routine is called indirectly
with the arguments specified in the parameter list of the macro. All the arguments and the
routine return type are cast to the types in the original function definition so the C compiler will
correctly type-check arguments and function return value. Imagine trying to create that macro
manually!
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
55
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents