Cappuccino
1.0.0
All
Classes
Files
Functions
Variables
Typedefs
Macros
Groups
Pages
CPNotification.j
Go to the documentation of this file.
1
/*
2
* CPNotification.j
3
* Foundation
4
*
5
* Created by Francisco Tolmasky.
6
* Copyright 2008, 280 North, Inc.
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
*/
22
23
36
@implementation
CPNotification
:
CPObject
37
{
38
CPString
_name;
39
id
_object;
40
CPDictionary
_userInfo;
41
}
42
50
+ (
CPNotification
)notificationWithName:(
CPString
)aNotificationName object:(
id
)anObject userInfo:(
CPDictionary
)aUserInfo
51
{
52
return
[[
self
alloc
]
initWithName
:aNotificationName
object
:anObject
userInfo
:aUserInfo];
53
}
54
61
+ (
CPNotification
)notificationWithName:(
CPString
)aNotificationName object:(
id
)anObject
62
{
63
return
[[
self
alloc
]
initWithName
:aNotificationName
object
:anObject
userInfo
:nil];
64
}
65
69
- (id)
init
70
{
71
[
CPException
raise
:CPUnsupportedMethodException
72
reason
:"CPNotification's init method should not be used"];
73
}
74
83
- (id)initWithName:(
CPString
)aNotificationName object:(
id
)anObject userInfo:(
CPDictionary
)aUserInfo
84
{
85
self
= [
super
init
];
86
87
if
(
self
)
88
{
89
_name = aNotificationName;
90
_object = anObject;
91
_userInfo = aUserInfo;
92
}
93
94
return
self
;
95
}
96
100
- (
CPString
)
name
101
{
102
return
_name;
103
}
104
108
- (id)object
109
{
110
return
_object;
111
}
112
116
- (
CPDictionary
)userInfo
117
{
118
return
_userInfo;
119
}
120
121
@end
Foundation
CPNotification.j
Generated on Fri Sep 7 2018 11:26:15 for Cappuccino by
1.8.3