16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#import "OFString.h"
#import "OFConstCString.h"
#import "OFConstWideCString.h"
#import "OFCString.h"
#import "OFWideCString.h"
#import "OFExceptions.h"
@implementation OFString
+ newAsConstCString: (const char*)str
{
return [[OFConstCString alloc] initAsConstCString: str];
}
|
>
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#import "OFString.h"
#import "OFConstCString.h"
#import "OFConstWideCString.h"
#import "OFCString.h"
#import "OFWideCString.h"
#import "OFExceptions.h"
#import "OFMacros.h"
@implementation OFString
+ newAsConstCString: (const char*)str
{
return [[OFConstCString alloc] initAsConstCString: str];
}
|
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
+ newAsWideCString: (wchar_t*)str
{
return [[OFWideCString alloc] initAsWideCString: 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
{
[[OFNotImplementedException newWithObject: self
andSelector: @selector(length)] raise];
return 0;
}
- (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;
}
- (OFString*)appendCString: (const char*)str
{
[[OFNotImplementedException newWithObject: self
andSelector: @selector(appendCString:)]
raise];
return nil;
}
- (OFString*)appendWideCString: (const wchar_t*)str
{
[[OFNotImplementedException newWithObject: self
andSelector: @selector(
appendWideCString:)]
raise];
return nil;
}
@end
|
<
<
|
<
<
|
|
<
<
<
<
|
|
<
<
<
<
<
|
<
<
<
|
<
<
<
<
|
|
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
91
92
|
+ newAsWideCString: (wchar_t*)str
{
return [[OFWideCString alloc] initAsWideCString: str];
}
- (char*)cString
{
OF_NOT_IMPLEMENTED(NULL)
}
- (wchar_t*)wcString
{
OF_NOT_IMPLEMENTED(NULL)
}
- (size_t)length
{
OF_NOT_IMPLEMENTED(0)
}
- (OFString*)setTo: (OFString*)str
{
[self free];
self = [str clone];
return self;
}
- (OFString*)clone
{
OF_NOT_IMPLEMENTED(nil)
}
- (int)compareTo: (OFString*)str
{
OF_NOT_IMPLEMENTED(0)
}
- (OFString*)append: (OFString*)str
{
OF_NOT_IMPLEMENTED(nil)
}
- (OFString*)appendCString: (const char*)str
{
OF_NOT_IMPLEMENTED(nil)
}
- (OFString*)appendWideCString: (const wchar_t*)str
{
OF_NOT_IMPLEMENTED(nil)
}
@end
|