[Classes] [Prev] [Next] [Methods]

CController

Methods Index

Heritage
Description
Usage
Protected Data Members
Public Methods
Constructor and Destructor Methods
Model Methods
Dependent Methods
Provider Methods
Controller ID Methods
Protected Methods

CController


Heritage

Superclass: CNotifier

Subclasses: None


Description

CController is responsible for managing a list of dependents and providers, and provides access to its model. There is one CController per model.

When an object wants to change the model, the CController::DoChange method first checks its list of providers, because not every object has the ability to change the model. It then calls the Change method to alter the model data. Finally, CController goes through its list of dependents and calls their respective DoUpdateModel method.


Usage

CController* aController=G->GetControllerMgr()->
GetController(id);
aController->AddDependent(this);

Protected Data Members

long itsId The controller ID
RWOrdered* itsDependents; The list of dependents
RWOrdered* itsProviders; The list of providers
CModel* itsModel; The pointer to the model that the controller is associated with
const CNotifier* itsCurrentProvider; The provider that is causing a change


Public Methods

Constructor and Destructor Methods

(CModel* theModel);
virtual ~CController();

Model Methods

virtual BOOLEAN SetModel(
const CNotifier* theProvider, CModel* theModel);
virtual const CModel* GetModel() const;
virtual BOOLEAN DoChange(
const CNotifier* theProvider,
long theCommand,
const CModel* theModel);

Dependent Methods

virtual BOOLEAN AddDependent(CNotifier* theDependent);
virtual BOOLEAN RemoveDependent(CNotifier* theDependent);
virtual const RWOrdered* GetDependents() const;
virtual BOOLEAN IsDependent(
CNotifier* theDependent) const;

Provider Methods

virtual BOOLEAN AddProvider(CNotifier* theProvider);
virtual BOOLEAN RemoveProvider(CNotifier* theProvider);
virtual const RWOrdered* GetProviders() const;
virtual BOOLEAN IsProvider(CNotifier* theProvider) const;
 virtual const CNotifier* GetCurrentProvider() const;
Returns a pointer to the object that caused a model change.

Controller ID Methods

long GetId();

Protected Methods

CController(const CController& theController);
CController& operator = (const CController& theController);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.