| Methods Index |
CControllerSubclasses: None
CNotifier for TDI. It is a controller implementation designed to be lightweight and efficient for TDI. CTdiController has the following characteristics:
CNotifier.
nullModel that always returns TRUE to changes.
CTdiController implies access; therefore, for efficiency, CController::IsProvider()
CTdiValue that copies data sent to that dependent. The CTdiValue is then sent along as the TDI message to the dependent.CurrentModel of each dependent, as well as the originator of each TDI value, the controller ensures that a TDI message does not make a round trip in a closed TDI connection graph.
|
|
|
{ kID = 0L };
| Unique ID signifying a TDI controller. All TDI controllers share this ID. |
|
|
|
friend class
|
CNotifier;
|
CTdiController();
CTdiController does not accept a model, since TDI is not based on the use of a central model object. Instead, a dummy never-used model is automatically created here for you.
virtual ~CTdiController();
CTdiController(const CTdiController& theController); CTdiController& operator=(
const CTdiController& theController);
virtual BOOLEAN DoChange(
const CNotifier* theProvider,
long theCommand,
const CTdiValue* theModel);
theModel. If the copying is successful, the prototype, along with its context message (if not NULL), will be sent to the dependent..
virtual BOOLEAN DoChange(
const CNotifier* theProvider,
long theCommand,
const CModel* theModel);
CController::DoChange() method. A run-time check is made to see if theModel is derived from CTdiValue. If so, the class's other DoChange() method above is invoked for TDI processing.
virtual BOOLEAN AssociateModel(
CNotifier* theDependent,
CTdiValue* thePrototype);
FALSE. Otherwise, any previously associated prototype is destroyed, and the new one is consumed.
virtual BOOLEAN AddDependent(
CNotifier* theDependent,
CTdiValue* thePrototype);
NULL. See DoChange() for information about how theDependent and thePrototype are used during TDI processing. If the prototype is not NULL, the pointer is consumed; that is, the responsibility for destroying the prototype is transferred to the controller. The method returns FALSE if the dependent has been registered previously, making further registration fail.
virtual BOOLEAN AddDependent(
CNotifier* theDependent);
AddDependent with a NULL prototype.
virtual BOOLEAN RemoveDependent(
CNotifier* theDependent,
CTdiValue*& thePrototype);
thePrototype, and the responsibility for its destruction is transferred to the caller.
virtual BOOLEAN RemoveDependent(
CNotifier* theDependent);
virtual BOOLEAN AddProvider(
CNotifier* theProvider);
CController::AddProvider.
virtual const RWOrdered* GetDependents() const;
NULL.
virtual BOOLEAN IsDependent(
const CNotifier* theDependent) const;
TRUE if theDependent is registered with the controller.
virtual void Suspend(); virtual void Resume();
void SetActiveDependent(CNotifier* theDependent); CNotifier* GetActiveDependent() const;
SetActiveDependent with a NULL pointer.
BOOLEAN IsOriginator(
const CTdiValue* theModel,
const CNotifier* theNotifier);
TRUE if theNotifier originally created theModel's data.