The Ptolemy kernel provides a number of C++ classes that are fairly generic and often prove useful to star writers. Some of these are essential, such as those that handle errors. Complete documentation of the kernel classes is given in The Kernel Manual volume of The Almagest. Here, we summarize only the most generic of these classes, i.e., the ones that are generally useful to star programmers. All of the classes described here may be used in stars, provided that the star writer includes the appropriate header files. For instance, the entry
ccinclude { "pt_fstream.h" }
will permit the star to create instances of the basic stream classes (described below) in the body of functions that are defined in the star. If the user wishes to create such an instance as a private
, protected
, or public
member of the star, then the header file needs to be included in the .h
file, specified as done in the line
hinclude { "pt_fstream.h" }
in the Printer star defined on
page 2-28.
The source code for most of classes and functions described in this section can be found in $PTOLEMY/src/kernel
. The source code is the ultimate reference. Moreover, since this directory is automatically searched for include files when a star is
dynamically linked, no special effort is required to specify where to find the
include files.
Copyright © 1990-1997, University of California. All rights
reserved.