Generating output
The following functions and methods are used to generate output, including
descriptions of SOM objects. They all produce their output using the character-output
procedure held by the global variable SOMOutCharRoutine. The default
procedure for character output simply writes the character to stdout,
but it can be replaced to change the output destination of the methods and
functions below. (See Chapter 5 for more information on customizing SOM.)
somDumpSelf
(method) writes a detailed description
of an object, including its class, its location, and its instance data.
The receiver of the method is the object to be dumped. An additional argument
is the "nesting level" for the description. [All lines in the description
will be indented by (2 * level) spaces.]
somPrintSelf
(method) Writes a brief description of an object,
including its class and location in memory. The receiver of the method is
the object to be printed.
somPrintf
(function)
SOM's version of the C "printf" function. It generates character stream
output via SOMOutCharRoutine. It has the same interface as the C
"printf" function.
somVprintf
(function)
Represents the "vprint" form of somPrintf. Its arguments are a formatting
string and a va_list holding the remaining arguments.
somPrefixLevel
(function) Generates (via somPrintf)
spaces to prefix a line at the indicated level. The return type is void.
The argument is an integer specifying the level. The number of spaces generated
is (2 * level).
somLPrintf
(function)
Combines somPrefixLevel and somPrintf. The first argument
is the level of the description (as for somPrefixLevel) and the remaining
arguments are as for somPrintf (or for the C "printf" function).
See the System Object Model Programming Reference for more information
on a specific function or method.
[Back: Language-neutral Methods and Functions]
[Next: Getting information about a class]