Index: src/OFConstString.m ================================================================== --- src/OFConstString.m +++ src/OFConstString.m @@ -24,10 +24,54 @@ { objc_setFutureClass((Class)&_OFConstStringClassReference, "OFConstString"); } #endif + ++ alloc +{ + @throw [OFNotImplementedException newWithClass: self + selector: _cmd]; +} + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- initWithCString: (const char*)str +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- initWithCString: (const char*)str + length: (size_t)len +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- initWithFormat: (OFString*)fmt, ... +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- initWithFormat: (OFString*)fmt + arguments: (va_list)args +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- initWithString: (OFString*)str +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - addMemoryToPool: (void*)ptr { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; Index: src/OFDataArray.m ================================================================== --- src/OFDataArray.m +++ src/OFDataArray.m @@ -29,10 +29,16 @@ @implementation OFDataArray + dataArrayWithItemSize: (size_t)is { return [[[self alloc] initWithItemSize: is] autorelease]; } + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithItemSize: (size_t)is { Class c; Index: src/OFExceptions.m ================================================================== --- src/OFExceptions.m +++ src/OFExceptions.m @@ -70,10 +70,16 @@ @implementation OFException + newWithClass: (Class)class_ { return [[self alloc] initWithClass: class_]; } + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ { self = [super init]; @@ -105,10 +111,16 @@ size: (size_t)size { return [[self alloc] initWithClass: class_ size: size]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ size: (size_t)size { self = [super initWithClass: class_]; @@ -141,10 +153,16 @@ pointer: (void*)ptr { return [[self alloc] initWithClass: class_ pointer: ptr]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ pointer: (void*)ptr { self = [super initWithClass: class_]; @@ -179,10 +197,16 @@ selector: (SEL)selector_ { return [[self alloc] initWithClass: class_ selector: selector_]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ selector: (SEL)selector_ { self = [super initWithClass: class_]; @@ -223,10 +247,16 @@ selector: (SEL)selector_ { return [[self alloc] initWithClass: class_ selector: selector_]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ selector: (SEL)selector_ { self = [super initWithClass: class_]; @@ -295,10 +325,16 @@ { return [[self alloc] initWithClass: class_ path: path_ mode: mode_]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ path: (OFString*)path_ mode: (OFString*)mode_ { @@ -361,10 +397,16 @@ size: (size_t)size { return [[self alloc] initWithClass: class_ size: size]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ size: (size_t)size items: (size_t)items { @@ -505,10 +547,16 @@ { return [[self alloc] initWithClass: class_ node: node_ service: service_]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ node: (OFString*)node_ service: (OFString*)service_ { @@ -568,10 +616,16 @@ { return [[self alloc] initWithClass: class_ node: node_ service: service_]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ node: (OFString*)node_ service: (OFString*)service_ { @@ -630,10 +684,16 @@ return [[self alloc] initWithClass: class_ node: node_ service: service_ family: family_]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ node: (OFString*)node_ service: (OFString*)service_ family: (int)family_ @@ -695,10 +755,16 @@ backLog: (int)backlog_ { return [[self alloc] initWithClass: class_ backLog: backlog_]; } + +- initWithClass: (Class)class_ +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithClass: (Class)class_ backLog: (int)backlog_ { self = [super initWithClass: class_]; Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -105,10 +105,16 @@ /* FIXME: On error, throw exception */ #ifndef _WIN32 symlink([src cString], [dest cString]); #endif } + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithPath: (OFString*)path mode: (OFString*)mode { Class c; Index: src/OFIterator.m ================================================================== --- src/OFIterator.m +++ src/OFIterator.m @@ -17,10 +17,16 @@ /* Reference for static linking */ int _OFIterator_reference; @implementation OFIterator +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + - initWithData: (OFList**)data_ size: (size_t)size_ { self = [super init]; Index: src/OFNumber.m ================================================================== --- src/OFNumber.m +++ src/OFNumber.m @@ -340,10 +340,16 @@ + numberWithDouble: (double)double_ { return [[[self alloc] initWithDouble: double_] autorelease]; } + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithChar: (char)char_ { self = [super init]; Index: src/OFPlugin.m ================================================================== --- src/OFPlugin.m +++ src/OFPlugin.m @@ -52,13 +52,22 @@ } plugin->handle = handle; return [plugin autorelease]; } + +- init +{ + if (isa == [OFPlugin class]) + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; + + return [super init]; +} - (void)dealloc { dlclose(handle); [super dealloc]; } @end Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -26,10 +26,14 @@ @implementation OFStream - init { self = [super init]; + + if (isa == [OFStream class]) + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; cache = NULL; #ifndef _WIN32 if (pagesize == 0) Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -75,10 +75,16 @@ if (ret == NULL) return nil; return (id)ret; } + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithObject: (id)obj { Class c; Index: src/OFXMLElement.m ================================================================== --- src/OFXMLElement.m +++ src/OFXMLElement.m @@ -31,10 +31,16 @@ stringValue: (OFString*)stringval_ { return [[[self alloc] initWithName: name_ stringValue: stringval_] autorelease]; } + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - initWithName: (OFString*)name_ { self = [super init];