prg_djk_path_consider_proc_register()
Abstract
Registers a procedure to be called when considering a path.
Syntax
prg_djk_path_consider_proc_register (graph_ptr, path_consider_proc, client_state_ptr)
| Argument | Type | Description |
|---|---|---|
graph_ptr |
PrgT_Graph * |
The graph for which to register the path consideration callback and associated client state. |
path_consider_proc |
PrgT_Djk_Consider_Proc |
The callback procedure to register. |
client_state_ptr |
void * |
An arbitrary client state passed to the path_consider_proc callback each time it is called. |
Return Type
void
No return value.
Header
prg_djk.h
Details
This function associates a path consider procedure with the specified graph. When a path or partial path is under consideration to be the working shortest path, the path consider procedure is called. The path consider procedure can be used to evaluate whether the path is legal. It has access to all of the hops in the working path and the client state in order to make the decision.
Note: Even when registered, the path consider procedure is not used unless you call prg_djk_path_get_options() with the PRGC_DJK_PATH_GET_OPT_CONSIDER_PATH option. The function prg_djk_path_get() will not call a path consider procedure.
The callback prototype is given in PrgT_Djk_Path_Consider_Proc.