You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.




New Layout: Base Library Roadmap


Authors: Kipp Hickman
Updated: 30 April 1998

Overview

This document briefly describes the "base" module (mozilla/base). The base module is a collection of data structures and I/O abstractions that are built using xpcom technology. Much of the code reuses other libraries (e.g. the NSPR).

Major Components

The base library contains data structures for:
  • Typeless arrays (nsVoidArray)
  • Typeless b-tree's and red-black trees (nsBTree, nsRBTree)
  • Strings's (yet-another-string-library). These strings are unicode, however.
  • Arena's (memory pools)
  • Atom's (unique string's that are reference counted)
  • Deque (a simple fifo queue)
The base library contains some I/O abstractions:
  • nsIInputStream - a byte input stream interface.
  • nsIUnicharInputStream - a unicode input stream interface.
  • nsIUnicharBuffer, nsIByteBuffer - buffers of unicode/byte's.
  • nsIURL - a temporary URL abstraction
Timers
  • Timers; timers require an application event loop to operate.
Implementation and Roadmap

The base library source can be found in mozilla/base; most of it is machine independent. However, the timer code is machine dependent. The I/O abstractions will probably move out of the base library and into either the nspr or netlib or some combination of the two.

The nsString class has not yet been made 100% i18n'd. That work will be done on an as-needed basis.

The are no plans to extend the base library directly. Instead if something is needed that fits its profile and it should be shared across modules then it can be added to base on an as-needed basis.