MvcCore Class Reference

The MvcCore class is a base for all Model-View-Controller modules. More...

#include <mvccore.h>

Inheritance diagram for MvcCore:

MvcDiagram MvcDigestDb MvcSettings List of all members.

Public Types

enum  ElementType { UserElement = 1000 }
enum  ElementAttributeType { UserElementAttribute = 1000 }

Static Public Member Functions

static MvcModuleId_t id ()

Static Protected Member Functions

static MvcModuleId_t generateNewId ()

Detailed Description

The MvcCore class is a base for all Model-View-Controller modules.

The id() is very important when combining multiple MVC modules together, where event IDs may overlap. By checking the (unique) id() first, you can ensure that the events are sent and handled correctly.


Member Enumeration Documentation

enum MvcCore::ElementType

Enumerator:
UserElement 

Reimplemented in MvcDiagram.

enum MvcCore::ElementAttributeType

Enumerator:
UserElementAttribute 

Reimplemented in MvcDiagram.


Member Function Documentation

static MvcModuleId_t MvcCore::id (  )  [inline, static]

Returns the module's id().

This method must be re-implemented in every sub-class as:

 inline static MvcModuleId_t id() {
   static s_id = generateNewId();
   return s_id;
 }

The id() is very important when combining multiple MVC modules together, where event IDs may overlap. By checking the (unique) id() first, you can ensure that the events are sent and handled correctly.

Reimplemented in MvcDiagram, MvcDigestDb, and MvcSettings.

MvcModuleId_t MvcCore::generateNewId (  )  [static, protected]

Generates a unique ID, starting from 1.

Returns 0 on failure (will virtually never occur in practice).


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