next up previous
Next: Copying boxes Up: The Box: A Replacement Previous: Introduction

  
The box

A box is an always-opened recipient containing some data. System resources ranging from an entire application, to a user-settable variable, can be represented by boxes. Every box (see figure 1):


  
Figure 1: Copying and sharing type-compatible boxes
\begin{figure*}
\begin{center}
\leavevmode
\epsfig{file=copyNlink.eps,width=10.5cm} \end{center}\end{figure*}

1.
is typed,
2.
may contain inner boxes, and might be contained in outer boxes,
3.
can be handled with three operations:
copy(otherBox,aBox)
which copies aBox to otherBox, (provided both boxes are type-compatible).
share(otherBox,aBox)
which makes otherBox become logically the same as aBox (provided both boxes are type-compatible).
select(aBox,aSelector) $\Rightarrow$innerBox
which returns a handle for a box inside the given one--according to the name or selector supplied.
When aBox and otherBox are not type-compatible, a type converter must be used to perform a copy or a share operation. Box operations are atomic, in the sense that concurrent operations on a given box will be serialized by the box implementation.

To operate on pairs of boxes which are not type-compatible, every application has a set of converters, including: When an application issues a copy (or share) operation requiring type conversion, the (per-application) converter set is searched for a suitable converter. Converters and those system entities which are not simple ``data'', can be also seen as boxes. Converters can be modeled as boxes which, once given some input box(es), generate new contents for their output box(es).

Now, we will describe box operations in more detail, showing how they are as simple to use as file operations are, while being more powerful.



 
next up previous
Next: Copying boxes Up: The Box: A Replacement Previous: Introduction

1999-02-26