Command classes

A command encapsulates a potential action that can occur against a target. You use it in much the same way as you would invoke a function associated with an object.

The target is the data upon which the command operates. The target can be any one of several different types of object.


TCommandOn<> is a template class that inherits its functionality from the TCommonCommand class. A template class is parameterized by the type of target it acts upon.

The instantiation of the TCommandOn<> class is an object that behaves very much like a functor. A TCommandOn<> object has up to three different actions associated with it:

TCommandBinding is a command and its target bound together. TCommandBinding provides a mechanism to support persistence between commands and targets. Because commands have no persistent knowledge about the targets upon which they act.

Command bindings are used to implement command logs and histories in the CommonPoint application system. (Refer to Chapter 6, "Presentation and Compound Document framework concepts" for a more complete discussion of commands and selections.)


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker