This class manages terminal output. More...
Static Public Member Functions | |
static int | callback (string str) |
Callback function called by native library. More... | |
static void | addListener (IGlpkTerminalListener listener) |
Adds a listener for callbacks. More... | |
static bool | removeListener (IGlpkTerminalListener listener) |
Removes first occurance of a listener for callbacks. More... | |
This class manages terminal output.
An object can be registered as listener for terminal output using the addListener method.
GLPK will call method callback before producing terminal output. The listeners.Value can inhibit the terminal output by returning false
in the output routine.
The listener list is stored in thread local storage. Each thread has to register its own listener.
If a GlpkExeption has occured it is necessary to call
GLPK.glp_term_hook(null, null);
to reenable listening to terminal output.
Definition at line 26 of file GlpkTerminal.cs.
|
inlinestatic |
Adds a listener for callbacks.
listener | listener for callbacks |
Definition at line 69 of file GlpkTerminal.cs.
|
inlinestatic |
Callback function called by native library.
Output to the console is created if any of the listeners.Value requests it.
str | string to be written to console |
Definition at line 49 of file GlpkTerminal.cs.
|
inlinestatic |
Removes first occurance of a listener for callbacks.
listener | listener for callbacks |
Definition at line 79 of file GlpkTerminal.cs.