next up previous contents
Next: Extending Overflow Up: Overflow User's Manual Previous: Automatic Code Generation   Contents

Subsections

Software Architecture

This chapter explains the software architecture used for the Overflow base library and the mechanisms used for blocks initialization.

Overflow Internals

Nodes

A node is the smallest processing unit in Overflow. Once it has been initialized, the only method it understands is getOutput(int output_id, int count). In other words, all you can do with it is to ask it for its output. One obvious consequence of that is that all node must have at least one output, but it can have more than one. A node can have any number of input, including zero (examples of node with no inputs are constants and random generators).

If a node requires input data in order to perform some calculations, it will call getOutput(...) on its input node(s). Computation is hence performed in a recursive manner until everything is calculated and the last node returns its output. The count argument to the getOutput(...) method is used when loops are involved. It specifies the number of the iteration. Note that it is possible for a node to ask its inputs for a different count that the one received. It is even possible to ask for many different count values in a row.

The Node class is an abstract class from which all types of nodes must derive (directly or indirectly). Information on how to derive new types of nodes is given in Extending Overflow chapter 7.

Networks

A network is a graph containing nodes that are linked together in order to perform some operation and/or return a result. Most of the time, the graph will be acyclic that is, it will not contain loops. It is now (as of march 2001) possible to have feedback loops using the FeedBack node, but this is a more advanced topic. One thing worth mentioning is that the Network class derives directly from the Node class. This means that any network can be used just as if it were a single Node. This makes it possible to include networks in other networks. The included network is often referred to as sub-network, or subnet.

In order for a network to be valid, it must meet the following criteria

Class Diagrams

Figure: Main Overflow classes
Image classes.png

Data Types


next up previous contents
Next: Extending Overflow Up: Overflow User's Manual Previous: Automatic Code Generation   Contents
Jean-Marc Valin 2002-06-17