OOFILE  1.9
Public Member Functions | Protected Attributes | List of all members
dbHelper Class Reference

Abstract base Controller class managing database to GUI mapping. More...

#include <oofgui.h>

Inheritance diagram for dbHelper:
Inheritance graph
[legend]
Collaboration diagram for dbHelper:
Collaboration graph
[legend]

Public Member Functions

 dbHelper (dbTable *)
 
virtual void maybeChangeTargetLink (dbFieldLink *)
 
virtual void maybeDirty (dbFieldLink *)
 
virtual bool receiveMsg (OOFmsgT msg, unsigned long senderDefined)
 The default receiveMsg behaviour is to delete yourself when the broadcaster closes. More...
 
void resumeListening ()
 
virtual void subscribeTo (oofBroadcaster *)
 
void suspendListening ()
 
virtual dbTabletable () const
 
virtual void unsubscribe (oofBroadcaster *from=0)
 
virtual ~dbHelper ()
 

Protected Attributes

oofBroadcastermListensTo
 
unsigned short mSuspendCount
 
oofBroadcastermSuspendedListensTo
 

Detailed Description

Abstract base Controller class managing database to GUI mapping.

Definition at line 355 of file oofgui.h.

Constructor & Destructor Documentation

dbHelper::dbHelper ( dbTable tbl)

Definition at line 266 of file oofgui.cpp.

dbHelper::~dbHelper ( )
virtual

Definition at line 272 of file oofgui.cpp.

Member Function Documentation

void dbHelper::maybeChangeTargetLink ( dbFieldLink )
virtual

Reimplemented in dbAbstractEditHelper.

Definition at line 278 of file oofgui.cpp.

Referenced by dbFieldLink::maybeChangeTargetLink().

void dbHelper::maybeDirty ( dbFieldLink )
virtual

Reimplemented in dbAbstractEditHelper, and OOF_mixRepAbstractCellEditor.

Definition at line 285 of file oofgui.cpp.

Referenced by dbFieldLink::maybeDirty().

bool oofSingleListener::receiveMsg ( OOFmsgT  msg,
unsigned long  senderDefined 
)
virtualinherited

The default receiveMsg behaviour is to delete yourself when the broadcaster closes.

In many user subclasses oofSingleListener is a mixin and you have a class owned elsewhere, not self-deleting.

\warning If a subclass is not self-deleting it MUST override receiveMsg 
handling of the msg OOFmsg_BroadcasterClosing to prevent runtime error.

However it is still important to set mListensTo=0 otherwise when you finally get around to deleting your oofSingleListener, it will try to update a deleted oofBroadcaster and cause a crash.

Implements oofReceiver.

Reimplemented in dbRelMaintainer, dbCloneCleanup, OOF_recordCacheCopier, dbFieldCopier, dbAbstractEditHelper, dbAbstractBrowseHelper, dbBrowseHelper, oofPromisedGraphSettings, oofPromisedRepTextStyle, oofRepData, oofE_Table, dbHierBrowseHelper, dbRelRefBase, and dbTableViewDisplay.

Definition at line 275 of file oofmsg.cpp.

References oofSingleListener::mListensTo, and OOFmsg_BroadcasterClosing.

Referenced by dbRelRefBase::receiveMsg(), oofPromisedGraphSettings::receiveMsg(), dbFieldCopier::receiveMsg(), and dbRelMaintainer::receiveMsg().

void oofSingleListener::resumeListening ( )
inherited
void oofSingleListener::subscribeTo ( oofBroadcaster broad)
virtualinherited
void oofSingleListener::suspendListening ( )
inherited
dbTable * dbHelper::table ( ) const
virtual

Reimplemented in dbAbstractEditHelper, and dbAbstractBrowseHelper.

Definition at line 292 of file oofgui.cpp.

Referenced by dbFieldLink::readOnly().

void oofSingleListener::unsubscribe ( oofBroadcaster from = 0)
virtualinherited

Member Data Documentation

oofBroadcaster* oofSingleListener::mListensTo
protectedinherited
unsigned short oofSingleListener::mSuspendCount
protectedinherited
oofBroadcaster* oofSingleListener::mSuspendedListensTo
protectedinherited

The documentation for this class was generated from the following files: