C/Tcl Interface
This page describes the itf module. This module is hiding the Tcl stuff from the other modules. It also
provides services that should be used by other modules when it comes to creating, destroying and manipulating
objects, object types, methods, etc.
Topics Related to the itf Module
-
- This page will describe what is needed to write a module which implements one or more object classes, and
offers operations with objects from these classes.
-
- The function itfParseArgv() and the Tcl procedure itfParseArgv faciliate the parsing of
command line arguments.
-
- Janus 3 has different kinds of messages for different degrees of error severity, going from simple
messages to inform the user about what is going on, to fatal error messages thas will inevitably
exit the entire process.
-
- JANUS 3 can react on SIGINT (i.e. controll-C). Besides this there
are other signals that JANUS 3 can handle. You can also define
a Tcl script that will be executed when a SIGTERM is received.
-
- Objects can be defined on different levels. Top level objects can allways be accessed by their name only. Other
objects might exist only in some other (parent) object. Accessing such objects is done simmilar to the structure
field selection in C, using "." or ":" between identifiers. This page give you more details about it.
-
- There are predefined methods written in C. But you can define you own methods in Tcl and have them registered
in the itf module. This page will describe how.
-
- To prevent object beeing destroyed while they are still being used by other objects, the using object can place a link onto the used object. Only objects
that are not used by any other object can be destroyed completely. Whenevern an object doesn't need one of its used objects it should unlink it. When
an object is not used any more, it is destroyed automatically.
-
- To reduce the need for forking (could cause problems with the swap space
for very big processes), some of the frequently used UNIX commands
have been implemented in a rudimentary form.