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

Mixin for objects created to fulfill a promise later when parsing complete. More...

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

Public Member Functions

const oofStringID () const
 
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 void unsubscribe (oofBroadcaster *from=0)
 

Protected Member Functions

 OOF_mixPromise (oofRepPromiseCompleter *listensTo, const oofString &theID)
 

Protected Attributes

const oofString mID
 
oofBroadcastermListensTo
 
unsigned short mSuspendCount
 
oofBroadcastermSuspendedListensTo
 

Detailed Description

Mixin for objects created to fulfill a promise later when parsing complete.

Used at the end of the report to link text styles read in the <style> tag with the report objects created from parsing the <layout> tag.

Definition at line 162 of file oofriXML.cpp.

Constructor & Destructor Documentation

OOF_mixPromise::OOF_mixPromise ( oofRepPromiseCompleter listensTo,
const oofString theID 
)
inlineprotected

Definition at line 164 of file oofriXML.cpp.

Member Function Documentation

const oofString& OOF_mixPromise::ID ( ) const
inline

Definition at line 171 of file oofriXML.cpp.

Referenced by oofRepTextStyleCompleter::completeStyle().

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
void oofSingleListener::unsubscribe ( oofBroadcaster from = 0)
virtualinherited

Member Data Documentation

const oofString OOF_mixPromise::mID
protected

Definition at line 171 of file oofriXML.cpp.

Referenced by oofPromisedGraphSettings::receiveMsg().

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

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