VkModel(3x) VkModel(3x)
VkModel - An abstract class that supports Model-View-Controller style
applications
VkCallbackObject
#include <Vk/VkModel.h>
PUBLIC PROTOCOL SUMMARY
Destructor
virtual void ~VkModel(void);
PROTECTED PROTOCOL SUMMARY [Toc] [Back] Constructor
VkModel(void);
Notifying Views of Changes [Toc] [Back]
void updateViews(void *data);
The VkModel class is a very simple abstract class that supports
applications that want to use the Model-View-Controller (MVC)
architecture. The VkModel class is intended to be subclassed, and the
subclass provides the data members and any additional functions required
to implement the model. ViewKit components can be used as both "views"
and "controllers". View components can arrange to be notified of changes
to the model by registering a member function with the
VkModel::updateCallback list. Callbacks on this list are invoked when a
subclass of VkModel calls updateViews(). This method is just a convenient
way to invoke the functions on the updateCallback list. Components used
as "controllers" are expected to send messages to subclasses of VkModel
to alter the state of the model. This protocol must be worked out between
the VkModel subclass and the controller components.
FUNCTION DESCRIPTIONS [Toc] [Back] updateViews()
void updateViews(void * data);
Calls all member functions on the updateCallback list, passing the
provided data as the callData.
VkModel() [Toc] [Back]
VkModel(void);
Page 1
VkModel(3x) VkModel(3x)
Initialize a VkModel class.
~VkModel()
virtual void ~VkModel(void);
Empty function.
DATA MEMBER DESCRIPTIONS [Toc] [Back] updateCallback
static const const char* updateCallback;
Other classes that wish to be notified when the internal state of a
VkModel subclass has changed should register a member function with
this callback list.
INHERITED MEMBER FUNCTIONS [Toc] [Back] Inherited from VkCallbackObject
callCallbacks(), addCallback(), removeCallback(),
removeAllCallbacks()
VkCallbackObject
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 ]
|