<<<<<<<<<<<<<<<<<

generic_data_filter(visage) Visage generic_data_filter(visage)

NAME

generic_data_filter - abstract class implementing the general notion of a filter

DESCRIPTION

Generic_data_filter is an abstract class that implements the general notion of a filter. A filter is an object that takes as input a data object and transforms it into another data type. The number and type of input data is arbitrary but usually defined by the sub-class of generic_data_filter. Usually only one output data is generated.

Genric_data_filter implements the filter mechanism using the instance variables data_in and data_out, and knows how to be conservative about regenerating data from its inputs, based upon its modification time and that of its input(s).

NOTE: filter objects (that is, objects that are a subclass of generic_data_filter) are connected together to form data flow networks. The dependency of the network is maintained by the data_in instance variables in combination with the modified time of each object in the network. Hence, when an object in the network is modified, all objects downstream from the object automatically re- execute.

ANOTHER NOTE: it is possible to transmit some messages through the network. Currently, these messages are related to the time behavior of the data_out data object (e.g., time=, tick!, start_time=, end_time=, cache_size=, etc.) The back propagation of these messages is controlled by the back_propagate messages.

SUPERCLASS

object

INSTANCE VARIABLES

data_in The name(s) of the filter's input object(s). This will typically be one or more filter objects or other classes, such as readers, that can generate data in the proper form.

data_out The name of the filter's output object. This will typically be some sort of data storage object, like display_data, or sv_ip.

sources Like data_in, except that it typically provides auxiliary data to the main data stream.

start_actions The name of an actions or procedure object to be sent a call! message just before sending the object a generate_data! message. If a procedure is used as the start_actions object, it must accept a single input argument, which is the name of the filter object.

end_actions The name of an actions or procedure object to be sent a call! message just after sending the object a generate_data! message. If a procedure is used as the end_actions object, it must accept a single input argument, which is the name of the filter object.

MESSAGES

generate_data! causes the object to regenerate its output from its input. Does not force its input to be up to date.

recomputing_mtime? causes the object to compare its modification time with that of its inputs, and send itself a generate_data! message if it needs to be updated. The greater of its modification time and that of its inputs is returned. This should be considered an internal method, use update! instead.

update! forces the object to be up to date by sending a recomputing_mtime? message to itself (which of course propagates down the network).

data? causes the object to return a pointer to its data. Note: the data is not necessarily up to date. May need to use a update! method to force the execution of the object.

does_not_understand an internal method that forwards all unknown messages to its data_out object. This is extremely convenient since data messages like output!, data?, data=, range?, etc. are handled by the data_out, making the filter object have the same functionality as a data object.

back_propagate_on! causes certain messages to propagate through the entire visualization network. These messages are currently time-related messages handled by the visage_data class: time=, tick!, start_time=, end_time=, and cache_size=. Normally these messages are delegated only to the data_out, but if

back_propagate is on, then they are directed through the whole network.

back_propagate_off! turn off back propagation of messages.

back_propagate=value set the back_propagate flag. A value!=0 means to enable back propagation.

back_propagate? return the value of the back_propagate flag.

SEE ALSO

display_data, display_feature, display_filter, sv_ip


Please send comments and suggestions to
consult@rpi.edu