ObjFW  Check-in [507057d9a6]

Overview
Comment:Fix a name conflict in OFHashAlreadyCalculatedException.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 507057d9a6679afb070ba1abf690db42705163904d59e57ffe8a079cf0c51ebe
User & Date: js on 2011-08-04 18:37:55
Other Links: manifest | tags
Context
2011-08-07
16:57
Add -[makeImmutable] to all mutable classes and use it. check-in: 927dbf6e7d user: js tags: trunk
2011-08-04
18:37
Fix a name conflict in OFHashAlreadyCalculatedException. check-in: 507057d9a6 user: js tags: trunk
18:35
Fix a name conflict in OFHashAlreadyCalculatedException. check-in: a25f44b236 user: js tags: trunk
Changes

Modified src/exceptions/OFHashAlreadyCalculatedException.h from [a3acfaef4e] to [f1dcc4433a].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@class OFHash;

/**
 * \brief An exception indicating that the hash has already been calculated.
 */
@interface OFHashAlreadyCalculatedException: OFException
{
	OFHash *hash;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, nonatomic) OFHash *hash;
#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param hash The hash which has already been calculated
 * \return A new hash already calculated exception
 */







|



|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@class OFHash;

/**
 * \brief An exception indicating that the hash has already been calculated.
 */
@interface OFHashAlreadyCalculatedException: OFException
{
	OFHash *hashObject;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, nonatomic) OFHash *hashObject;
#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param hash The hash which has already been calculated
 * \return A new hash already calculated exception
 */

Modified src/exceptions/OFHashAlreadyCalculatedException.m from [d0daf7e25e] to [7c21aa85d9].

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
	Class c = isa;
	[self release];
	@throw [OFNotImplementedException newWithClass: c
					      selector: _cmd];
}

- initWithClass: (Class)class_
	   hash: (OFHash*)hash_
{
	self = [super initWithClass: class_];

	@try {
		hash = [hash_ retain];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)dealloc
{
	[hash release];

	[super dealloc];
}

- (OFString*)description
{
	if (description != nil)
		return description;

	description = [[OFString alloc] initWithFormat:
	    @"The hash has already been calculated in class %@ and thus no new "
	    @"data can be added", inClass];

	return description;
}

- (OFHash*)hashObject
{
	return hash;
}
@end







|




|










|


















|


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
	Class c = isa;
	[self release];
	@throw [OFNotImplementedException newWithClass: c
					      selector: _cmd];
}

- initWithClass: (Class)class_
	   hash: (OFHash*)hash
{
	self = [super initWithClass: class_];

	@try {
		hashObject = [hash retain];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)dealloc
{
	[hashObject release];

	[super dealloc];
}

- (OFString*)description
{
	if (description != nil)
		return description;

	description = [[OFString alloc] initWithFormat:
	    @"The hash has already been calculated in class %@ and thus no new "
	    @"data can be added", inClass];

	return description;
}

- (OFHash*)hashObject
{
	return hashObject;
}
@end