LYMB the basic classes of the system: object, parser, msg, collection, scalar, string, vector, s_vector, and class_generator.
OSCAR the animation classes of the system. These include scene, modeller and its subclasses, renderer and its subclasses, loop, and actions.
VISAGE the visualization classes of the system. These include visage_data and its subclasses, visage_display and its subclasses, and visage_reader and its subclasses.
X the X Window System interface classes. These include xdrawable, xwindow, xpixmap, and xdisplay, among others.
UI the HP widget interface classes. These include ui and its subclasses.
MOTIF the MOTIF widget interface classes. These include motif and its subclasses.
UNIX the UNIX interface classes: shell, environment, and file.
class_name is the name of the class to which the object belongs. Class_name cannot be changed.
super is a pointer to the super-object. (ie the class- object from which this object was instantiated. Super cannot be changed.
methods is a pointer to the method table for the object. Methods can not be changed.
debug is a switch that indicates whether or not to print debugging information. The debug information shows what is happening within a message. 1 is ON, 0 is OFF.
msg_count is a count of how many messages the object has received. Msg_count cannot be changed directly, but is updated every time a message is received.
output is a FILE pointer to the file that the print! methods will write to. It is usually set to standard output. Output is changed temporarily when write: or append: are executed.
instances is a list of objects that were instantiated from this object. This list is propagated up the hierarchy so that at any level this list contains all instances of the class and any sub-classes below it.
ctime is the time object was created
mtime is the time object was modified
subclasses is the list of subclasses of an object.
# argument returns a pointer to the object whose name is the argument. This message is useful for sending messages to objects whose names are stored in variables: string new: dog = fido; actor new: fido; object # dog print!; since dog returns its value (fido) when it receives a "?" from the parser and this value becomes a name of the object, recipient of the next message, the print! message will be addressed to actor fido.
append: file appends a print description of the instance to the file named as its argument. If the file does not exist, it is created.
append_instances: file appends a print description of all the instances of an object to the file named as its argument.
class? returns the class name of an object.
copy: argument makes a copy of an instance and gives it a name derived by concatenation of the name of the instance with argument string.
count! prints, on standard output, the number of messages received by an instance.
create_file: file creates a new version of a file called file.
debugoff! clears an instance's debug flag. The debug flag can be tested within an instance to print out debugging information. The DPRINT macro is equivalent to a printf, but tests the debug flag first.
debugon! sets an instance's debug flag. The debug flag can be tested within an instance to print out debugging information. The DPRINT macro is equivalent to a printf, but tests the debug flag first.
free! frees the memory associated with an instance and removes the instance's name from the symbol table.
header! prints a parsable header for an object, including its name.
help! displays the manual page for the object's class on the terminal. If no manual page is available, the one for the super class will be displayed instead.
help? searches for a man page for an object using the contents of the LYMB_MAN_PATH environment variable. Note that if a man page is not found for a class, LYMB will look for a man page for its superclass and so on. help? returns three things: the name of the class that it found a man page for, the MANPATH for that man page, and the full path for the man page.
help! displays the manual page for the object's class on the terminal after searching the man path specified in the LYMB_MAN_PATH environment variable. If no manual page is available, the one for the super class will be displayed instead.
histogram! prints a histogram of each message and a count. Since method dictionaries are shared by all instances of a class, the counts for each message are those for the class, not the instance.
instances! prints a formatted list of all instances of this object.
instances+ arguments adds the list of names in arguments to the instances of the class. (Internal use only.)
instances- arguments removes the list of names in arguments from the instances of the class. (Internal use only.)
instances? returns a list of the instances of a class. Note that this message can be sent to any object, not just classes, and that each object keeps track of its instances. (This tracking proceeds up the class hierarchy.) Thus, you might create a scalar object using the statement "scalar new: s;", then later execute "scalar new: y; s new: w;". Scalar's instances will include s, y, and w. S's instances will include w. Y will show no instances when queried.
number_instances? returns the number of instances of a class.
instance_start! sets the next member pointer in the instances collection to the first instance. Further instance_next? will return successive instances.
instances_next? returns the name of the next instance in the collection of instances.
instances? returns a list of the instances of an object. If the object is a class, all instances of the class are returned. If the object is an instance, all instances of that particular instance will be returned.
output=pointer sets the object's output stream to the file pointer argument. The best way to get a FILE * is by opening a file using the filep object, then get the file_ptr? result:
filep new: `out filename=`scalar.out' mode=`w' open!; scalar new: `s' output=[out file_ptr?];
output? returns the current output file pointer.
subclasses+ arguments adds the list of names in arguments to the subclasses of the class.
subclasses- arguments removes the list of names in arguments from the subclasses of the class.
subclasses? returns a list of the subclasses of an object.
direct_subclasses? returns a list of the classes which are immediate decendents in the widget tree (i.e. only the class' children - no grandchildren etc)
subclass_start! sets the next member pointer in the subclasses collection to the first subclass. Further subclass_next? will return successive subclasses.
subclasses_next? returns the name of the next subclass in the collection of subclasses.
subclasses? returns a list of the direct subclasses of an object. Unlike the subclasses! message, this is not recursive.
subclasses! prints a formatted list of the subclasses of an object. Subclasses are indented from their superclass. This procedure is recursive, so executing "god subclasses!;" will display all classes built into the version of LYMB being run.
messages! prints any message the recipient object responds to that can be sent from the parser. This list includes all messages in the class hierarchy.
all_messages! prints any message the recipient object responds to, without regard to whether or not they can be sent from the parser. This list includes all messages in the class hierarchy.
local_messages! prints all messages implemented by methods in in this object's class, without regard to whether they can be sent from the parser.
messages? returns a list of messages that an objects accepts, including all messages in the class hierarchy.
all_messages? An alias for messages?
local_messages? returns a list of messages that an object class implements. This does not include all messages in the class hierarchy.
mtime? returns the time the object was modified.
modified! changes the mtime of the object to the current time.
name= argument sets the name of an object to its argument. The symbol table is updated. The old name is deleted, and if another object exists in the symbol table with the same name, it is also deleted, without warning.
name? returns the name of an object.
generate_name! generates a unique name for the object. This is useful for giving unique names to normally anonymous objects such as the fields of a structure object.
new: argument creates a new instance of the object with its name given as the argument.
print! prints a parsable description of the instance showing a header, all public instance variables, and a trailer.
print: argument prints its arguments by sending argument? to the object and printing the returned value. Note: if the argument is "color", it should be quoted, or else parser will parse message "color ?" instead of "object color?". The same precaution should be observed for any instance variable name that coincides with some class or instance name.
formatted_print: argument prints its arguments by sending argument? to the object and printing the returned value in tabular fashion. This is especially useful if the result returned by the argument? message contains many elements. Note: if the argument is "color", it should be quoted, or else parser will parse message "color ?" instead of "object color?". The same precaution should be observed for any instance variable name that coincides with some class or instance name.
super_classes? returns all the class names in an object's hierarchy.
trailer! prints a parsable trailer for an object description. Currently, this consists of a "};".
variables! prints variables of the object and their values to standard output.
write: file writes a parsable description of the object in the file given as an argument. The prior contents of the file are lost. To add to a file, use the append: message.
write_instances: file writes a print description of all the instances of an object in the file named as its argument. The prior contents of the file are lost. To add instances to a file, use the append_instances: message.
end_of_message(internal) is sent by the parser when it sees a semicolon in the input. It should not be sent by any other objects.