diff --git a/PureMVC_ObjectiveC.xcodeproj/project.pbxproj b/PureMVC_ObjectiveC.xcodeproj/project.pbxproj index 27b6443..a8695bd 100644 --- a/PureMVC_ObjectiveC.xcodeproj/project.pbxproj +++ b/PureMVC_ObjectiveC.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 313EA2B218A24B0D00E65B7E /* NSObject+Mediator.h in Headers */ = {isa = PBXBuildFile; fileRef = 313EA2B018A24B0D00E65B7E /* NSObject+Mediator.h */; }; + 313EA2B318A24B0D00E65B7E /* NSObject+Mediator.m in Sources */ = {isa = PBXBuildFile; fileRef = 313EA2B118A24B0D00E65B7E /* NSObject+Mediator.m */; }; 40C7CDFB12EA113E003FF22C /* Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 40C7CDD412EA113E003FF22C /* Controller.h */; settings = {ATTRIBUTES = (Public, ); }; }; 40C7CDFC12EA113E003FF22C /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 40C7CDD512EA113E003FF22C /* Controller.m */; }; 40C7CDFD12EA113E003FF22C /* Model.h in Headers */ = {isa = PBXBuildFile; fileRef = 40C7CDD612EA113E003FF22C /* Model.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -29,8 +31,6 @@ 40C7CE0E12EA113E003FF22C /* SimpleCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 40C7CDEA12EA113E003FF22C /* SimpleCommand.m */; }; 40C7CE0F12EA113E003FF22C /* Facade.h in Headers */ = {isa = PBXBuildFile; fileRef = 40C7CDEC12EA113E003FF22C /* Facade.h */; settings = {ATTRIBUTES = (Public, ); }; }; 40C7CE1012EA113E003FF22C /* Facade.m in Sources */ = {isa = PBXBuildFile; fileRef = 40C7CDED12EA113E003FF22C /* Facade.m */; }; - 40C7CE1112EA113E003FF22C /* Mediator.h in Headers */ = {isa = PBXBuildFile; fileRef = 40C7CDEF12EA113E003FF22C /* Mediator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 40C7CE1212EA113E003FF22C /* Mediator.m in Sources */ = {isa = PBXBuildFile; fileRef = 40C7CDF012EA113E003FF22C /* Mediator.m */; }; 40C7CE1312EA113E003FF22C /* Notification.h in Headers */ = {isa = PBXBuildFile; fileRef = 40C7CDF212EA113E003FF22C /* Notification.h */; settings = {ATTRIBUTES = (Public, ); }; }; 40C7CE1412EA113E003FF22C /* Notification.m in Sources */ = {isa = PBXBuildFile; fileRef = 40C7CDF312EA113E003FF22C /* Notification.m */; }; 40C7CE1512EA113E003FF22C /* Notifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 40C7CDF412EA113E003FF22C /* Notifier.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -44,6 +44,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 313EA2B018A24B0D00E65B7E /* NSObject+Mediator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+Mediator.h"; sourceTree = ""; }; + 313EA2B118A24B0D00E65B7E /* NSObject+Mediator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Mediator.m"; sourceTree = ""; }; 40C7CDD412EA113E003FF22C /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = src/org/puremvc/objectivec/core/Controller.h; sourceTree = SOURCE_ROOT; }; 40C7CDD512EA113E003FF22C /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Controller.m; path = src/org/puremvc/objectivec/core/Controller.m; sourceTree = SOURCE_ROOT; }; 40C7CDD612EA113E003FF22C /* Model.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Model.h; path = src/org/puremvc/objectivec/core/Model.h; sourceTree = SOURCE_ROOT; }; @@ -66,8 +68,6 @@ 40C7CDEA12EA113E003FF22C /* SimpleCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SimpleCommand.m; path = src/org/puremvc/objectivec/patterns/command/SimpleCommand.m; sourceTree = SOURCE_ROOT; }; 40C7CDEC12EA113E003FF22C /* Facade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Facade.h; path = src/org/puremvc/objectivec/patterns/facade/Facade.h; sourceTree = SOURCE_ROOT; }; 40C7CDED12EA113E003FF22C /* Facade.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Facade.m; path = src/org/puremvc/objectivec/patterns/facade/Facade.m; sourceTree = SOURCE_ROOT; }; - 40C7CDEF12EA113E003FF22C /* Mediator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mediator.h; path = src/org/puremvc/objectivec/patterns/mediator/Mediator.h; sourceTree = SOURCE_ROOT; }; - 40C7CDF012EA113E003FF22C /* Mediator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Mediator.m; path = src/org/puremvc/objectivec/patterns/mediator/Mediator.m; sourceTree = SOURCE_ROOT; }; 40C7CDF212EA113E003FF22C /* Notification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Notification.h; path = src/org/puremvc/objectivec/patterns/observer/Notification.h; sourceTree = SOURCE_ROOT; }; 40C7CDF312EA113E003FF22C /* Notification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Notification.m; path = src/org/puremvc/objectivec/patterns/observer/Notification.m; sourceTree = SOURCE_ROOT; }; 40C7CDF412EA113E003FF22C /* Notifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Notifier.h; path = src/org/puremvc/objectivec/patterns/observer/Notifier.h; sourceTree = SOURCE_ROOT; }; @@ -235,8 +235,8 @@ 40C7CDEE12EA113E003FF22C /* mediator */ = { isa = PBXGroup; children = ( - 40C7CDEF12EA113E003FF22C /* Mediator.h */, - 40C7CDF012EA113E003FF22C /* Mediator.m */, + 313EA2B018A24B0D00E65B7E /* NSObject+Mediator.h */, + 313EA2B118A24B0D00E65B7E /* NSObject+Mediator.m */, ); name = mediator; path = src/org/puremvc/objectivec/patterns/mediator; @@ -286,11 +286,11 @@ 40C7CE0712EA113E003FF22C /* INotifier.h in Headers */, 40C7CE0812EA113E003FF22C /* IObserver.h in Headers */, 40C7CE0912EA113E003FF22C /* IProxy.h in Headers */, + 313EA2B218A24B0D00E65B7E /* NSObject+Mediator.h in Headers */, 40C7CE0A12EA113E003FF22C /* IView.h in Headers */, 40C7CE0B12EA113E003FF22C /* MacroCommand.h in Headers */, 40C7CE0D12EA113E003FF22C /* SimpleCommand.h in Headers */, 40C7CE0F12EA113E003FF22C /* Facade.h in Headers */, - 40C7CE1112EA113E003FF22C /* Mediator.h in Headers */, 40C7CE1312EA113E003FF22C /* Notification.h in Headers */, 40C7CE1512EA113E003FF22C /* Notifier.h in Headers */, 40C7CE1712EA113E003FF22C /* Observer.h in Headers */, @@ -323,6 +323,8 @@ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + }; buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "PureMVC_ObjectiveC" */; compatibilityVersion = "Xcode 3.1"; developmentRegion = English; @@ -354,7 +356,7 @@ 40C7CE0C12EA113E003FF22C /* MacroCommand.m in Sources */, 40C7CE0E12EA113E003FF22C /* SimpleCommand.m in Sources */, 40C7CE1012EA113E003FF22C /* Facade.m in Sources */, - 40C7CE1212EA113E003FF22C /* Mediator.m in Sources */, + 313EA2B318A24B0D00E65B7E /* NSObject+Mediator.m in Sources */, 40C7CE1412EA113E003FF22C /* Notification.m in Sources */, 40C7CE1612EA113E003FF22C /* Notifier.m in Sources */, 40C7CE1812EA113E003FF22C /* Observer.m in Sources */, @@ -370,6 +372,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = NO; DSTROOT = /tmp/PureMVC_ObjectiveC.dst; GCC_DYNAMIC_NO_PIC = NO; @@ -390,6 +393,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; DSTROOT = /tmp/PureMVC_ObjectiveC.dst; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/doc/html/_controller_8h.html b/doc/html/_controller_8h.html new file mode 100644 index 0000000..4aa104a --- /dev/null +++ b/doc/html/_controller_8h.html @@ -0,0 +1,73 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/Controller.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
Controller.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "IController.h"
+#import "IView.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  Controller
 
+
+ + + + diff --git a/doc/html/_controller_8h_source.html b/doc/html/_controller_8h_source.html new file mode 100644 index 0000000..6438782 --- /dev/null +++ b/doc/html/_controller_8h_source.html @@ -0,0 +1,90 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/Controller.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Controller.h
+
+
+Go to the documentation of this file.
1 //
+
2 // Controller.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "IController.h"
+
11 #import "IView.h"
+
12 
+
42 @interface Controller : NSObject <IController> {
+
43  NSMutableDictionary *commandMap;
+
44  id<IView> view;
+
45 }
+
46 
+
47 @property(nonatomic, strong) NSMutableDictionary *commandMap;
+
48 @property(nonatomic, strong) id<IView> view;
+
49 
+
50 -(id)init;
+
51 -(void)initializeController;
+
52 +(id<IController>)getInstance;
+
53 
+
54 @end
+
NSMutableDictionary * commandMap
Definition: Controller.h:43
+ +
id< IView > view
Definition: Controller.h:44
+ +
Definition: Controller.h:42
+
+ + + + diff --git a/doc/html/_controller_8m.html b/doc/html/_controller_8m.html new file mode 100644 index 0000000..8f7e0a1 --- /dev/null +++ b/doc/html/_controller_8m.html @@ -0,0 +1,65 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/Controller.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Controller.m File Reference
+
+
+
#import "Controller.h"
+#import "View.h"
+#import "IObserver.h"
+#import "Observer.h"
+#import "ICommand.h"
+
+ + + + diff --git a/doc/html/_facade_8h.html b/doc/html/_facade_8h.html new file mode 100644 index 0000000..cb7369f --- /dev/null +++ b/doc/html/_facade_8h.html @@ -0,0 +1,75 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/facade/Facade.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
Facade.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "IFacade.h"
+#import "IController.h"
+#import "IModel.h"
+#import "IView.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  Facade
 
+
+ + + + diff --git a/doc/html/_facade_8h_source.html b/doc/html/_facade_8h_source.html new file mode 100644 index 0000000..deb012f --- /dev/null +++ b/doc/html/_facade_8h_source.html @@ -0,0 +1,101 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/facade/Facade.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Facade.h
+
+
+Go to the documentation of this file.
1 //
+
2 // Facade.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "IFacade.h"
+
11 #import "IController.h"
+
12 #import "IModel.h"
+
13 #import "IView.h"
+
14 
+
35 @interface Facade : NSObject <IFacade> {
+
36  id<IController> controller;
+
37  id<IModel> model;
+
38  id<IView> view;
+
39 }
+
40 
+
41 @property(nonatomic, strong) id<IController> controller;
+
42 @property(nonatomic, strong) id<IModel> model;
+
43 @property(nonatomic, strong) id<IView> view;
+
44 
+
45 -(id)init;
+
46 -(void)initializeFacade;
+
47 +(id<IFacade>)getInstance;
+
48 -(void)initializeController;
+
49 -(void)initializeView;
+
50 -(void)initializeModel;
+
51 
+
52 @end
+
Definition: Facade.h:35
+ +
id< IController > controller
Definition: Facade.h:36
+ + + +
id< IModel > model
Definition: Facade.h:37
+
Definition: IFacade.h:19
+
id< IView > view
Definition: Facade.h:38
+
+ + + + diff --git a/doc/html/_facade_8m.html b/doc/html/_facade_8m.html new file mode 100644 index 0000000..9d0bd0e --- /dev/null +++ b/doc/html/_facade_8m.html @@ -0,0 +1,65 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/facade/Facade.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Facade.m File Reference
+
+
+
#import "Facade.h"
+#import "Model.h"
+#import "View.h"
+#import "Controller.h"
+#import "Notification.h"
+
+ + + + diff --git a/doc/html/_i_command_8h.html b/doc/html/_i_command_8h.html new file mode 100644 index 0000000..fa7b011 --- /dev/null +++ b/doc/html/_i_command_8h.html @@ -0,0 +1,63 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/ICommand.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
ICommand.h File Reference
+
+ + + + + diff --git a/doc/html/_i_command_8h_source.html b/doc/html/_i_command_8h_source.html new file mode 100644 index 0000000..fe68102 --- /dev/null +++ b/doc/html/_i_command_8h_source.html @@ -0,0 +1,68 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/ICommand.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
ICommand.h
+
+
+Go to the documentation of this file.
1 #import "INotification.h"
+
7 @protocol ICommand
+
8 
+
14 -(void)execute:(id<INotification>)notification;
+
15 
+
16 @end
+ +
Definition: INotification.h:24
+
+ + + + diff --git a/doc/html/_i_controller_8h.html b/doc/html/_i_controller_8h.html new file mode 100644 index 0000000..b2fecf4 --- /dev/null +++ b/doc/html/_i_controller_8h.html @@ -0,0 +1,63 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IController.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IController.h File Reference
+
+ + + + + diff --git a/doc/html/_i_controller_8h_source.html b/doc/html/_i_controller_8h_source.html new file mode 100644 index 0000000..895a6b7 --- /dev/null +++ b/doc/html/_i_controller_8h_source.html @@ -0,0 +1,74 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IController.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IController.h
+
+
+Go to the documentation of this file.
1 #import "INotification.h"
+
23 @protocol IController
+
24 
+
31 -(void)executeCommand:(id<INotification>)notification;
+
32 
+
39 -(BOOL)hasCommand:(NSString *)notificationName;
+
40 
+
48 -(void)registerCommand:(NSString *)notificationName commandClassRef:(Class)commandClassRef;
+
49 
+
55 -(void)removeCommand:(NSString *)notificationName;
+
56 
+
57 @end
+ +
Definition: INotification.h:24
+
+ + + + diff --git a/doc/html/_i_facade_8h.html b/doc/html/_i_facade_8h.html new file mode 100644 index 0000000..e11e88b --- /dev/null +++ b/doc/html/_i_facade_8h.html @@ -0,0 +1,73 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IFacade.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
IFacade.h File Reference
+
+
+
#import "INotification.h"
+#import "IMediator.h"
+#import "IProxy.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

protocol  <IFacade>
 
+
+ + + + diff --git a/doc/html/_i_facade_8h_source.html b/doc/html/_i_facade_8h_source.html new file mode 100644 index 0000000..e92f1d8 --- /dev/null +++ b/doc/html/_i_facade_8h_source.html @@ -0,0 +1,103 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IFacade.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IFacade.h
+
+
+Go to the documentation of this file.
1 #import "INotification.h"
+
2 #import "IMediator.h"
+
3 #import "IProxy.h"
+
19 @protocol IFacade
+
20 
+
27 -(BOOL)hasCommand:(NSString *)notificationName;
+
28 
+
35 -(BOOL)hasMediator:(NSString *)mediatorName;
+
36 
+
43 -(BOOL)hasProxy:(NSString *)proxyName;
+
44 
+
59 -(void)notifyObservers:(id<INotification>)notification;
+
60 
+
67 -(void)registerCommand:(NSString *)notificationName commandClassRef:(Class)commandClassRef;
+
68 
+
74 -(void)registerMediator:(id<IMediator>)mediator;
+
75 
+
81 -(void)registerProxy:(id<IProxy>)proxy;
+
82 
+
88 -(void)removeCommand:(NSString *)notificationName;
+
89 
+
96 -(id<IMediator>)removeMediator:(NSString *)mediatorName;
+
97 
+
104 -(id<IProxy>)removeProxy:(NSString *)proxyName;
+
105 
+
112 -(id<IMediator>)retrieveMediator:(NSString *)mediatorName;
+
113 
+
120 -(id<IProxy>)retrieveProxy:(NSString *)proxyName;
+
121 
+
129 -(void)sendNotification:(NSString *)notificationName body:(id)body type:(NSString *)type;
+
130 -(void)sendNotification:(NSString *)notificationName;
+
131 -(void)sendNotification:(NSString *)notificationName body:(id)body;
+
132 -(void)sendNotification:(NSString *)notificationName type:(NSString *)type;
+
133 
+
134 @end
+
135 
+ + +
Definition: INotification.h:24
+
Definition: IFacade.h:19
+ +
Definition: IProxy.h:20
+
Definition: IMediator.h:36
+
+ + + + diff --git a/doc/html/_i_mediator_8h.html b/doc/html/_i_mediator_8h.html new file mode 100644 index 0000000..bf95f19 --- /dev/null +++ b/doc/html/_i_mediator_8h.html @@ -0,0 +1,71 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IMediator.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
IMediator.h File Reference
+
+
+
#import "INotification.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

protocol  <IMediator>
 
+
+ + + + diff --git a/doc/html/_i_mediator_8h_source.html b/doc/html/_i_mediator_8h_source.html new file mode 100644 index 0000000..f279648 --- /dev/null +++ b/doc/html/_i_mediator_8h_source.html @@ -0,0 +1,83 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IMediator.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IMediator.h
+
+
+Go to the documentation of this file.
1 #import "INotification.h"
+
36 @protocol IMediator
+
37 
+
43 -(NSString *)mediatorName;
+
44 
+
50 -(void)handleNotification:(id<INotification>)notification;
+
51 
+
57 -(NSArray *)listNotificationInterests;
+
58 
+
62 -(void)onRegister;
+
63 
+
67 -(void)onRemove;
+
68 
+
69 
+
70 @end
+
71 
+ + +
void onRegister()
+
Definition: INotification.h:24
+
NSString * mediatorName()
+
NSArray * listNotificationInterests()
+
Definition: IMediator.h:36
+
+ + + + diff --git a/doc/html/_i_model_8h.html b/doc/html/_i_model_8h.html new file mode 100644 index 0000000..d9416b0 --- /dev/null +++ b/doc/html/_i_model_8h.html @@ -0,0 +1,71 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IModel.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
IModel.h File Reference
+
+
+
#import "IProxy.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

protocol  <IModel>
 
+
+ + + + diff --git a/doc/html/_i_model_8h_source.html b/doc/html/_i_model_8h_source.html new file mode 100644 index 0000000..aeae426 --- /dev/null +++ b/doc/html/_i_model_8h_source.html @@ -0,0 +1,75 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IModel.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IModel.h
+
+
+Go to the documentation of this file.
1 #import "IProxy.h"
+
17 @protocol IModel
+
18 
+
25 -(BOOL)hasProxy:(NSString *)proxyName;
+
26 
+
32 -(void)registerProxy:(id<IProxy>)proxy;
+
33 
+
40 -(id<IProxy>)removeProxy:(NSString *)proxyName;
+
41 
+
48 -(id<IProxy>)retrieveProxy:(NSString *)proxyName;
+
49 
+
50 @end
+
Definition: IModel.h:17
+ +
Definition: IProxy.h:20
+
+ + + + diff --git a/doc/html/_i_notification_8h.html b/doc/html/_i_notification_8h.html new file mode 100644 index 0000000..fc38acd --- /dev/null +++ b/doc/html/_i_notification_8h.html @@ -0,0 +1,70 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/INotification.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
INotification.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

protocol  <INotification>
 
+
+ + + + diff --git a/doc/html/_i_notification_8h_source.html b/doc/html/_i_notification_8h_source.html new file mode 100644 index 0000000..f394d84 --- /dev/null +++ b/doc/html/_i_notification_8h_source.html @@ -0,0 +1,81 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/INotification.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
INotification.h
+
+
+Go to the documentation of this file.
1 
+
24 @protocol INotification
+
25 
+
29 -(id)body;
+
30 
+
35 -(NSString *)name;
+
36 
+
40 -(NSString *)type;
+
41 
+
45 -(void)setBody:(id)body;
+
46 
+
50 -(void)setType:(NSString *)type;
+
51 
+
55 -(NSString *)description;
+
56 
+
57 @end
+
NSString * name()
+
NSString * type()
+
Definition: INotification.h:24
+ +
NSString * description()
+
+ + + + diff --git a/doc/html/_i_notifier_8h.html b/doc/html/_i_notifier_8h.html new file mode 100644 index 0000000..d9015e2 --- /dev/null +++ b/doc/html/_i_notifier_8h.html @@ -0,0 +1,70 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/INotifier.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
INotifier.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

protocol  <INotifier>
 
+
+ + + + diff --git a/doc/html/_i_notifier_8h_source.html b/doc/html/_i_notifier_8h_source.html new file mode 100644 index 0000000..ac7d076 --- /dev/null +++ b/doc/html/_i_notifier_8h_source.html @@ -0,0 +1,70 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/INotifier.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
INotifier.h
+
+
+Go to the documentation of this file.
1 
+
23 @protocol INotifier
+
24 
+
36 -(void)sendNotification:(NSString *)notificationName body:(id)body type:(NSString *)type;
+
37 -(void)sendNotification:(NSString *)notificationName;
+
38 -(void)sendNotification:(NSString *)notificationName body:(id)body;
+
39 -(void)sendNotification:(NSString *)notificationName type:(NSString *)type;
+
40 
+
41 @end
+
Definition: INotifier.h:23
+
+ + + + diff --git a/doc/html/_i_observer_8h.html b/doc/html/_i_observer_8h.html new file mode 100644 index 0000000..2650286 --- /dev/null +++ b/doc/html/_i_observer_8h.html @@ -0,0 +1,71 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IObserver.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
IObserver.h File Reference
+
+
+
#import "INotification.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

protocol  <IObserver>
 
+
+ + + + diff --git a/doc/html/_i_observer_8h_source.html b/doc/html/_i_observer_8h_source.html new file mode 100644 index 0000000..acd6561 --- /dev/null +++ b/doc/html/_i_observer_8h_source.html @@ -0,0 +1,74 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IObserver.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IObserver.h
+
+
+Go to the documentation of this file.
1 #import "INotification.h"
+
34 @protocol IObserver
+
35 
+
42 -(BOOL)compareNotifyContext:(id)object;
+
43 
+
49 -(void)notifyObserver:(id<INotification>)notification;
+
50 
+
56 -(void)setNotifyContext:(id)notifyContext;
+
57 
+
66 -(void)setNotifyMethod:(SEL)notifyMethod;
+
67 @end
+ +
Definition: IObserver.h:34
+
Definition: INotification.h:24
+
+ + + + diff --git a/doc/html/_i_proxy_8h.html b/doc/html/_i_proxy_8h.html new file mode 100644 index 0000000..f491317 --- /dev/null +++ b/doc/html/_i_proxy_8h.html @@ -0,0 +1,70 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IProxy.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
IProxy.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

protocol  <IProxy>
 
+
+ + + + diff --git a/doc/html/_i_proxy_8h_source.html b/doc/html/_i_proxy_8h_source.html new file mode 100644 index 0000000..7aa2231 --- /dev/null +++ b/doc/html/_i_proxy_8h_source.html @@ -0,0 +1,79 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IProxy.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IProxy.h
+
+
+Go to the documentation of this file.
1 
+
20 @protocol IProxy
+
21 
+
27 -(id)data;
+
28 
+
34 -(NSString *)proxyName;
+
35 
+
39 -(void)onRegister;
+
40 
+
44 -(void)onRemove;
+
45 
+
51 -(void)setData:(id)data;
+
52 
+
53 @end
+
NSString * proxyName()
+
void onRemove()
+
void onRegister()
+ +
Definition: IProxy.h:20
+
+ + + + diff --git a/doc/html/_i_view_8h.html b/doc/html/_i_view_8h.html new file mode 100644 index 0000000..1e327db --- /dev/null +++ b/doc/html/_i_view_8h.html @@ -0,0 +1,73 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IView.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
IView.h File Reference
+
+
+
#import "INotification.h"
+#import "IMediator.h"
+#import "IObserver.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

protocol  <IView>
 
+
+ + + + diff --git a/doc/html/_i_view_8h_source.html b/doc/html/_i_view_8h_source.html new file mode 100644 index 0000000..9d9db6b --- /dev/null +++ b/doc/html/_i_view_8h_source.html @@ -0,0 +1,87 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/interfaces/IView.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
IView.h
+
+
+Go to the documentation of this file.
1 #import "INotification.h"
+
2 #import "IMediator.h"
+
3 #import "IObserver.h"
+
23 @protocol IView
+
24 
+
31 -(BOOL)hasMediator:(NSString *)mediatorName;
+
32 
+
43 -(void)notifyObservers:(id<INotification>)notification;
+
44 
+
61 -(void)registerMediator:(id<IMediator>)mediator;
+
62 
+
70 -(void)registerObserver:(NSString *)notificationName observer:(id<IObserver>)observer;
+
71 
+
78 -(id<IMediator>)removeMediator:(NSString *)mediatorName;
+
79 
+
86 -(void)removeObserver:(NSString *)notificationName notifyContext:(id)notifyContext;
+
87 
+
94 -(id<IMediator>)retrieveMediator:(NSString *)mediatorName;
+
95 
+
96 @end
+ + +
Definition: IObserver.h:34
+ +
Definition: IView.h:23
+
Definition: INotification.h:24
+
Definition: IMediator.h:36
+
+ + + + diff --git a/doc/html/_macro_command_8h.html b/doc/html/_macro_command_8h.html new file mode 100644 index 0000000..4529da1 --- /dev/null +++ b/doc/html/_macro_command_8h.html @@ -0,0 +1,74 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/command/MacroCommand.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
MacroCommand.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "INotification.h"
+#import "Notifier.h"
+#import "ICommand.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  MacroCommand
 
+
+ + + + diff --git a/doc/html/_macro_command_8h_source.html b/doc/html/_macro_command_8h_source.html new file mode 100644 index 0000000..865c8d8 --- /dev/null +++ b/doc/html/_macro_command_8h_source.html @@ -0,0 +1,91 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/command/MacroCommand.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
MacroCommand.h
+
+
+Go to the documentation of this file.
1 //
+
2 // MacroCommand.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "INotification.h"
+
11 #import "Notifier.h"
+
12 #import "ICommand.h"
+
13 
+
39 @interface MacroCommand : Notifier <ICommand> {
+
40  NSMutableArray *subCommands;
+
41 }
+
42 
+
43 @property(nonatomic, strong) NSMutableArray *subCommands;
+
44 
+
45 -(id)init;
+
46 -(void)initializeMacroCommand;
+
47 -(void)addSubCommand:(Class)commandClassRef;
+
48 +(id)command;
+
49 
+
50 @end
+
NSMutableArray * subCommands
Definition: MacroCommand.h:40
+ +
Definition: MacroCommand.h:39
+ + +
Definition: Notifier.h:34
+
+ + + + diff --git a/doc/html/_macro_command_8m.html b/doc/html/_macro_command_8m.html new file mode 100644 index 0000000..f180793 --- /dev/null +++ b/doc/html/_macro_command_8m.html @@ -0,0 +1,61 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/command/MacroCommand.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
MacroCommand.m File Reference
+
+
+
#import "MacroCommand.h"
+
+ + + + diff --git a/doc/html/_model_8h.html b/doc/html/_model_8h.html new file mode 100644 index 0000000..db10ede --- /dev/null +++ b/doc/html/_model_8h.html @@ -0,0 +1,72 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/Model.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
Model.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "IModel.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  Model
 
+
+ + + + diff --git a/doc/html/_model_8h_source.html b/doc/html/_model_8h_source.html new file mode 100644 index 0000000..b594350 --- /dev/null +++ b/doc/html/_model_8h_source.html @@ -0,0 +1,86 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/Model.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Model.h
+
+
+Go to the documentation of this file.
1 //
+
2 // Model.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "IModel.h"
+
11 
+
37 @interface Model : NSObject <IModel> {
+
38  NSMutableDictionary *proxyMap;
+
39 }
+
40 
+
41 @property(nonatomic, strong) NSMutableDictionary *proxyMap;
+
42 
+
43 -(id)init;
+
44 -(void)initializeModel;
+
45 +(id<IModel>)getInstance;
+
46 
+
47 @end
+
Definition: IModel.h:17
+ +
Definition: Model.h:37
+
NSMutableDictionary * proxyMap
Definition: Model.h:38
+
+ + + + diff --git a/doc/html/_model_8m.html b/doc/html/_model_8m.html new file mode 100644 index 0000000..c884085 --- /dev/null +++ b/doc/html/_model_8m.html @@ -0,0 +1,61 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/Model.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Model.m File Reference
+
+
+
#import "Model.h"
+
+ + + + diff --git a/doc/html/_n_s_object_09_mediator_8h.html b/doc/html/_n_s_object_09_mediator_8h.html new file mode 100644 index 0000000..508ea7f --- /dev/null +++ b/doc/html/_n_s_object_09_mediator_8h.html @@ -0,0 +1,72 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
NSObject+Mediator.h File Reference
+
+
+
#import "IMediator.h"
+#import "INotifier.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

category  NSObject(Mediator)
 
+
+ + + + diff --git a/doc/html/_n_s_object_09_mediator_8h_source.html b/doc/html/_n_s_object_09_mediator_8h_source.html new file mode 100644 index 0000000..44b0310 --- /dev/null +++ b/doc/html/_n_s_object_09_mediator_8h_source.html @@ -0,0 +1,87 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
NSObject+Mediator.h
+
+
+Go to the documentation of this file.
1 //
+
2 // NSObject+Mediator.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import "IMediator.h"
+
10 #import "INotifier.h"
+
11 
+
12 
+
13 @class Facade;
+
14 @protocol IFacade;
+ +
37 
+
38 -(void)register;
+
39 -(void)unregister;
+
40 -(id<IFacade>)facade;
+
41 @end
+
Definition: Facade.h:35
+ +
Definition: NSObject+Mediator.h:36
+ +
Definition: INotifier.h:23
+
Definition: IFacade.h:19
+
Definition: IMediator.h:36
+
+ + + + diff --git a/doc/html/_n_s_object_09_mediator_8m.html b/doc/html/_n_s_object_09_mediator_8m.html new file mode 100644 index 0000000..1ab49e9 --- /dev/null +++ b/doc/html/_n_s_object_09_mediator_8m.html @@ -0,0 +1,63 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
NSObject+Mediator.m File Reference
+
+
+
#import "NSObject+Mediator.h"
+#import "Facade.h"
+#import "IFacade.h"
+
+ + + + diff --git a/doc/html/_notification_8h.html b/doc/html/_notification_8h.html new file mode 100644 index 0000000..e4c1fd5 --- /dev/null +++ b/doc/html/_notification_8h.html @@ -0,0 +1,72 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Notification.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
Notification.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "INotification.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  Notification
 
+
+ + + + diff --git a/doc/html/_notification_8h_source.html b/doc/html/_notification_8h_source.html new file mode 100644 index 0000000..b36a26c --- /dev/null +++ b/doc/html/_notification_8h_source.html @@ -0,0 +1,94 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Notification.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Notification.h
+
+
+Go to the documentation of this file.
1 //
+
2 // Notification.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "INotification.h"
+
11 
+
36 @interface Notification : NSObject <INotification> {
+
37  NSString *name, *type;
+
38  id body;
+
39 }
+
40 
+
41 @property(nonatomic, strong) NSString *name;
+
42 @property(nonatomic, strong) NSString *type;
+
43 @property(nonatomic, strong) id body;
+
44 
+
45 +(id)withName:(NSString *)name body:(id)body type:(NSString *)type;
+
46 +(id)withName:(NSString *)nam;
+
47 +(id)withName:(NSString *)name body:(id)body;
+
48 +(id)withName:(NSString *)name type:(NSString *)type;
+
49 -(id)initWithName:(NSString *)name body:(id)body type:(NSString *)type;
+
50 -(NSString *)description;
+
51 
+
52 @end
+ +
NSString * name()
+
Definition: Notification.h:36
+
NSString * type
Definition: Notification.h:37
+
Definition: INotification.h:24
+
id body
Definition: Notification.h:38
+
+ + + + diff --git a/doc/html/_notification_8m.html b/doc/html/_notification_8m.html new file mode 100644 index 0000000..cfee80c --- /dev/null +++ b/doc/html/_notification_8m.html @@ -0,0 +1,61 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Notification.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Notification.m File Reference
+
+
+
#import "Notification.h"
+
+ + + + diff --git a/doc/html/_notifier_8h.html b/doc/html/_notifier_8h.html new file mode 100644 index 0000000..68d5c07 --- /dev/null +++ b/doc/html/_notifier_8h.html @@ -0,0 +1,73 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Notifier.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
Notifier.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "INotifier.h"
+#import "IFacade.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  Notifier
 
+
+ + + + diff --git a/doc/html/_notifier_8h_source.html b/doc/html/_notifier_8h_source.html new file mode 100644 index 0000000..7decc84 --- /dev/null +++ b/doc/html/_notifier_8h_source.html @@ -0,0 +1,84 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Notifier.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Notifier.h
+
+
+Go to the documentation of this file.
1 //
+
2 // Notifier.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "INotifier.h"
+
11 #import "IFacade.h"
+
12 
+
34 @interface Notifier : NSObject <INotifier> {
+
35  id<IFacade> facade;
+
36 }
+
37 
+
38 @property(nonatomic, strong) id<IFacade> facade;
+
39 
+
40 @end
+ + +
Definition: INotifier.h:23
+
Definition: Notifier.h:34
+
id< IFacade > facade
Definition: Notifier.h:35
+
+ + + + diff --git a/doc/html/_notifier_8m.html b/doc/html/_notifier_8m.html new file mode 100644 index 0000000..679ba1a --- /dev/null +++ b/doc/html/_notifier_8m.html @@ -0,0 +1,62 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Notifier.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Notifier.m File Reference
+
+
+
#import "Notifier.h"
+#import "Facade.h"
+
+ + + + diff --git a/doc/html/_observer_8h.html b/doc/html/_observer_8h.html new file mode 100644 index 0000000..615de0e --- /dev/null +++ b/doc/html/_observer_8h.html @@ -0,0 +1,72 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Observer.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
Observer.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "IObserver.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  Observer
 
+
+ + + + diff --git a/doc/html/_observer_8h_source.html b/doc/html/_observer_8h_source.html new file mode 100644 index 0000000..7398997 --- /dev/null +++ b/doc/html/_observer_8h_source.html @@ -0,0 +1,88 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Observer.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Observer.h
+
+
+Go to the documentation of this file.
1 //
+
2 // Observer.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "IObserver.h"
+
11 
+
31 @interface Observer : NSObject <IObserver> {
+ + +
34 }
+
35 
+
36 @property SEL notifyMethod;
+
37 @property(nonatomic, strong) id notifyContext;
+
38 
+
39 +(id)withNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext;
+
40 -(id)initWithNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext;
+
41 
+
42 @end
+ +
SEL notifyMethod
Definition: Observer.h:32
+
Definition: IObserver.h:34
+
Definition: Observer.h:31
+
id notifyContext
Definition: Observer.h:33
+
+ + + + diff --git a/doc/html/_observer_8m.html b/doc/html/_observer_8m.html new file mode 100644 index 0000000..c6ded82 --- /dev/null +++ b/doc/html/_observer_8m.html @@ -0,0 +1,61 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/observer/Observer.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Observer.m File Reference
+
+
+
#import "Observer.h"
+
+ + + + diff --git a/doc/html/_proxy_8h.html b/doc/html/_proxy_8h.html new file mode 100644 index 0000000..1a74574 --- /dev/null +++ b/doc/html/_proxy_8h.html @@ -0,0 +1,73 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/proxy/Proxy.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
Proxy.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "IProxy.h"
+#import "Notifier.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  Proxy
 
+
+ + + + diff --git a/doc/html/_proxy_8h_source.html b/doc/html/_proxy_8h_source.html new file mode 100644 index 0000000..8e8c94e --- /dev/null +++ b/doc/html/_proxy_8h_source.html @@ -0,0 +1,97 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/proxy/Proxy.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Proxy.h
+
+
+Go to the documentation of this file.
1 //
+
2 // Proxy.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "IProxy.h"
+
11 #import "Notifier.h"
+
12 
+
34 @interface Proxy : Notifier <IProxy> {
+
35  id data;
+
36  NSString *proxyName;
+
37 }
+
38 
+
39 @property(nonatomic, strong) id data;
+
40 @property(nonatomic, strong) NSString *proxyName;
+
41 
+
42 +(id)proxy;
+
43 +(id)withProxyName:(NSString *)proxyName;
+
44 +(id)withProxyName:(NSString *)proxyName data:(id)data;
+
45 +(id)withData:(id)data;
+
46 -(id)initWithProxyName:(NSString *)proxyName data:(id)data;
+
47 -(void)initializeProxy;
+
48 
+
49 +(NSString *)NAME;
+
50 
+
51 @end
+ +
id data
Definition: Proxy.h:35
+
NSString * proxyName
Definition: Proxy.h:36
+
Definition: Notifier.h:34
+
Definition: Proxy.h:34
+ +
Definition: IProxy.h:20
+
+ + + + diff --git a/doc/html/_proxy_8m.html b/doc/html/_proxy_8m.html new file mode 100644 index 0000000..bfb2ba7 --- /dev/null +++ b/doc/html/_proxy_8m.html @@ -0,0 +1,61 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/proxy/Proxy.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
Proxy.m File Reference
+
+
+
#import "Proxy.h"
+
+ + + + diff --git a/doc/html/_simple_command_8h.html b/doc/html/_simple_command_8h.html new file mode 100644 index 0000000..53e99ab --- /dev/null +++ b/doc/html/_simple_command_8h.html @@ -0,0 +1,74 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/command/SimpleCommand.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
SimpleCommand.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "INotification.h"
+#import "Notifier.h"
+#import "ICommand.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  SimpleCommand
 
+
+ + + + diff --git a/doc/html/_simple_command_8h_source.html b/doc/html/_simple_command_8h_source.html new file mode 100644 index 0000000..d1dd2f8 --- /dev/null +++ b/doc/html/_simple_command_8h_source.html @@ -0,0 +1,84 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/command/SimpleCommand.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
SimpleCommand.h
+
+
+Go to the documentation of this file.
1 //
+
2 // SimpleCommand.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "INotification.h"
+
11 #import "Notifier.h"
+
12 #import "ICommand.h"
+
13 
+
23 @interface SimpleCommand : Notifier <ICommand> {
+
24 }
+
25 
+
26 +(id)command;
+
27 
+
28 @end
+ + + +
Definition: Notifier.h:34
+
Definition: SimpleCommand.h:23
+
+ + + + diff --git a/doc/html/_simple_command_8m.html b/doc/html/_simple_command_8m.html new file mode 100644 index 0000000..0bf34f4 --- /dev/null +++ b/doc/html/_simple_command_8m.html @@ -0,0 +1,61 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/patterns/command/SimpleCommand.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
SimpleCommand.m File Reference
+
+
+
#import "SimpleCommand.h"
+
+ + + + diff --git a/doc/html/_view_8h.html b/doc/html/_view_8h.html new file mode 100644 index 0000000..592348a --- /dev/null +++ b/doc/html/_view_8h.html @@ -0,0 +1,72 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/View.h File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+ +
+
View.h File Reference
+
+
+
#import <Foundation/Foundation.h>
+#import "IView.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  View
 
+
+ + + + diff --git a/doc/html/_view_8h_source.html b/doc/html/_view_8h_source.html new file mode 100644 index 0000000..14803af --- /dev/null +++ b/doc/html/_view_8h_source.html @@ -0,0 +1,87 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/View.h Source File + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
View.h
+
+
+Go to the documentation of this file.
1 //
+
2 // View.h
+
3 // PureMVC_ObjectiveC
+
4 //
+
5 // PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
+
6 // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
+
7 //
+
8 
+
9 #import <Foundation/Foundation.h>
+
10 #import "IView.h"
+
11 
+
29 @interface View : NSObject <IView> {
+
30  NSMutableDictionary *mediatorMap, *observerMap;
+
31 }
+
32 
+
33 @property(nonatomic, strong) NSMutableDictionary *mediatorMap, *observerMap;
+
34 
+
35 -(id)init;
+
36 -(void)initializeView;
+
37 +(id<IView>)getInstance;
+
38 
+
39 @end
+
NSMutableDictionary * observerMap
Definition: View.h:30
+
Definition: View.h:29
+
NSMutableDictionary * mediatorMap
Definition: View.h:30
+
Definition: IView.h:23
+ +
+ + + + diff --git a/doc/html/_view_8m.html b/doc/html/_view_8m.html new file mode 100644 index 0000000..c2bde41 --- /dev/null +++ b/doc/html/_view_8m.html @@ -0,0 +1,63 @@ + + + + + + +pureMVC: src/org/puremvc/objectivec/core/View.m File Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + + +
+
+
+
View.m File Reference
+
+
+
#import "View.h"
+#import "Observer.h"
+#import "IObserver.h"
+
+ + + + diff --git a/doc/html/annotated.html b/doc/html/annotated.html index f236509..06d579f 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -1,52 +1,82 @@ - - -PureMVC Objective-C: Class List - - - - - + + diff --git a/doc/html/bc_s.png b/doc/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/doc/html/bc_s.png differ diff --git a/doc/html/bdwn.png b/doc/html/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/doc/html/bdwn.png differ diff --git a/doc/html/category_n_s_object_07_mediator_08-members.html b/doc/html/category_n_s_object_07_mediator_08-members.html new file mode 100644 index 0000000..dc66410 --- /dev/null +++ b/doc/html/category_n_s_object_07_mediator_08-members.html @@ -0,0 +1,74 @@ + + + + + + +pureMVC: Member List + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + +
+
+
+
NSObject(Mediator) Member List
+
+ + + + + diff --git a/doc/html/category_n_s_object_07_mediator_08.html b/doc/html/category_n_s_object_07_mediator_08.html new file mode 100644 index 0000000..a395cd2 --- /dev/null +++ b/doc/html/category_n_s_object_07_mediator_08.html @@ -0,0 +1,168 @@ + + + + + + +pureMVC: NSObject(Mediator) Category Reference + + + + + + +
+
+ + + + + + +
+
pureMVC +  1.3 +
+
+
+ + + + +
+
+ +
+
NSObject(Mediator) Category Reference
+
+
+ +

#import <NSObject+Mediator.h>

+ +

Inherits <IMediator>, and <INotifier>.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Instance Methods

(void) - register
 
(void) - unregister
 
(id< IFacade >) - facade
 
- Instance Methods inherited from <IMediator>
(NSString *) - mediatorName
 
(void) - handleNotification:
 
(NSArray *) - listNotificationInterests
 
(void) - onRegister
 
(void) - onRemove
 
- Instance Methods inherited from <INotifier>
(void) - sendNotification:body:type:
 
(void) - sendNotification:
 
(void) - sendNotification:body:
 
(void) - sendNotification:type:
 
+

Detailed Description

+

A base IMediator implementation.

+

This category replaces the former Mediator class and extends ViewControllers with the following methods from the IMediator protocol:

+
    +
  • +listNotificationInterests to register a ViewController for Notification events
  • +
  • +handleNotification handle a Notification event, a ViewController has been registered for
  • +
  • +register register a ViewController with the View in order to receive Notification events
  • +
  • +unregister unregister a ViewController from the View
  • +
  • +facade retrieve a reference to the Facade singleton instance
  • +
+

You usually implement this category in any ViewController or AppDelegate that must communicate with the pureMVC framework.

+
See Also
View
+

Method Documentation

+ +
+
+ + + + + + + +
- (id< IFacade >) facade
+
+

retrieve the Facade instance from within your UIViewController or NSViewController subclass

+ +
+
+ +
+
+ + + + + + + +
- (void) register
+
+

register the NSObject+Mediator with the facade

+

Typically, register your UIViewController or NSViewController subclass within the viewDidLoad method

+ +
+
+ +
+
+ + + + + + + +
- (void) unregister
+
+

unregister the NSObject+Mediator with the facade

+

Typically, register your UIViewController or NSViewController subclass within the didReceiveMemoryWarning method

+ +
+
+
The documentation for this category was generated from the following files: +
+ + + + diff --git a/doc/html/class_controller-members.html b/doc/html/class_controller-members.html index 72550ad..e0d4f3b 100644 --- a/doc/html/class_controller-members.html +++ b/doc/html/class_controller-members.html @@ -1,37 +1,69 @@ - - -PureMVC Objective-C: Member List - - - - - +
- + - - - + +
- (id<IMediator>) removeMediator: - (id<IMediator>) removeMediator: (NSString *)  mediatorName  (NSString *) mediatorName
-
-
- -

-Remove a IMediator instance from the View.

-

Parameters:
- - +
+

Remove a IMediator instance from the View.

+
Parameters
+
mediatorName name of the IMediator instance to be removed.
+
mediatorNamename of the IMediator instance to be removed.
+
-
Returns:
the IMediator instance previously registered with the given mediatorName.
- -

Reimplemented in Facade.

+
Returns
the IMediator instance previously registered with the given mediatorName.
-

- + +

- + - - - + +
- (id<IProxy>) removeProxy: - (id<IProxy>) removeProxy: (NSString *)  proxyName  (NSString *) proxyName
-
-
- -

-Remove an IProxy instance from the Model by name.

-

Parameters:
- - +
+

Remove an IProxy instance from the Model by name.

+
Parameters
+
proxyName the IProxy to remove from the Model.
+
proxyNamethe IProxy to remove from the Model.
+
-
Returns:
the IProxy that was removed from the Model
- -

Reimplemented in Facade.

+
Returns
the IProxy that was removed from the Model
-

- + +

- + - - - + +
- (id<IMediator>) retrieveMediator: - (id<IMediator>) retrieveMediator: (NSString *)  mediatorName  (NSString *) mediatorName
-
-
- -

-Retrieve an IMediator instance from the View.

-

Parameters:
- - +
+

Retrieve an IMediator instance from the View.

+
Parameters
+
mediatorName the name of the IMediator instance to retrievve
+
mediatorNamethe name of the IMediator instance to retrievve
+
-
Returns:
the IMediator previously registered with the given mediatorName.
- -

Reimplemented in Facade.

+
Returns
the IMediator previously registered with the given mediatorName.
-

- + +

- + - - - + +
- (id<IProxy>) retrieveProxy: - (id<IProxy>) retrieveProxy: (NSString *)  proxyName  (NSString *) proxyName
-
-
- -

-Retrieve a IProxy from the Model by name.

-

Parameters:
- - +
+

Retrieve a IProxy from the Model by name.

+
Parameters
+
proxyName the name of the IProxy instance to be retrieved.
+
proxyNamethe name of the IProxy instance to be retrieved.
+
-
Returns:
the IProxy previously regisetered by proxyName with the Model.
+
Returns
the IProxy previously regisetered by proxyName with the Model.
-

Reimplemented in Facade.

+
+
+ +
+
+ + + + + + + + +
- (void) sendNotification: (NSString *) notificationName
+
-

- + +

- + - - + + - - + + + + + + + + +
- (void) sendNotification: - (void) sendNotification: (NSString *)  notificationName(NSString *) notificationName
body: (id)  body(id) body 
+
+ +
+
+ +
+
+ + + + + + + + + + + + - - + + - +
- (void) sendNotification: (NSString *) notificationName
body:(id) body
type: (NSString *)  type (NSString *) type 
-
-
- -

-Create and send an INotification.

-

Parameters:
- - - - +
+

Create and send an INotification.

+
Parameters
+
notificationName the name of the notiification to send
body the body of the notification
type the type of the notification
+ + +
notificationNamethe name of the notiification to send
bodythe body of the notification
typethe type of the notification
+
-

Reimplemented in Facade.

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
- (void) sendNotification: (NSString *) notificationName
type:(NSString *) type 
+
-

-


Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  - -doxygen 1.5.7.1
+
The documentation for this protocol was generated from the following file: + + + diff --git a/doc/html/protocol_i_mediator-p-members.html b/doc/html/protocol_i_mediator-p-members.html index 9e7fc10..efee989 100644 --- a/doc/html/protocol_i_mediator-p-members.html +++ b/doc/html/protocol_i_mediator-p-members.html @@ -1,37 +1,67 @@ - - -PureMVC Objective-C: Member List - - - - - + + diff --git a/doc/html/protocol_i_model-p-members.html b/doc/html/protocol_i_model-p-members.html index cda88e6..068c033 100644 --- a/doc/html/protocol_i_model-p-members.html +++ b/doc/html/protocol_i_model-p-members.html @@ -1,34 +1,66 @@ - - -PureMVC Objective-C: Member List - - - - - -
Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  - -doxygen 1.5.7.1
+
The documentation for this protocol was generated from the following file: + + + diff --git a/doc/html/protocol_i_notification-p-members.html b/doc/html/protocol_i_notification-p-members.html index a6ef510..cbcb263 100644 --- a/doc/html/protocol_i_notification-p-members.html +++ b/doc/html/protocol_i_notification-p-members.html @@ -1,36 +1,68 @@ - - -PureMVC Objective-C: Member List - - - - - +
- + - - - + +
- (void) setType: - (void) setType: (NSString *)  type  (NSString *) type
-
-
+
+

Set the type of the INotification instance

-

-Set the type of the INotification instance

-

- + +

- + - - +
- (NSString *) type - (NSString *) type  
-
-
+
+

Get the type of the INotification instance

-

-Get the type of the INotification instance

-

-


Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  - -doxygen 1.5.7.1
+
The documentation for this protocol was generated from the following file: + + + diff --git a/doc/html/protocol_i_notifier-p-members.html b/doc/html/protocol_i_notifier-p-members.html index 2593e38..bd630c5 100644 --- a/doc/html/protocol_i_notifier-p-members.html +++ b/doc/html/protocol_i_notifier-p-members.html @@ -1,31 +1,66 @@ - - -PureMVC Objective-C: Member List - - - - - -
Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  - -doxygen 1.5.7.1
+
The documentation for this protocol was generated from the following file: + + + diff --git a/doc/html/protocol_i_view-p-members.html b/doc/html/protocol_i_view-p-members.html index 305e339..8923de2 100644 --- a/doc/html/protocol_i_view-p-members.html +++ b/doc/html/protocol_i_view-p-members.html @@ -1,37 +1,69 @@ - - -PureMVC Objective-C: Member List - - - - - +
- + - - - + +
- (id<IMediator>) removeMediator: - (id<IMediator>) removeMediator: (NSString *)  mediatorName  (NSString *) mediatorName
-
-
- -

-Remove an IMediator from the View.

-

Parameters:
- - +
+

Remove an IMediator from the View.

+
Parameters
+
mediatorName name of the IMediator instance to be removed.
+
mediatorNamename of the IMediator instance to be removed.
+
-
Returns:
the IMediator that was removed from the View
- -

Reimplemented in View.

+
Returns
the IMediator that was removed from the View
-

- + +

- + - - + + - - + + - +
- (void) removeObserver: - (void) removeObserver: (NSString *)  notificationName(NSString *) notificationName
notifyContext: (id)  notifyContext (id) notifyContext 
-
-
- -

-Remove a group of observers from the observer list for a given Notification name.

-

Parameters:
- - - +
+

Remove a group of observers from the observer list for a given Notification name.

+
Parameters
+
notificationName which observer list to remove from
notifyContext removed the observers with this object as their notifyContext
+ +
notificationNamewhich observer list to remove from
notifyContextremoved the observers with this object as their notifyContext
+
-

Reimplemented in View.

-
-

- + +

- + - - - + +
- (id<IMediator>) retrieveMediator: - (id<IMediator>) retrieveMediator: (NSString *)  mediatorName  (NSString *) mediatorName
-
-
- -

-Retrieve an IMediator from the View.

-

Parameters:
- - +
+

Retrieve an IMediator from the View.

+
Parameters
+
mediatorName the name of the IMediator instance to retrieve.
+
mediatorNamethe name of the IMediator instance to retrieve.
+
-
Returns:
the IMediator instance previously registered with the given mediatorName.
- -

Reimplemented in View.

+
Returns
the IMediator instance previously registered with the given mediatorName.
-

-


Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  - -doxygen 1.5.7.1
+
The documentation for this protocol was generated from the following file: + + + diff --git a/doc/html/sync_off.png b/doc/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/doc/html/sync_off.png differ diff --git a/doc/html/sync_on.png b/doc/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/doc/html/sync_on.png differ diff --git a/doc/html/tab_a.png b/doc/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/doc/html/tab_a.png differ diff --git a/doc/html/tab_b.gif b/doc/html/tab_b.gif deleted file mode 100644 index 0d62348..0000000 Binary files a/doc/html/tab_b.gif and /dev/null differ diff --git a/doc/html/tab_b.png b/doc/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/doc/html/tab_b.png differ diff --git a/doc/html/tab_h.png b/doc/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/doc/html/tab_h.png differ diff --git a/doc/html/tab_l.gif b/doc/html/tab_l.gif deleted file mode 100644 index 9b1e633..0000000 Binary files a/doc/html/tab_l.gif and /dev/null differ diff --git a/doc/html/tab_r.gif b/doc/html/tab_r.gif deleted file mode 100644 index ce9dd9f..0000000 Binary files a/doc/html/tab_r.gif and /dev/null differ diff --git a/doc/html/tab_s.png b/doc/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/doc/html/tab_s.png differ diff --git a/doc/html/tabs.css b/doc/html/tabs.css index 16b1be0..9cf578f 100644 --- a/doc/html/tabs.css +++ b/doc/html/tabs.css @@ -1,102 +1,60 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : 8px; - font-weight : bold; - text-decoration : none; +.tabs2 { + font-size: 10px; } - -DIV.tabs A:hover -{ - background-position: 100% -150px; +.tabs3 { + font-size: 9px; } -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; +.tablist { + margin: 0; + padding: 0; + display: table; } -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; } -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : 8px; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; } -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; +.tabs3 .tablist a { + padding: 0 10px; } -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; } -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } diff --git a/headers/Controller.h b/headers/Controller.h index d938cbb..b806ab1 100644 --- a/headers/Controller.h +++ b/headers/Controller.h @@ -44,8 +44,8 @@ id view; } -@property(nonatomic, retain) NSMutableDictionary *commandMap; -@property(nonatomic, retain) id view; +@property(nonatomic, strong) NSMutableDictionary *commandMap; +@property(nonatomic, strong) id view; -(id)init; -(void)initializeController; diff --git a/headers/Facade.h b/headers/Facade.h index 97beb34..f8c6434 100644 --- a/headers/Facade.h +++ b/headers/Facade.h @@ -30,7 +30,7 @@ * *

* - * @see Model, View, Controller, Notification, Mediator, Proxy, SimpleCommand, MacroCommand + * @see Model, View, Controller, Notification, NSObject+Mediator, Proxy, SimpleCommand, MacroCommand */ @interface Facade : NSObject { id controller; @@ -38,9 +38,9 @@ id view; } -@property(nonatomic, retain) id controller; -@property(nonatomic, retain) id model; -@property(nonatomic, retain) id view; +@property(nonatomic, strong) id controller; +@property(nonatomic, strong) id model; +@property(nonatomic, strong) id view; -(id)init; -(void)initializeFacade; diff --git a/headers/IMediator.h b/headers/IMediator.h index 0518f80..2bac02d 100644 --- a/headers/IMediator.h +++ b/headers/IMediator.h @@ -42,13 +42,6 @@ */ -(NSString *)mediatorName; -/** - * Get the IMediator's view component. - * - * @return id the view component - */ --(id)viewComponent; - /** * Handle an INotification. * @@ -73,12 +66,6 @@ */ -(void)onRemove; -/** - * Set the IMediator's view component. - * - * @param viewComponent the view component - */ --(void)setViewComponent:(id)viewComponent; @end diff --git a/headers/MacroCommand.h b/headers/MacroCommand.h index 1c5935f..5156f98 100644 --- a/headers/MacroCommand.h +++ b/headers/MacroCommand.h @@ -40,7 +40,7 @@ NSMutableArray *subCommands; } -@property(nonatomic, retain) NSMutableArray *subCommands; +@property(nonatomic, strong) NSMutableArray *subCommands; -(id)init; -(void)initializeMacroCommand; diff --git a/headers/Mediator.h b/headers/Mediator.h deleted file mode 100644 index 91a08c0..0000000 --- a/headers/Mediator.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Mediator.h -// PureMVC_ObjectiveC -// -// PureMVC Port to ObjectiveC by Brian Knorr -// PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. -// - -#import -#import "IMediator.h" -#import "Notifier.h" - -/** - * A base IMediator implementation. - * - * @see View - */ -@interface Mediator : Notifier { - NSString *mediatorName; - id viewComponent; -} - -@property(nonatomic, retain) id viewComponent; -@property(nonatomic, retain) NSString *mediatorName; - -+(id)mediator; -+(id)withMediatorName:(NSString *)mediatorName; -+(id)withMediatorName:(NSString *)mediatorName viewComponent:(id)viewComponent; -+(id)withViewComponent:(id)viewComponent; --(id)initWithMediatorName:(NSString *)mediatorName viewComponent:(id)viewComponent; --(void)initializeMediator; - -+(NSString *)NAME; - -@end diff --git a/headers/Model.h b/headers/Model.h index b2dc37a..602724b 100644 --- a/headers/Model.h +++ b/headers/Model.h @@ -38,7 +38,7 @@ NSMutableDictionary *proxyMap; } -@property(nonatomic, retain) NSMutableDictionary *proxyMap; +@property(nonatomic, strong) NSMutableDictionary *proxyMap; -(id)init; -(void)initializeModel; diff --git a/headers/NSObject+Mediator.h b/headers/NSObject+Mediator.h new file mode 100644 index 0000000..0dc983e --- /dev/null +++ b/headers/NSObject+Mediator.h @@ -0,0 +1,44 @@ +// +// NSObject+Mediator.m +// PureMVC_ObjectiveC +// +// PureMVC Port to ObjectiveC by Brian Knorr +// PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. +// + +#import "IMediator.h" +#import "INotifier.h" + +/** + * A base IMediator implementation. + * + *

+ * This category replaces the former Mediator class + * and extends ViewControllers with the following methods from the + * IMediator protocol: + *

    + *
  • listNotificationInterests to register a ViewController for Notification events
  • + *
  • handleNotification handle a Notification event, a ViewController has been registered for
  • + *
  • register register a ViewController with the View in order to receive Notification events
  • + *
  • unregister unregister a ViewController from the View
  • + *
  • facade retrieve a reference to the Facade singleton instance
  • + *

+ * + *

+ * You usually implement this category in any ViewController or AppDelegate + * that must communicate with the pureMVC framework.

+ * + * @see View + */ + + + +@class Facade; +@protocol IFacade; + +@interface NSObject (Mediator) + +-(void)register; +-(void)unregister; +-(id)facade; +@end diff --git a/headers/Notification.h b/headers/Notification.h index b948e41..23c2447 100644 --- a/headers/Notification.h +++ b/headers/Notification.h @@ -38,9 +38,9 @@ id body; } -@property(nonatomic, retain) NSString *name; -@property(nonatomic, retain) NSString *type; -@property(nonatomic, retain) id body; +@property(nonatomic, strong) NSString *name; +@property(nonatomic, strong) NSString *type; +@property(nonatomic, strong) id body; +(id)withName:(NSString *)name body:(id)body type:(NSString *)type; +(id)withName:(NSString *)nam; diff --git a/headers/Notifier.h b/headers/Notifier.h index 1daaebe..267ed6a 100644 --- a/headers/Notifier.h +++ b/headers/Notifier.h @@ -29,12 +29,12 @@ * classes have frequent Facade interactions and usually require * access to the facade anyway.

* - * @see Facade, Mediator, Proxy, SimpleCommand, MacroCommand + * @see Facade, NSObject+Mediator, Proxy, SimpleCommand, MacroCommand */ @interface Notifier : NSObject { id facade; } -@property(nonatomic, retain) id facade; +@property(nonatomic, strong) id facade; @end diff --git a/headers/Observer.h b/headers/Observer.h index 89b5209..3dee06f 100644 --- a/headers/Observer.h +++ b/headers/Observer.h @@ -34,7 +34,7 @@ } @property SEL notifyMethod; -@property(nonatomic, retain) id notifyContext; +@property(nonatomic, strong) id notifyContext; +(id)withNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext; -(id)initWithNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext; diff --git a/headers/Proxy.h b/headers/Proxy.h index 390f299..80c79fe 100644 --- a/headers/Proxy.h +++ b/headers/Proxy.h @@ -36,8 +36,8 @@ NSString *proxyName; } -@property(nonatomic, retain) id data; -@property(nonatomic, retain) NSString *proxyName; +@property(nonatomic, strong) id data; +@property(nonatomic, strong) NSString *proxyName; +(id)proxy; +(id)withProxyName:(NSString *)proxyName; diff --git a/headers/View.h b/headers/View.h index 90f21c2..6df77be 100644 --- a/headers/View.h +++ b/headers/View.h @@ -24,13 +24,13 @@ *
  • Notifying the IObservers of a given INotification when it broadcast.
  • * * - * @see Mediator, Observer, Notification + * @see NSObject+Mediator, Observer, Notification */ @interface View : NSObject { NSMutableDictionary *mediatorMap, *observerMap; } -@property(nonatomic, retain) NSMutableDictionary *mediatorMap, *observerMap; +@property(nonatomic, strong) NSMutableDictionary *mediatorMap, *observerMap; -(id)init; -(void)initializeView; diff --git a/src/org/puremvc/objectivec/core/Controller.h b/src/org/puremvc/objectivec/core/Controller.h index d938cbb..b806ab1 100644 --- a/src/org/puremvc/objectivec/core/Controller.h +++ b/src/org/puremvc/objectivec/core/Controller.h @@ -44,8 +44,8 @@ id view; } -@property(nonatomic, retain) NSMutableDictionary *commandMap; -@property(nonatomic, retain) id view; +@property(nonatomic, strong) NSMutableDictionary *commandMap; +@property(nonatomic, strong) id view; -(id)init; -(void)initializeController; diff --git a/src/org/puremvc/objectivec/core/Controller.m b/src/org/puremvc/objectivec/core/Controller.m index 0495d96..d2d94ae 100644 --- a/src/org/puremvc/objectivec/core/Controller.m +++ b/src/org/puremvc/objectivec/core/Controller.m @@ -86,7 +86,7 @@ -(void)executeCommand:(id)notification { if (commandClassRef == nil) { return; } - [(id)[[[commandClassRef alloc] init] autorelease] execute:notification]; + [(id)[[commandClassRef alloc] init] execute:notification]; } /** @@ -134,12 +134,4 @@ -(void)removeCommand:(NSString *)notificationName { } } --(void)dealloc { - self.commandMap = nil; - self.view = nil; - [(id)instance release]; - instance = nil; - [super dealloc]; -} - @end diff --git a/src/org/puremvc/objectivec/core/Model.h b/src/org/puremvc/objectivec/core/Model.h index b2dc37a..602724b 100644 --- a/src/org/puremvc/objectivec/core/Model.h +++ b/src/org/puremvc/objectivec/core/Model.h @@ -38,7 +38,7 @@ NSMutableDictionary *proxyMap; } -@property(nonatomic, retain) NSMutableDictionary *proxyMap; +@property(nonatomic, strong) NSMutableDictionary *proxyMap; -(id)init; -(void)initializeModel; diff --git a/src/org/puremvc/objectivec/core/Model.m b/src/org/puremvc/objectivec/core/Model.m index cb994e9..5949482 100644 --- a/src/org/puremvc/objectivec/core/Model.m +++ b/src/org/puremvc/objectivec/core/Model.m @@ -107,11 +107,4 @@ -(void)registerProxy:(id)proxy { return [proxyMap objectForKey:proxyName]; } --(void)dealloc { - self.proxyMap = nil; - [(id)instance release]; - instance = nil; - [super dealloc]; -} - @end diff --git a/src/org/puremvc/objectivec/core/View.h b/src/org/puremvc/objectivec/core/View.h index 90f21c2..6df77be 100644 --- a/src/org/puremvc/objectivec/core/View.h +++ b/src/org/puremvc/objectivec/core/View.h @@ -24,13 +24,13 @@ *
  • Notifying the IObservers of a given INotification when it broadcast.
  • * * - * @see Mediator, Observer, Notification + * @see NSObject+Mediator, Observer, Notification */ @interface View : NSObject { NSMutableDictionary *mediatorMap, *observerMap; } -@property(nonatomic, retain) NSMutableDictionary *mediatorMap, *observerMap; +@property(nonatomic, strong) NSMutableDictionary *mediatorMap, *observerMap; -(id)init; -(void)initializeView; diff --git a/src/org/puremvc/objectivec/core/View.m b/src/org/puremvc/objectivec/core/View.m index 5e66162..a6a0089 100644 --- a/src/org/puremvc/objectivec/core/View.m +++ b/src/org/puremvc/objectivec/core/View.m @@ -159,7 +159,6 @@ -(void)registerObserver:(NSString *)notificationName observer:(id)obs [self removeObserver:notificationName notifyContext:mediator]; } [mediator onRemove]; - [mediator setViewComponent:nil]; [mediatorMap removeObjectForKey:mediatorName]; } return mediator; @@ -196,12 +195,5 @@ -(void)removeObserver:(NSString *)notificationName notifyContext:(id)notifyConte return [mediatorMap objectForKey:mediatorName]; } --(void)dealloc { - self.mediatorMap = nil; - self.observerMap = nil; - [(id)instance release]; - instance = nil; - [super dealloc]; -} @end diff --git a/src/org/puremvc/objectivec/interfaces/IMediator.h b/src/org/puremvc/objectivec/interfaces/IMediator.h index 0518f80..2bac02d 100644 --- a/src/org/puremvc/objectivec/interfaces/IMediator.h +++ b/src/org/puremvc/objectivec/interfaces/IMediator.h @@ -42,13 +42,6 @@ */ -(NSString *)mediatorName; -/** - * Get the IMediator's view component. - * - * @return id the view component - */ --(id)viewComponent; - /** * Handle an INotification. * @@ -73,12 +66,6 @@ */ -(void)onRemove; -/** - * Set the IMediator's view component. - * - * @param viewComponent the view component - */ --(void)setViewComponent:(id)viewComponent; @end diff --git a/src/org/puremvc/objectivec/patterns/command/MacroCommand.h b/src/org/puremvc/objectivec/patterns/command/MacroCommand.h index 1c5935f..5156f98 100644 --- a/src/org/puremvc/objectivec/patterns/command/MacroCommand.h +++ b/src/org/puremvc/objectivec/patterns/command/MacroCommand.h @@ -40,7 +40,7 @@ NSMutableArray *subCommands; } -@property(nonatomic, retain) NSMutableArray *subCommands; +@property(nonatomic, strong) NSMutableArray *subCommands; -(id)init; -(void)initializeMacroCommand; diff --git a/src/org/puremvc/objectivec/patterns/command/MacroCommand.m b/src/org/puremvc/objectivec/patterns/command/MacroCommand.m index d452b79..bb176bc 100644 --- a/src/org/puremvc/objectivec/patterns/command/MacroCommand.m +++ b/src/org/puremvc/objectivec/patterns/command/MacroCommand.m @@ -17,7 +17,7 @@ @implementation MacroCommand * Static Convenience Constructor. */ +(id)command { - return [[[self alloc] init] autorelease]; + return [[self alloc] init]; } /** @@ -89,13 +89,9 @@ -(void)addSubCommand:(Class)commandClassRef { */ -(void)execute:(id)notification { for (Class commandClassRef in subCommands) { - [[[[commandClassRef alloc] init] autorelease] execute:notification]; + [[[commandClassRef alloc] init] execute:notification]; } } --(void)dealloc { - self.subCommands = nil; - [super dealloc]; -} @end diff --git a/src/org/puremvc/objectivec/patterns/command/SimpleCommand.m b/src/org/puremvc/objectivec/patterns/command/SimpleCommand.m index 4f60843..4cb99c1 100644 --- a/src/org/puremvc/objectivec/patterns/command/SimpleCommand.m +++ b/src/org/puremvc/objectivec/patterns/command/SimpleCommand.m @@ -15,7 +15,7 @@ @implementation SimpleCommand * Static Convenience Constructor. */ +(id)command { - return [[[self alloc] init] autorelease]; + return [[self alloc] init]; } /** diff --git a/src/org/puremvc/objectivec/patterns/facade/Facade.h b/src/org/puremvc/objectivec/patterns/facade/Facade.h index 97beb34..f8c6434 100644 --- a/src/org/puremvc/objectivec/patterns/facade/Facade.h +++ b/src/org/puremvc/objectivec/patterns/facade/Facade.h @@ -30,7 +30,7 @@ * *

    * - * @see Model, View, Controller, Notification, Mediator, Proxy, SimpleCommand, MacroCommand + * @see Model, View, Controller, Notification, NSObject+Mediator, Proxy, SimpleCommand, MacroCommand */ @interface Facade : NSObject { id controller; @@ -38,9 +38,9 @@ id view; } -@property(nonatomic, retain) id controller; -@property(nonatomic, retain) id model; -@property(nonatomic, retain) id view; +@property(nonatomic, strong) id controller; +@property(nonatomic, strong) id model; +@property(nonatomic, strong) id view; -(id)init; -(void)initializeFacade; diff --git a/src/org/puremvc/objectivec/patterns/facade/Facade.m b/src/org/puremvc/objectivec/patterns/facade/Facade.m index 4bf2362..b123509 100644 --- a/src/org/puremvc/objectivec/patterns/facade/Facade.m +++ b/src/org/puremvc/objectivec/patterns/facade/Facade.m @@ -293,12 +293,7 @@ -(void)removeCommand:(NSString *)notificationName { } -(void)dealloc { - self.model = nil; - self.controller = nil; - self.view = nil; - [(id)instance release]; instance = nil; - [super dealloc]; } @end diff --git a/src/org/puremvc/objectivec/patterns/mediator/Mediator.h b/src/org/puremvc/objectivec/patterns/mediator/Mediator.h deleted file mode 100644 index 91a08c0..0000000 --- a/src/org/puremvc/objectivec/patterns/mediator/Mediator.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Mediator.h -// PureMVC_ObjectiveC -// -// PureMVC Port to ObjectiveC by Brian Knorr -// PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. -// - -#import -#import "IMediator.h" -#import "Notifier.h" - -/** - * A base IMediator implementation. - * - * @see View - */ -@interface Mediator : Notifier { - NSString *mediatorName; - id viewComponent; -} - -@property(nonatomic, retain) id viewComponent; -@property(nonatomic, retain) NSString *mediatorName; - -+(id)mediator; -+(id)withMediatorName:(NSString *)mediatorName; -+(id)withMediatorName:(NSString *)mediatorName viewComponent:(id)viewComponent; -+(id)withViewComponent:(id)viewComponent; --(id)initWithMediatorName:(NSString *)mediatorName viewComponent:(id)viewComponent; --(void)initializeMediator; - -+(NSString *)NAME; - -@end diff --git a/src/org/puremvc/objectivec/patterns/mediator/Mediator.m b/src/org/puremvc/objectivec/patterns/mediator/Mediator.m deleted file mode 100644 index 42af719..0000000 --- a/src/org/puremvc/objectivec/patterns/mediator/Mediator.m +++ /dev/null @@ -1,101 +0,0 @@ -// -// Mediator.m -// PureMVC_ObjectiveC -// -// PureMVC Port to ObjectiveC by Brian Knorr -// PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. -// - -#import "Mediator.h" - -@implementation Mediator - -@synthesize mediatorName, viewComponent; - -+(id)mediator { - return [[[self alloc] initWithMediatorName:nil viewComponent:nil] autorelease]; -} - -+(id)withMediatorName:(NSString *)mediatorName { - return [[[self alloc] initWithMediatorName:mediatorName viewComponent:nil] autorelease]; -} - -+(id)withMediatorName:(NSString *)mediatorName viewComponent:(id)viewComponent { - return [[[self alloc] initWithMediatorName:mediatorName viewComponent:viewComponent] autorelease]; -} - -+(id)withViewComponent:(id)viewComponent { - return [[[self alloc] initWithMediatorName:nil viewComponent:viewComponent] autorelease]; -} - --(id)initWithMediatorName:(NSString *)_mediatorName viewComponent:(id)_viewComponent { - if (self = [super init]) { - self.mediatorName = (_mediatorName == nil) ? [[self class] NAME] : _mediatorName; - self.viewComponent = _viewComponent; - [self initializeMediator]; - } - return self; -} - -/** - * The name of the Mediator. - * - *

    - * Typically, a Mediator will be written to serve - * one specific control or group controls and so, - * will not have a need to be dynamically named.

    - */ -+(NSString *)NAME { - return @"Mediator"; -} - -/** - * Initialize the Mediator instance. - * - *

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

    - * - * @return void - */ --(void)initializeMediator {} - -/** - * Handle INotifications. - * - *

    - * Typically this will be handled in a switch statement, - * with one 'case' entry per INotification - * the Mediator is interested in. - */ --(void)handleNotification:(id)notification {} - -/** - * List the INotification names this - * Mediator is interested in being notified of. - * - * @return Array the list of INotification names - */ --(NSArray *)listNotificationInterests { - return [NSArray array]; -} - -/** - * Called by the View when the Mediator is registered - */ --(void)onRegister {} - -/** - * Called by the View when the Mediator is removed - */ --(void)onRemove {} - --(void)dealloc { - self.mediatorName = nil; - self.viewComponent = nil; - [super dealloc]; -} - -@end diff --git a/src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.h b/src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.h new file mode 100644 index 0000000..d2149a4 --- /dev/null +++ b/src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.h @@ -0,0 +1,41 @@ +// +// NSObject+Mediator.h +// PureMVC_ObjectiveC +// +// PureMVC Port to ObjectiveC by Brian Knorr +// PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. +// + +#import "IMediator.h" +#import "INotifier.h" + +@class Facade; +@protocol IFacade; + +/** + * A base IMediator implementation. + * + *

    + * This category replaces the former Mediator class + * and extends ViewControllers with the following methods from the + * IMediator protocol: + *

      + *
    • listNotificationInterests to register a ViewController for Notification events
    • + *
    • handleNotification handle a Notification event, a ViewController has been registered for
    • + *
    • register register a ViewController with the View in order to receive Notification events
    • + *
    • unregister unregister a ViewController from the View
    • + *
    • facade retrieve a reference to the Facade singleton instance
    • + *

    + * + *

    + * You usually implement this category in any ViewController or AppDelegate + * that must communicate with the pureMVC framework.

    + * + * @see View + */ +@interface NSObject (Mediator) + +-(void)register; +-(void)unregister; +-(id)facade; +@end diff --git a/src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.m b/src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.m new file mode 100644 index 0000000..c64b593 --- /dev/null +++ b/src/org/puremvc/objectivec/patterns/mediator/NSObject+Mediator.m @@ -0,0 +1,130 @@ +// +// NSObject+Mediator.m +// PureMVC_ObjectiveC +// +// PureMVC Port to ObjectiveC by Brian Knorr +// PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. +// + +#import "NSObject+Mediator.h" +#import "Facade.h" +#import "IFacade.h" + + +@implementation NSObject (Mediator) + + + +/** + * register the NSObject+Mediator with the facade + * + *

    + * Typically, register your UIViewController + * or NSViewController subclass within the + * viewDidLoad method

    + */ +-(void)register { + [[Facade getInstance] registerMediator:self]; +} + +/** + * unregister the NSObject+Mediator with the facade + * + *

    + * Typically, register your UIViewController + * or NSViewController subclass within the + * didReceiveMemoryWarning method

    + */ +-(void)unregister { + [[Facade getInstance] removeMediator:[self mediatorName]]; +} + +/** + * retrieve the Facade instance from + * within your UIViewController + * or NSViewController subclass + */ +-(id)facade { + return [Facade getInstance]; +} + +/** +* The name of the Mediator. +* +*

    +* Typically, a Mediator will be written to serve +* one specific control or group controls and so, +* will not have a need to be dynamically named.

    +*/ ++ (NSString *)NAME { + return NSStringFromClass([self class]); +} + +/** +* return the name of the mediator instance +*/ +-(NSString *)mediatorName { + return [[self class] NAME]; +} + +/** + * Handle INotifications. + * + *

    + * Typically this will be handled in a switch statement, + * with one 'case' entry per INotification + * the IMediator is interested in.

    + */ +- (void)handleNotification:(id )notification { +} + +/** + * List the INotification names this + * Mediator is interested in being notified of. + * + * @return Array the list of INotification names + */ +- (NSArray *)listNotificationInterests { + return [NSArray array]; +} + +/** + * Called by the View when the Mediator is registered + */ +- (void)onRegister { +} + +/** + * Called by the View when the Mediator is removed + */ +- (void)onRemove { +} + + +/** + * Create and send an INotification. + * + *

    + * Keeps us from having to construct new INotification + * instances in our implementation code. + * @param notificationName the name of the notification + * @param body the body of the notification + * @param type the type of the notification

    + */ +- (void)sendNotification:(NSString *)notificationName body:(id)body type:(NSString *)type { + [[Facade getInstance] sendNotification:notificationName body:body type:type]; +} + +- (void)sendNotification:(NSString *)notificationName { + [self sendNotification:notificationName body:nil type:nil]; +} + +- (void)sendNotification:(NSString *)notificationName body:(id)body { + [self sendNotification:notificationName body:body type:nil]; +} + +- (void)sendNotification:(NSString *)notificationName type:(NSString *)type { + [self sendNotification:notificationName body:nil type:type]; +} + +@end diff --git a/src/org/puremvc/objectivec/patterns/observer/Notification.h b/src/org/puremvc/objectivec/patterns/observer/Notification.h index b948e41..23c2447 100644 --- a/src/org/puremvc/objectivec/patterns/observer/Notification.h +++ b/src/org/puremvc/objectivec/patterns/observer/Notification.h @@ -38,9 +38,9 @@ id body; } -@property(nonatomic, retain) NSString *name; -@property(nonatomic, retain) NSString *type; -@property(nonatomic, retain) id body; +@property(nonatomic, strong) NSString *name; +@property(nonatomic, strong) NSString *type; +@property(nonatomic, strong) id body; +(id)withName:(NSString *)name body:(id)body type:(NSString *)type; +(id)withName:(NSString *)nam; diff --git a/src/org/puremvc/objectivec/patterns/observer/Notification.m b/src/org/puremvc/objectivec/patterns/observer/Notification.m index 03de44b..5c86418 100644 --- a/src/org/puremvc/objectivec/patterns/observer/Notification.m +++ b/src/org/puremvc/objectivec/patterns/observer/Notification.m @@ -21,19 +21,19 @@ @implementation Notification * @param type the type of the Notification */ +(id)withName:(NSString *)name body:(id)body type:(NSString *)type { - return [[[self alloc] initWithName:name body:body type:type] autorelease]; + return [[self alloc] initWithName:name body:body type:type]; } +(id)withName:(NSString *)name { - return [[[self alloc] initWithName:name body:nil type:nil] autorelease]; + return [[self alloc] initWithName:name body:nil type:nil]; } +(id)withName:(NSString *)name body:(id)body { - return [[[self alloc] initWithName:name body:body type:nil] autorelease]; + return [[self alloc] initWithName:name body:body type:nil]; } +(id)withName:(NSString *)name type:(NSString *)type { - return [[[self alloc] initWithName:name body:nil type:type] autorelease]; + return [[self alloc] initWithName:name body:nil type:type]; } /** @@ -61,11 +61,5 @@ -(NSString *)description { return [NSString stringWithFormat:@"Notification Name: %@ \nBody:%@ \nType:%@", name, body, type]; } --(void)dealloc { - self.name = nil; - self.body = nil; - self.type = nil; - [super dealloc]; -} @end diff --git a/src/org/puremvc/objectivec/patterns/observer/Notifier.h b/src/org/puremvc/objectivec/patterns/observer/Notifier.h index 1daaebe..267ed6a 100644 --- a/src/org/puremvc/objectivec/patterns/observer/Notifier.h +++ b/src/org/puremvc/objectivec/patterns/observer/Notifier.h @@ -29,12 +29,12 @@ * classes have frequent Facade interactions and usually require * access to the facade anyway.

    * - * @see Facade, Mediator, Proxy, SimpleCommand, MacroCommand + * @see Facade, NSObject+Mediator, Proxy, SimpleCommand, MacroCommand */ @interface Notifier : NSObject { id facade; } -@property(nonatomic, retain) id facade; +@property(nonatomic, strong) id facade; @end diff --git a/src/org/puremvc/objectivec/patterns/observer/Notifier.m b/src/org/puremvc/objectivec/patterns/observer/Notifier.m index 7f4fded..03a2b3e 100644 --- a/src/org/puremvc/objectivec/patterns/observer/Notifier.m +++ b/src/org/puremvc/objectivec/patterns/observer/Notifier.m @@ -46,9 +46,5 @@ -(void)sendNotification:(NSString *)notificationName type:(NSString *)type { [self sendNotification:notificationName body:nil type:type]; } --(void)dealloc { - self.facade = nil; - [super dealloc]; -} @end diff --git a/src/org/puremvc/objectivec/patterns/observer/Observer.h b/src/org/puremvc/objectivec/patterns/observer/Observer.h index 89b5209..3dee06f 100644 --- a/src/org/puremvc/objectivec/patterns/observer/Observer.h +++ b/src/org/puremvc/objectivec/patterns/observer/Observer.h @@ -34,7 +34,7 @@ } @property SEL notifyMethod; -@property(nonatomic, retain) id notifyContext; +@property(nonatomic, strong) id notifyContext; +(id)withNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext; -(id)initWithNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext; diff --git a/src/org/puremvc/objectivec/patterns/observer/Observer.m b/src/org/puremvc/objectivec/patterns/observer/Observer.m index c7b1211..81f94ad 100644 --- a/src/org/puremvc/objectivec/patterns/observer/Observer.m +++ b/src/org/puremvc/objectivec/patterns/observer/Observer.m @@ -17,7 +17,7 @@ @implementation Observer * Static Convienence Constructor. */ +(id)withNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext { - return [[[self alloc] initWithNotifyMethod:notifyMethod notifyContext:notifyContext] autorelease]; + return [[self alloc] initWithNotifyMethod:notifyMethod notifyContext:notifyContext]; } /** @@ -54,13 +54,11 @@ -(BOOL)compareNotifyContext:(id)object { * @param notification the INotification to pass to the interested object's notification method. */ -(void)notifyObserver:(id)notification { + // ignores the leak warning from xcode + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Warc-performSelector-leaks" [notifyContext performSelector:notifyMethod withObject:notification]; -} - --(void)dealloc { - self.notifyMethod = nil; - self.notifyContext = nil; - [super dealloc]; + #pragma clang diagnostic pop } diff --git a/src/org/puremvc/objectivec/patterns/proxy/Proxy.h b/src/org/puremvc/objectivec/patterns/proxy/Proxy.h index 390f299..80c79fe 100644 --- a/src/org/puremvc/objectivec/patterns/proxy/Proxy.h +++ b/src/org/puremvc/objectivec/patterns/proxy/Proxy.h @@ -36,8 +36,8 @@ NSString *proxyName; } -@property(nonatomic, retain) id data; -@property(nonatomic, retain) NSString *proxyName; +@property(nonatomic, strong) id data; +@property(nonatomic, strong) NSString *proxyName; +(id)proxy; +(id)withProxyName:(NSString *)proxyName; diff --git a/src/org/puremvc/objectivec/patterns/proxy/Proxy.m b/src/org/puremvc/objectivec/patterns/proxy/Proxy.m index 4bdaca7..457a083 100644 --- a/src/org/puremvc/objectivec/patterns/proxy/Proxy.m +++ b/src/org/puremvc/objectivec/patterns/proxy/Proxy.m @@ -13,19 +13,19 @@ @implementation Proxy @synthesize data, proxyName; +(id)proxy { - return [[[self alloc] initWithProxyName:nil data:nil] autorelease]; + return [[self alloc] initWithProxyName:nil data:nil]; } +(id)withProxyName:(NSString *)proxyName { - return [[[self alloc] initWithProxyName:proxyName data:nil] autorelease]; + return [[self alloc] initWithProxyName:proxyName data:nil]; } +(id)withProxyName:(NSString *)proxyName data:(id)data { - return [[[self alloc] initWithProxyName:proxyName data:data] autorelease]; + return [[self alloc] initWithProxyName:proxyName data:data]; } +(id)withData:(id)data { - return [[[self alloc] initWithProxyName:nil data:data] autorelease]; + return [[self alloc] initWithProxyName:nil data:data]; } -(id)initWithProxyName:(NSString *)_proxyName data:(id)_data { @@ -37,8 +37,11 @@ -(id)initWithProxyName:(NSString *)_proxyName data:(id)_data { return self; } +/** + * Retrieve the name of the proxy by its classname + */ +(NSString *)NAME { - return @"Proxy"; + return NSStringFromClass([self class]); } /** @@ -64,10 +67,5 @@ -(void)onRegister {} */ -(void)onRemove {} --(void)dealloc { - self.data = nil; - self.proxyName = nil; - [super dealloc]; -} @end