Main Page | Class Hierarchy | Class List | File List | Class Members

QAvatarFactory Class Reference

#include <QAvatarFactory.h>

Inheritance diagram for QAvatarFactory:

Inheritance graph
[legend]
List of all members.

Detailed Description

Factory class generates new QAvatar instances.

Author:
Chris Scharver
Revision
1.5
Date
2004/04/13 19:10:10
The Factory Method Pattern provides a convenient way to generate instances. It's especially beneficial since it avoids the use of templates. Since C++ compilers do not have uniform template support, the use of a factory allows easily generating instances in a general fashion.

See also:
QAvatar, QAvatarManager

Definition at line 50 of file QAvatarFactory.h.

Public Member Functions

virtual ~QAvatarFactory ()
 Virtual destructor.

virtual QAvatarcreateAvatar (const long &avatarID)=0
 Constructs a new avatar.


Member Function Documentation

virtual QAvatar* QAvatarFactory::createAvatar const long &  avatarID  )  [pure virtual]
 

Constructs a new avatar.

This factory method creates a new QAvatar instance. Subclasses will instantiate a new instance and return a pointer to that new instance. The QAvatarManager calls this method when it needs to create a new avatar, and it is the manager that generates the identification number for the new avatar.

Parameters:
avatarID unique identification number for the new avatar
Returns:
pointer to a new QAvatar instance

Referenced by QAvatarManager::handleHailingData(), and QAvatarManager::QAvatarManager().


The documentation for this class was generated from the following file:
Generated on Tue Apr 13 16:42:26 2004 for QAvatar by doxygen 1.3.6