IModel implementation.
More...

Public Member Functions | |
| virtual void | RegisterProxy (IProxy proxy) |
Register an IProxy with the Model. | |
| virtual IProxy | RetrieveProxy (string proxyName) |
Retrieve an IProxy from the Model. | |
| virtual bool | HasProxy (string proxyName) |
| Check if a Proxy is registered. | |
| virtual IProxy | RemoveProxy (string proxyName) |
Remove an IProxy from the Model. | |
Protected Member Functions | |
| Model () | |
| Constructs and initializes a new model. | |
| virtual void | InitializeModel () |
Initialize the Singleton Model instance. | |
Protected Attributes | |
| IDictionary< string, IProxy > | m_proxyMap |
Mapping of proxyNames to IProxy instances. | |
| readonly object | m_syncRoot = new object() |
| Used for locking. | |
Static Protected Attributes | |
| static volatile IModel | m_instance |
| Singleton instance. | |
| static readonly object | m_staticSyncRoot = new object() |
| Used for locking the instance calls. | |
Properties | |
| static IModel | Instance [get] |
Model Singleton Factory method. This method is thread safe. | |
IModel implementation.
In PureMVC, the Model class provides access to model objects (Proxies) by named lookup
The Model assumes these responsibilities:
IProxy instances IProxy instances
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
| PureMVC.Core.Model.Model | ( | ) | [protected] |
Constructs and initializes a new model.
This IModel implementation is a Singleton, so you should not call the constructor directly, but instead call the static Singleton Factory method Model.getInstance()
| virtual bool PureMVC.Core.Model.HasProxy | ( | string | proxyName | ) | [virtual] |
Check if a Proxy is registered.
| proxyName |
proxyName.Implements PureMVC.Interfaces.IModel.
| virtual void PureMVC.Core.Model.InitializeModel | ( | ) | [protected, virtual] |
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
| virtual void PureMVC.Core.Model.RegisterProxy | ( | IProxy | proxy | ) | [virtual] |
Register an IProxy with the Model.
| proxy | An IProxy to be held by the Model |
Implements PureMVC.Interfaces.IModel.
| virtual IProxy PureMVC.Core.Model.RemoveProxy | ( | string | proxyName | ) | [virtual] |
Remove an IProxy from the Model.
| proxyName | The name of the IProxy instance to be removed |
Implements PureMVC.Interfaces.IModel.
| virtual IProxy PureMVC.Core.Model.RetrieveProxy | ( | string | proxyName | ) | [virtual] |
Retrieve an IProxy from the Model.
| proxyName | The name of the IProxy to retrieve |
IProxy instance previously registered with the given proxyNameImplements PureMVC.Interfaces.IModel.
volatile IModel PureMVC.Core.Model.m_instance [static, protected] |
Singleton instance.
IDictionary<string, IProxy> PureMVC.Core.Model.m_proxyMap [protected] |
Mapping of proxyNames to IProxy instances.
readonly object PureMVC.Core.Model.m_staticSyncRoot = new object() [static, protected] |
Used for locking the instance calls.
readonly object PureMVC.Core.Model.m_syncRoot = new object() [protected] |
Used for locking.
IModel PureMVC.Core.Model.Instance [static, get] |
Model Singleton Factory method. This method is thread safe.
1.5.8