Search Top Index
REF METAFLAVOUR_FLAVOUR Mark Rubinstein April 1986 Revised A.Schoter June 1991 COPYRIGHT University of Sussex 1991. All Rights Reserved. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< REF METHODS FOR >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< METAFLAVOUR_FLAVOURS >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Metaflavours are instances that represent flavours. The system provides three different metaflavours: metaflavour, mixin and flavour. For details on how to define new metaflavours see TEACH * FLAVOURS /Metaflavours. See HELP * FLAVOUR_LIBRARY for details of how flavour protocols are documented. For full details of the flavours package see TEACH * FLAVOURS. For details about metaflavours in general see HELP * METAFLAVOURS. CONTENTS - (Use <ENTER> g to access required sections) 1 Protocol for metaflavour_flavour 2 Protocol for mixin_flavour 3 Protocol for flavour_flavour ----------------------------------- 1 Protocol for metaflavour_flavour ----------------------------------- Metaflavour_flavour is a metaflavour which inherits from vanilla_flavour. Its instance variables are name and flavour_record (contains the internal system flavour structure). afterdaemons [method] Return list of names of after daemons defined in the flavour. beforedaemons [method] Return list of names of before daemons defined in the flavour. cancelcomponent(component) [method] Make the flavour cease to inherit from the flavour component. component can either be a flavour or the name of a flavour. Does not affect subflavours. Methods are no longer inherited but instance variables continue to be inherited. cancelivar(ivar) [method] Cancel the named instance variable ivar. Does not affect subflavours. cancelmethod(method_name) [method] cancelmethod(method_name, "before") cancelmethod(method_name, "after") Cancel the named method (or daemon if second argument is "before" or "after"). Cancels both the base method (if any) and updater (if any). components [method] Return list of components (super-flavours) default_value_for(ivar_name) [method] Gets or sets the default value defined in this flavour for the named instance variable. This procedure does not climb the inheritance network to find inherited default values. In update mode setting the value to be undef is taken to mean removee any default value defined in this flavour, allowing an inherited value to be used if there is one. This method has an updater. dynamic_instance_variables [method] Return list of dynamic instance variables. instance_variables [method] Return list of all instance variables. iscomponent(f) [method] This message is autoloaded. Returns true iff f is a component. Climbs the inheritance lattice, i.e. returns true iff f is a component or a component of a component. flavour_changed [method] A dummy method that does nothing. This message is sent whenever a flavour is changed. ftrace(method_name) [method] ftrace(list_of_method_names) This message is autoloaded, see LIB * FTRACE_MESSAGE. Will trace the named method or methods. The methods must be defined in this flavour. The printing of traced methods is controlled by the variable tracing. (see HELP * FTRACE for more details) ftraceall [method] This message is autoloaded, see LIB * FTRACE_MESSAGE. Will trace all methods defined in this flavour. (see HELP * FTRACE for more details) lexical_instance_variables [method] Return list of lexical instance variables. metaflavour_flavour -> metaflavour [variable -- flavour] metaflavour -> metaflavour_flavour System metaflavour for metaflavours (see HELP * METAFLAVOURS). methodfor(message) [method] methodfor(message, "updater") methodfor(message, "before") methodfor(message, "after") methodfor(message, "updater", "before") methodfor(message, "updater", "after") Return the method (procedure) or daemon for the named message, but only if the method is defined in this flavour (instead of inherited). This message has an updater. methods [method] Return list of names of methods defined in this flavour. For example, try: metaflavour_flavour <- methods => subclass_reponsibility(method_name) [method] subclass_reponsibility(list_of_method_names) subclass_reponsibility(method_name, "before") subclass_reponsibility(method_name, "after") This message is autoloaded. It will note that a method method_name should be provided by a subclass. If the message method_name is sent to an instance none of whose subclasses provide a method a mishap will occur. See LIB * SUBCLASS_RESPONSIBILITY_MESSAGE. subflavours [method] Return flavours for which self is a component. unftrace(method_name) [method] unftrace(list_of_method_names) This message is autoloaded. See LIB * FTRACE_MESSAGE. Will untrace named method or methods if they are being traced. (see HELP * FTRACE for more details) unftraceall [method] This message is autoloaded. See LIB * FTRACE_MESSAGE. Will untrace all traced methods in this flavours. (see HELP * FTRACE for more details). willrespondto(message) [method] willrespondto(message, "updater") Returns true iff instances of the flavour will respond to the message (or the updater message if the second argument is "updater"). Possibly the most useful message. ----------------------------- 2 Protocol for mixin_flavour ----------------------------- Mixin_flavour is a metaflavour which inherits from metaflavour_flavour. Its instance variables are name and flavour_record. ------------------------------- 3 Protocol for flavour_flavour ------------------------------- Flavour_flavour is a metaflavour which inherits from metaflavour_flavour. Its instance variables are name and flavour_record. new [method] Return an instance of the flavour. Does not send the initialise message. --- C.all/ref/metaflavour_flavour --- Copyright University of Sussex 1990. All rights reserved.