ObjFW  Diff

Differences From Artifact [7599c02c21]:

To Artifact [a57e73bfa3]:

  • File src/OFString.m — part of check-in [b597d49f43] at 2008-10-08 23:15:26 on branch trunk — Multiple changes, see details.

    * OFObject getMem: renamd to getMemWithSize:.
    * OFString compare: renamed to compareTo:.
    * Exceptions don't throw itself anymore.
    * Exceptions include an error string now.
    * Exceptions now got raise and string.
    * New methods for OFFile:
    * changeModeOfFile:toMode:
    * changeOwnerOfFile:toOwner:andGroup:
    * delete:
    * link:to:
    * symlink:to:
    * OFFile isEndOfFile renamd to atEndOfFile
    * OFNotImplementedExeception newWithObject:andMethod renamed to
    newWithObject:andSelector:.
    * Tests updated accordingly.
    * TODO list added. (user: js, size: 1766) [annotate] [blame] [check-ins using]


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

80
81
82
83
84
85
86
87
88
89
+ newWithWideCString: (wchar_t*)str
{
	return [[OFWideCString alloc] initWithWideCString: str];
}

- (char*)cString
{
	[OFNotImplementedException newWithObject: self
				       andMethod: "cString"];
	return NULL;
}

- (wchar_t*)wcString
{
	[OFNotImplementedException newWithObject: self
				       andMethod: "wcString"];
	return NULL;
}

- (size_t)length
{
	return length;
}

- (OFString*)setTo: (OFString*)str
{
	[self free];
	self = [str clone];
	return self;
}

- (OFString*)clone
{
	[OFNotImplementedException newWithObject: self
				       andMethod: "clone"];
	return nil;
}

- (int)compare: (OFString*)str
{
	[OFNotImplementedException newWithObject: self
				       andMethod: "compare:"];

	return 0;
}

- (OFString*)append: (OFString*)str
{
	[OFNotImplementedException newWithObject: self
				       andMethod: "append:"];
	return nil;
}
@end







|
|





|
|

















|
|



|

|
|
>





|
|



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
80
81
82
83
84
85
86
87
88
89
90
+ newWithWideCString: (wchar_t*)str
{
	return [[OFWideCString alloc] initWithWideCString: str];
}

- (char*)cString
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(cString)] raise];
	return NULL;
}

- (wchar_t*)wcString
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(wcString)] raise];
	return NULL;
}

- (size_t)length
{
	return length;
}

- (OFString*)setTo: (OFString*)str
{
	[self free];
	self = [str clone];
	return self;
}

- (OFString*)clone
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(clone)] raise];
	return nil;
}

- (int)compareTo: (OFString*)str
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(compareTo:)]
	    raise];
	return 0;
}

- (OFString*)append: (OFString*)str
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(append:)] raise];
	return nil;
}
@end