HQP  1.9.6
If.h File Reference

public declarations of the interface library More...

#include <Meschach.h>
#include <tcl.h>
Include dependency graph for If.h:
This graph shows which files directly or indirectly include this file:

Macros

#define IF_API
 define IF_API when compiling a Dynamic Link Library (DLL)
 
#define IF_OK   0
 Return code for success. More...
 
#define IF_ERROR   1
 Return code for fail. More...
 

Functions

IF_API int If_Init (Tcl_Interp *interp)
 Initialize the command interface to use the specified Tcl_Interp. More...
 
int If_CreateInterp (int argc, char *argv[])
 Create a Tcl interpreter and initialize the path for the Tcl library based on argv[0]. More...
 
IF_API Tcl_Interp * If_Interp ()
 Return the Tcl interpreter used by the interface. More...
 
IF_API int If_SizeOfInt ()
 Return size of Int. More...
 
IF_API int If_SetInt (const char *name, int val)
 Set an Int value. More...
 
IF_API int If_GetInt (const char *name, int &val)
 Get an Int value. More...
 
IF_API int If_SizeOfReal ()
 Return size of Real. More...
 
IF_API int If_SetReal (const char *name, Real val)
 Set a Real value. More...
 
IF_API int If_GetReal (const char *name, Real &val)
 Get a Real value. More...
 
IF_API int If_SetString (const char *name, const char *val)
 Set a variables value from a string representation. More...
 
IF_API int If_GetString (const char *name, const char *&val)
 Get the string representation of a variables value. More...
 
IF_API int If_Eval (const char *command)
 Evaluate a command. More...
 
const char * If_ResultString ()
 Return the result string produced by the last If function call. More...
 

Detailed Description

public declarations of the interface library

rf, 10/4/95

Macro Definition Documentation

#define IF_ERROR   1

Return code for fail.

Referenced by If_CreateInterp().

#define IF_OK   0

Return code for success.

Referenced by If_CreateInterp().

Function Documentation

int If_CreateInterp ( int  argc,
char *  argv[] 
)
inline

Create a Tcl interpreter and initialize the path for the Tcl library based on argv[0].

This function needs to be called by a non Tcl application, i.e. an application that does not enter Tcl_Main. It is inlined as in this way the application determines, which Tcl version to use.

References IF_ERROR, If_Init(), and IF_OK.

IF_API int If_Eval ( const char *  command)

Evaluate a command.

IF_API int If_GetInt ( const char *  name,
int &  val 
)

Get an Int value.

IF_API int If_GetReal ( const char *  name,
Real &  val 
)

Get a Real value.

IF_API int If_GetString ( const char *  name,
const char *&  val 
)

Get the string representation of a variables value.

IF_API int If_Init ( Tcl_Interp *  interp)

Initialize the command interface to use the specified Tcl_Interp.

This function needs to be called by an extension being loaded to a Tcl application. It either returns TCL_OK or TCL_ERROR if the initialization fails.

Referenced by If_CreateInterp().

IF_API Tcl_Interp* If_Interp ( )

Return the Tcl interpreter used by the interface.

Referenced by If_ResultString().

const char* If_ResultString ( )
inline

Return the result string produced by the last If function call.

After a failed calculation, the corresponding error message is returned. This function is inlined to avoid problems when accessing error messages under Tcl 8.4 and 8.5 (e.g. if Tcl library is not found).

References If_Interp().

IF_API int If_SetInt ( const char *  name,
int  val 
)

Set an Int value.

IF_API int If_SetReal ( const char *  name,
Real  val 
)

Set a Real value.

IF_API int If_SetString ( const char *  name,
const char *  val 
)

Set a variables value from a string representation.

IF_API int If_SizeOfInt ( )

Return size of Int.

IF_API int If_SizeOfReal ( )

Return size of Real.