VkCmdRegistry(3x)
VkCmdRegistry - registry for named command classes
Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.5.
NAME VkCmdRegistry - registry for named command classes INHERITS FROM VkBase HEADER FILE #include <Vk/VkCmdRegistry.h> CLASS DESCRIPTION A central location in which to register classes by name, for later use by VkCmdManager or VkCmdFactory objects. See VkCmd for more details. OVERVIEW 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: cmdManager->run("CutCommand"); To participate in this scheme, commands must register themselves. This is made easy by two macros. The class record should include the line: VK_CMD_DECLARE; in the public portion of the class record, and also include the line: VK_CMD_IMPLEMENT(ClassName, "ClassName"); 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: ClassName::initClass(); 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. SAMPLE CODE /usr/share/src/ViewKit/Commands/ByName/ /usr/share/src/ViewKit/Commands/Factories/ /usr/share/src/ViewKit/Commands/Factory/ SEE ALSO VkCmd, VkCmdManager 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