Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

HookBindings - Adaptor to the callback system
[Hook - A callback system]


Detailed Description

Todo:
Please explain this module.


Data Structures

struct  HookResultStruct
struct  LoggerStruct

Typedefs

typedef HookResultStructHookResult
typedef LoggerStructLogger
typedef int TclResultType

Enumerations

enum  HookResultType { HTNone, HTInt, HTString, HTError }

Functions

TclResultType evalHookHandle (Hook hook, va_list ap)
TclResultType getHookCmd (char *hookName)
TclResultType getsHookHandle (Hook hook, String buffer, int size)
TclResultType glsInteractionHookHandle (Hook hook, va_list ap)
void hooker_init (Tcl_Interp *interp)
TclResultType ICinteractionHookHandle (Hook hook, va_list ap)
void initHookResult (Hook hook)
TclResultType logFlush ()
int loggerSize (int maxsize)
TclResultType logPrintf (char *format, va_list ap)
TclResultType logWrite (char *text)
TclResultType logWriteChar (char c)
TclResultType netsearchHookHandle (Hook hook, va_list ap)
TclResultType partialResultHookHandle (Hook hook, va_list ap)
TclResultType progressHookHandle (Hook hook, char *format, va_list ap)
TclResultType resetHookHandle (Hook hook, va_list ap)
TclResultType setHookCmd (char *hookName, char *cmd)
TclResultType tclHookHandle (Hook hook, va_list ap)

Variables

Tcl_Interp * hkInterp
Tcl_Interp * hkInterp
HookResult hkResult
HookResult hkResult
Logger logger


Typedef Documentation

typedef HookResultStruct* HookResult
 

type of a HookResult Definition at line 73 of file hooker.h.

Referenced by hooker_init().

typedef LoggerStruct* Logger
 

type of a Logger Definition at line 46 of file hooker.h.

Referenced by hooker_init().

typedef int TclResultType
 

tagging the tcl result type. This typedef is used to allow special typemaps in the swig interface. Definition at line 81 of file hooker.h.

Referenced by evalHookHandle(), getHookCmd(), getsHookHandle(), glsInteractionHookHandle(), ICinteractionHookHandle(), logFlush(), logPrintf(), logWrite(), logWriteChar(), netsearchHookHandle(), partialResultHookHandle(), progressHookHandle(), resetHookHandle(), setHookCmd(), and tclHookHandle().


Enumeration Type Documentation

enum HookResultType
 

type of HookResults. Definition at line 51 of file hooker.h.


Function Documentation

TclResultType evalHookHandle Hook  hook,
va_list  ap
 

evalHookHandle: called inside evalConstraint when a constraint fails the constraint can be unary or binary; levelvalues are still assigned arg1 : constraint Definition at line 356 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().

TclResultType getHookCmd char *  hookName  ) 
 

getHookCmd: get the tcl-command of a named hook Definition at line 245 of file hooker.c.

References HookStruct::cmd, HookResultStruct::data, hkFindNoOfHook(), hkHooks, hkInterp, hkResult, HookResultStruct::hook, Hook, NULL, TclResultType, and HookResultStruct::type.

TclResultType getsHookHandle Hook  hook,
String  buffer,
int  size
 

getsHookHandle: handle gets from within tcl Definition at line 426 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().

TclResultType glsInteractionHookHandle Hook  hook,
va_list  ap
 

glsInteractionHookHandle: called inside the gls-module when a interaction with the algorithm is desired arg1 : GlsNet glsNet arg2 : String message Definition at line 391 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().

void hooker_init Tcl_Interp *  interp  ) 
 

initialize the module when loading this stores the tcl-hooks cdgHooks Definition at line 67 of file hooker.c.

References LoggerStruct::buffer, HookStruct::cmd, evalHookHandle(), HookStruct::function, getsHookHandle(), glsInteractionHookHandle(), hkHooks, hkInterp, hkResult, Hook, HOOK_EVAL, HOOK_FLUSH, HOOK_GETS, HOOK_GLSINTERACTION, HOOK_ICINTERACTION, HOOK_NSSEARCH, HOOK_PARTIALRESULT, HOOK_PRINTF, HOOK_PROGRESS, HOOK_RESET, HookFunction, HookResult, ICinteractionHookHandle(), initHookResult(), logFlush(), Logger, logger, loggerSize(), logPrintf(), LoggerStruct::maxsize, netsearchHookHandle(), NULL, partialResultHookHandle(), progressHookHandle(), LoggerStruct::size, and tclHookHandle().

TclResultType ICinteractionHookHandle Hook  hook,
va_list  ap
 

ICinteractionHookHandle: get another word from the IC textbox. Definition at line 512 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().

void initHookResult Hook  hook  )  [static]
 

to be called by every hook. Definition at line 55 of file hooker.c.

References HookResultStruct::data, hkResult, HookResultStruct::hook, Hook, NULL, and HookResultStruct::type.

Referenced by evalHookHandle(), getsHookHandle(), glsInteractionHookHandle(), hooker_init(), ICinteractionHookHandle(), logFlush(), logWriteChar(), netsearchHookHandle(), partialResultHookHandle(), progressHookHandle(), resetHookHandle(), setHookCmd(), and tclHookHandle().

TclResultType logFlush  ) 
 

logFlush: flush the logwindow Definition at line 278 of file hooker.c.

References LoggerStruct::buffer, HookStruct::cmd, hkHooks, hkInterp, hkResult, Hook, HOOK_FLUSH, HOOK_PRINTF, initHookResult(), logger, NULL, LoggerStruct::size, TclResultType, and HookResultStruct::type.

Referenced by hooker_init(), and logWriteChar().

int loggerSize int  maxsize  ) 
 

set the buffersize of the logger.

Parameters:
maxsize the size which to set the log buffer to.
Returns:
the old size of the log buffer.
Definition at line 134 of file hooker.c.

References LoggerStruct::buffer, logger, LoggerStruct::maxsize, and LoggerStruct::size.

Referenced by hooker_init().

TclResultType logPrintf char *  format,
va_list  ap
 

logPrintf: print formated text into the logger Definition at line 268 of file hooker.c.

References hkHooks, hkResult, HookResultStruct::hook, HOOK_PRINTF, logWrite(), and TclResultType.

Referenced by hooker_init().

TclResultType logWrite char *  text  ) 
 

logWrite: writes some text into the logger Definition at line 194 of file hooker.c.

References HookResultStruct::data, hkResult, logWriteChar(), TclResultType, and HookResultStruct::type.

Referenced by logPrintf().

TclResultType logWriteChar char  c  ) 
 

write a char to the logger. This functions writes a single char and check if it is a specail char which should be escaped. Definition at line 153 of file hooker.c.

References LoggerStruct::buffer, HookResultStruct::data, hkResult, initHookResult(), logFlush(), logger, LoggerStruct::maxsize, NULL, LoggerStruct::size, TclResultType, and HookResultStruct::type.

Referenced by logWrite().

TclResultType netsearchHookHandle Hook  hook,
va_list  ap
 

netsearchHookHandle: arg1: NetSearchState arg3: mode 1 - add rootnode 2 - solution node found 3 - add child 4 - add skipper 5 - widen searchspace 6 - closing open node Definition at line 319 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().

TclResultType partialResultHookHandle Hook  hook,
va_list  ap
 

partialResultHookHandle: order displaying of another Parse Definition at line 482 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().

TclResultType progressHookHandle Hook  hook,
char *  format,
va_list  ap
 

progressHookHandle: show progess messages in tcl Definition at line 452 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().

TclResultType resetHookHandle Hook  hook,
va_list  ap
 

Call the Tcl-specified command, with no arguments. Definition at line 540 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

TclResultType setHookCmd char *  hookName,
char *  cmd
 

setHookCmd: set the tcl-command of a named hook Definition at line 217 of file hooker.c.

References HookStruct::cmd, hkFindNoOfHook(), hkHooks, hkInterp, Hook, initHookResult(), NULL, and TclResultType.

TclResultType tclHookHandle Hook  hook,
va_list  ap
 

tclHookHandle: default tclHook-Handler arguments aren't used Definition at line 568 of file hooker.c.

References HookStruct::cmd, hkInterp, hkResult, Hook, initHookResult(), NULL, TclResultType, and HookResultStruct::type.

Referenced by hooker_init().


Variable Documentation

Tcl_Interp* hkInterp
 

pointer to the currently used tcl interpreter.

Todo:
This pointer isn't needed for newer swigs.
Definition at line 39 of file hooker.c.

Referenced by evalHookHandle(), getHookCmd(), getsHookHandle(), glsInteractionHookHandle(), hooker_init(), ICinteractionHookHandle(), logFlush(), netsearchHookHandle(), partialResultHookHandle(), progressHookHandle(), resetHookHandle(), setHookCmd(), and tclHookHandle().

Tcl_Interp* hkInterp
 

pointer to the currently used tcl interpreter.

Todo:
This pointer isn't needed for newer swigs.
Definition at line 39 of file hooker.c.

Referenced by evalHookHandle(), getHookCmd(), getsHookHandle(), glsInteractionHookHandle(), hooker_init(), ICinteractionHookHandle(), logFlush(), netsearchHookHandle(), partialResultHookHandle(), progressHookHandle(), resetHookHandle(), setHookCmd(), and tclHookHandle().

HookResult hkResult
 

typed hook result. This pointer is used in our special typemaps. Definition at line 50 of file hooker.c.

Referenced by evalHookHandle(), getHookCmd(), getsHookHandle(), glsInteractionHookHandle(), hooker_init(), ICinteractionHookHandle(), initHookResult(), logFlush(), logPrintf(), logWrite(), logWriteChar(), netsearchHookHandle(), partialResultHookHandle(), progressHookHandle(), resetHookHandle(), and tclHookHandle().

HookResult hkResult
 

typed hook result. This pointer is used in our special typemaps. Definition at line 50 of file hooker.c.

Referenced by evalHookHandle(), getHookCmd(), getsHookHandle(), glsInteractionHookHandle(), hooker_init(), ICinteractionHookHandle(), initHookResult(), logFlush(), logPrintf(), logWrite(), logWriteChar(), netsearchHookHandle(), partialResultHookHandle(), progressHookHandle(), resetHookHandle(), and tclHookHandle().

Logger logger [static]
 

the singelton Logger instance used in this module. Definition at line 44 of file hooker.c.

Referenced by hooker_init(), logFlush(), loggerSize(), and logWriteChar().


CDG 0.95 (20 Oct 2004)