Front End Interface structure

This topic describes the Front End interface structure.

The Front End will dynamically load the library and call the given function. IN and OUT parameters are managed using a stack. All the operations concerning this stack are managed by functions within the Front End. Pointers to these functions are gathered into a front end interface structure:
struct frontEndInterface
  {
      short (* getParamCount) ();
      short (* getReturnCount) ();
      void ( * popInteger) (long & , short & );
      void ( * pushInteger) (const long , short );
      void ( * popString) (char *, short &, short &);
      void ( * pushString) (const char *,short , short );
      void ( * getFrontEndEnv) (const char * , char *, short & );
      /*new in 2.00*/
      void ( * popWString) (wchar_t *, short &, short &);
      void ( * pushWString) (const wchar_t*,short , short );
  };
Table 1. Front end interface functions
Function Description
short getParamCount();
This function returns the number of parameters given to the function called.
short getReturnCount();
This function returns the number of returning values of the function called.
void popInteger( long & value, short & 
		isNull );
This function is used to get an integer from the stack: value is the reference to where the popped integer will be set, isNull indicates whether the parameter is null.
void pushInteger( const long value, 
		short isNull );
This function is used to push an integer on the stack: value is the value of the integer, isNull indicates whether the value is null.
void popString( char * value, short & 
		length, short & isNull );
This function is used to get a string from the stack: value is the pointer where the popped string will be set, length is the length of the string, isNull indicates whether the parameter is null.
void pushString( const char * value, 
		short length, short isNull );
This function is used to push a string on the stack: value is the value of the string,length the length of the string, isNull indicates whether the parameter is null. A length of -1 indicates that the length is detected based on the content of the string.
void ( * getFrontEndEnv )(const char * 
		, char *, short & );
This function is used to get information from the front end. The table in Environment Variables indicates which front end environment variable is set.
void ( * popWString) (wchar_t *value, 
		short &length, short &isNull);
This function is used to get a unicode string from the stack: value is the pointer where the popped string will be set, length is the length of the string, isNull indicates whether the parameter is null.
void ( * pushWString) (wchar_t *value, 
		short length, short isNull);
This function is used to push a unicode string on the stack: value is the value of the string, length the length of the string, isNull indicates whether the parameter is null. A length of -1 indicates that the length is detected based on the content of the string.