This small tool is useful for defining hierarchies of tasks, named by strings. For example, one might define a task "/project", which has subtasks "/project/lisp" and "/project/marketing". Clients (implemented here as strings, though these could be replaced with complex data) and values can be associated with tasks. Task hierarchies could be useful in applications such as time logging programs, spreadsheets, etc.
The actual task tool uses a more generic simple tree representation; if the programmer wished, this could for example also be used to define client hierarchies or hierachies of other data which could then be stored in the client or value slots of tasks.
Trees are here implemented using structures; the detailed implementation of a tree is hidden behind a simple API, but essentially each node in the tree is a structure which contains a "children" slot which references all its child nodes. Nodes have names, which are strings, and values, which can be instances of any Lisp type.
Tasks are also implemented using structures. Each task is stored as the value of a node in the tree representation. Tasks, like tree nodes, have names. (Don't confuse the name of a task - which to the user of the task tool in some sense is the task - with the name of its node, which is used in the tree representation to reference that node.)
Tasks also have clients, implemented here as strings, and values - which can be instances of any Lisp type. Thus, in for example a time-logging application the value of a task might be an integer, representing the number of hours to be logged against that task, or it might be a more complex data type representing hours and minutes, and so on.
A simple API to the task tool is provided:
*task-sep-char*. task-name returns
the name of a task.
task-client
returns a task's client and task-value returns a task's
valuecreate-task, for example
(create-task "/project/lisp" :client Franz).
find-task.
Author: Gail Anderson (ga@cley.com),
Cley Limited.
Copyright 1999–2003 Cley Ltd. & Franz Inc.