VkCmdRegistry - registry for named command classes
A central location in which to register classes by name, for later
use by VkCmdManager or VkCmdFactory objects. See VkCmd for more
Commands can be executed by name, provided the command registers
itself with the VkCmdRegistry, a globally available list that links
unique names to a mechanism for creating command objects. Once
registered, a command can be invoked by the VkCmdManager by name:
To participate in this scheme, commands must register themselves.
This is made easy by two macros. The class record should include the
in the public portion of the class record, and also include the
somewhere in the source file. The first argument is the class name,
while the second is a unique identifier for this command, which is
usually the class name as well.
Before the first time the class is used, the program must call:
where ClassName is the same of the class. In the future, the should
be a class that is able to extract and invoke the initClass() method
from a DSO, allowing for "plugin" commands.
ViewKit Programmer's Guide
The X Window System, DEC Press, Bob Sheifler and Jim Gettys
The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
The OSF/Motif Programmers Reference, Prentice Hall, OSF
PPPPaaaaggggeeee 2222 [ Back ]