Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dbFieldCopier Class Reference
[OOFILE Database package]

#include <oof3.h>

Inheritance diagram for dbFieldCopier:

Inheritance graph
[legend]
Collaboration diagram for dbFieldCopier:

Collaboration graph
[legend]
List of all members.

Detailed Description

Utility class establishing copy dependency between fields.

Not used much at present. May be vulnerable to cloning of dbFields so the field you specified and think is being updated is not the one connected to a GUI.


Public Member Functions

 dbFieldCopier (oofBroadcaster *listensTo, unsigned short copyOnMessage, dbField *copyFrom, dbField *copyTo)
virtual ~dbFieldCopier ()
virtual bool receiveMsg (OOFmsgT msg, unsigned long senderDefined)
 The default receiveMsg behaviour is to delete yourself when the broadcaster closes.

virtual void subscribeTo (oofBroadcaster *)
virtual void unsubscribe (oofBroadcaster *from=0)
void suspendListening ()
void resumeListening ()

Protected Attributes

dbFieldmCopyFrom
dbFieldmCopyTo
OOFmsgT mCopyOnMessage
oofBroadcastermListensTo
oofBroadcastermSuspendedListensTo
unsigned short mSuspendCount


Constructor & Destructor Documentation

dbFieldCopier::dbFieldCopier oofBroadcaster listensTo,
unsigned short  copyOnMessage,
dbField copyFrom,
dbField copyTo
 

dbFieldCopier::~dbFieldCopier  )  [virtual]
 


Member Function Documentation

bool dbFieldCopier::receiveMsg OOFmsgT  msg,
unsigned long  senderDefined
[virtual]
 

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.

Reimplemented from oofSingleListener.

void oofSingleListener::resumeListening  )  [inherited]
 

void oofSingleListener::subscribeTo oofBroadcaster  )  [virtual, inherited]
 

Reimplemented from oofReceiver.

void oofSingleListener::suspendListening  )  [inherited]
 

void oofSingleListener::unsubscribe oofBroadcaster from = 0  )  [virtual, inherited]
 

Reimplemented from oofReceiver.


Member Data Documentation

dbField* dbFieldCopier::mCopyFrom [protected]
 

OOFmsgT dbFieldCopier::mCopyOnMessage [protected]
 

dbField * dbFieldCopier::mCopyTo [protected]
 

oofBroadcaster* oofSingleListener::mListensTo [protected, inherited]
 

unsigned short oofSingleListener::mSuspendCount [protected, inherited]
 

oofBroadcaster* oofSingleListener::mSuspendedListensTo [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Thu Jan 1 21:36:06 2004 for OOFILE by doxygen 1.3.5