DiagramElementAttributeFactory Class Reference

The DiagramElementAttributeFactory class creates AbstractDiagramElementAttribute objects for AbstractElement objects. More...

#include <diagramelementattributefactory.h>

List of all members.

Static Public Member Functions

static AbstractElementAttributecreate (MvcDiagram::ElementAttributeType type, AbstractElement *parent)
static AbstractElementAttributecreate (const QByteArray &key, AbstractElement *parent)
static const QList< QByteArray > & keys ()
static int type (const QByteArray &key)
static const QString & title (const QByteArray &key)


Detailed Description

The DiagramElementAttributeFactory class creates AbstractDiagramElementAttribute objects for AbstractElement objects.

Note that QByteArray is more than enough for keys. There is no need for QString, and we definitely don't want the keys to be language dependant.

Also on the topic of QByteArray, from the Qt 4.0.0 documentation: "Using QByteArray is much more convenient than using const char *. Behind the scenes, it always ensures that the data is followed by a '\0' terminator, and uses implicit sharing (copy-on-write) to reduce memory usage and avoid needless copying of data."


Member Function Documentation

AbstractElementAttribute * DiagramElementAttributeFactory::create ( MvcDiagram::ElementAttributeType  type,
AbstractElement parent 
) [static]

AbstractElementAttribute * DiagramElementAttributeFactory::create ( const QByteArray &  key,
AbstractElement parent 
) [static]

Note: This method is (intentionally) NOT case sensitive when it performs the key matching.

const QList< QByteArray > & DiagramElementAttributeFactory::keys (  )  [static]

Warning! This method is not thread-safe until it returns from the first call.

int DiagramElementAttributeFactory::type ( const QByteArray &  key  )  [static]

const QString & DiagramElementAttributeFactory::title ( const QByteArray &  key  )  [static]


The documentation for this class was generated from the following files:
Generated on Mon Jul 30 09:46:52 2007 for Digest by  doxygen 1.5.2