Go to the source code of this file.
Function Documentation
The explain_output_method_destructor function is used to destroy an output instance, when its lifetime is over, think of it as a class specific free() function. It is called by explain_output_register when a new output instance is given.
It is safe for op to be NULL. It is safe for op->vtable->destructor to be NULL.
- Parameters:
-
Definition at line 48 of file output.c.
The explain_output_method_exit function is used to terminate execution. Different "classes" handle this differently.
- Parameters:
-
op | Pointer to the explain_output_t instance to be operated on. |
status | The exist status requested. |
POSIX and the C standard both say that it should not call 'exit', because the behavior is undefined if 'exit' is called more than once. So we call '_exit' instead of 'exit'.
Definition at line 80 of file output.c.
The explain_output_method_message function is used to print text. Different output "classes" handle this differently.
- Parameters:
-
op | Pointer to the explain_output_t instance to be "printed" on. |
text | The text of the message to be printed. It has not been wrapped. |
Definition at line 62 of file output.c.
The explain_output_new function may be used to create a new dynamically allocated instance of explain_output_t.
- Parameters:
-
vtable | The struct containing the pointers to the methods of the derived class. |
- Returns:
- NULL on error (i.e. malloc failed), or a pointer to a new dynamically allocated instance of the class.
Definition at line 29 of file output.c.