Wolfram Library Archive


All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

Inheritance of option values and miscellaneous option utilities
Author

Mark Caprio
Organization: University of Notre Dame
Department: Physics
Revision date

2005-07-14
Description

Often it is necessary to define several related functions which accept similar sets of options. It is useful for such related functions to be able to share the default values for their options, so that a default value set for one can affect all the others as well. The InheritOptions package provides a framework for this, as well as for much more sophisticated possibilities.

The InheritOptions package applies the concept of "inheritance", one of the foundations of object oriented programming, to Mathematica's option system. Inheritance is the process by which one object, known as the "child" object, can be automatically assigned some of the properties of another type of object, known as the "parent" object. The InheritOptions package implements a form of inheritance in which a child symbol inherits the default values of options from a parent symbol.

The package also provides some general option processing utilities, not directly related to inheritance, including utilities to sort and combine lists of options.
Subject

*Wolfram Technology > Programming > Options
Keywords

options, inheritance, object oriented programming
Downloads Download Wolfram CDF Player

Download
InheritOptionsGuide.pdf (230.6 KB) - PDF Document
Download
InheritOptions.m (13.2 KB) - Mathematica Package