Model Class Reference

#import <Model.h>

Inherits IModel-p.

List of all members.

Public Member Functions

(id) - init
(void) - initializeModel
(BOOL) - hasProxy: [implementation]
(void) - registerProxy: [implementation]
(id< IProxy >) - removeProxy: [implementation]
(id< IProxy >) - retrieveProxy: [implementation]

Static Public Member Functions

(id< IModel >) + getInstance


Detailed Description

A Singleton IModel implementation.

In PureMVC, the Model class provides access to model objects (Proxies) by named lookup.

The Model assumes these responsibilities:

Your application must register IProxy instances with the Model. Typically, you use an ICommand to create and register IProxy instances once the Facade has initialized the Core actors.

See also:
Proxy, IProxy

Member Function Documentation

+ (id< IModel >) getInstance  

Model Singleton Factory method.

Returns:
the Singleton instance

- (BOOL) hasProxy: (NSString *)  proxyName   [implementation]

Check if a Proxy is registered

Parameters:
proxyName 
Returns:
whether a Proxy is currently registered with the given proxyName.

Reimplemented from < IModel >.

- (id) init  

Constructor.

This IModel implementation is a Singleton, so you should not call the constructor directly, but instead call the static Singleton Factory method [Model getInstance]

Exceptions:
NSException if Singleton instance has already been constructed

- (void) initializeModel  

Initialize the Singleton Model instance.

Called automatically by the constructor, this is your opportunity to initialize the Singleton instance in your subclass without overriding the constructor.

Returns:
void

- (void) registerProxy: (id<IProxy>)  proxy   [implementation]

Register an IProxy with the Model.

Parameters:
proxy an IProxy to be held by the Model.

Reimplemented from < IModel >.

- (id< IProxy >) removeProxy: (NSString *)  proxyName   [implementation]

Remove an IProxy from the Model.

Parameters:
proxyName name of the IProxy instance to be removed.
Returns:
the IProxy that was removed from the Model

Reimplemented from < IModel >.

- (id< IProxy >) retrieveProxy: (NSString *)  proxyName   [implementation]

Retrieve an IProxy from the Model.

Parameters:
proxyName 
Returns:
the IProxy instance previously registered with the given proxyName.

Reimplemented from < IModel >.


Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  doxygen 1.5.7.1