Index: src/OFExceptions.h ================================================================== --- src/OFExceptions.h +++ src/OFExceptions.h @@ -42,29 +42,29 @@ * * IMPORTANT: Exceptions do NOT use OFAutoreleasePools!! */ @interface OFException: OFObject { - Class class; + Class class_; OFString *string; } /** * Creates a new exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \return A new exception */ -+ newWithClass: (Class)class; ++ newWithClass: (Class)class_; /** * Initializes an already allocated OFException. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \return An initialized OFException */ -- initWithClass: (Class)class; +- initWithClass: (Class)class_; /** * \return The class of the object in which the exception happened */ - (Class)inClass; @@ -82,25 +82,25 @@ { size_t req_size; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param size The size of the memory that couldn't be allocated * \return A new no memory exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ size: (size_t)size; /** * Initializes an already allocated no memory exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param size The size of the memory that couldn't be allocated * \return An initialized no memory exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ size: (size_t)size; /** * \return The size of the memoory that couldn't be allocated */ @@ -114,25 +114,25 @@ { void *pointer; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param ptr A pointer to the memory that is not part of the object * \return A new memory not part of object exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ pointer: (void*)ptr; /** * Initializes an already allocated memory not part of object exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param ptr A pointer to the memory that is not part of the object * \return An initialized memory not part of object exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ pointer: (void*)ptr; /** * \return A pointer to the memory which is not part of the object */ @@ -146,25 +146,25 @@ { SEL selector; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param selector The selector which is not or not fully implemented * \return A new not implemented exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ selector: (SEL)selector; /** * Initializes an already allocated not implemented exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param selector The selector which is not or not fully implemented * \return An initialized not implemented exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ selector: (SEL)selector; @end /** * An OFException indicating the given value is out of range. @@ -179,25 +179,25 @@ { SEL selector; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param selector The selector which doesn't accept the argument * \return A new invalid argument exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ selector: (SEL)selector; /** * Initializes an already allocated invalid argument exception * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param selector The selector which doesn't accept the argument * \return An initialized invalid argument exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ selector: (SEL)selector; @end /** * An OFException indicating that the encoding is invalid for this object. @@ -232,28 +232,28 @@ OFString *mode; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param path A string of the path to the file tried to open * \param mode A string of the mode in which the file should have been opened * \return A new open file failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ path: (OFString*)path mode: (OFString*)mode; /** * Initializes an already allocated open file failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param path A string of the path to the file which couldn't be opened * \param mode A string of the mode in which the file should have been opened * \return An initialized open file failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ path: (OFString*)path mode: (OFString*)mode; /** * \return The errno from when the exception was created @@ -281,47 +281,47 @@ BOOL has_items; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param size The requested size of the data that couldn't be read / written * \param items The requested number of items that couldn't be read / written * \return A new open file failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ size: (size_t)size items: (size_t)items; /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param size The requested size of the data that couldn't be read / written * \return A new open file failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ size: (size_t)size; /** * Initializes an already allocated read or write failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param size The requested size of the data that couldn't be read / written * \param items The requested number of items that couldn't be read / written * \return A new open file failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ size: (size_t)size items: (size_t)items; /** * Initializes an already allocated read or write failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param size The requested size of the data that couldn't be read / written * \return A new open file failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ size: (size_t)size; /** * \return The errno from when the exception was created */ @@ -364,28 +364,28 @@ OFString *dest; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param source The source for the link * \param destination The destination for the link * \return A new link failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ source: (OFString*)src destination: (OFString*)dest; /** * Initializes an already allocated open file failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param source The source for the link * \param destination The destination for the link * \return An initialized link failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ source: (OFString*)src destination: (OFString*)dest; /** * \return The errno from when the exception was created @@ -412,28 +412,28 @@ OFString *dest; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param source The source for the symlink * \param destination The destination for the symlink * \return A new symlink failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ source: (OFString*)src destination: (OFString*)dest; /** * Initializes an already allocated open file failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param source The source for the symlink * \param destination The destination for the symlink * \return An initialized symlink failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ source: (OFString*)src destination: (OFString*)dest; /** * \return The errno from when the exception was created @@ -479,28 +479,28 @@ OFString *service; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param node The node for which translation was requested * \param service The service of the node for which translation was requested * \return A new address translation failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ node: (OFString*)node service: (OFString*)service; /** * Initializes an already allocated address translation failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param node The node for which translation was requested * \param service The service of the node for which translation was requested * \return An initialized address translation failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ node: (OFString*)node service: (OFString*)service; /** * \return The errno from when the exception was created @@ -527,28 +527,28 @@ OFString *service; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param node The node to which the connection failed * \param service The service on the node to which the connection failed * \return A new connection failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ node: (OFString*)node service: (OFString*)service; /** * Initializes an already allocated connection failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param node The node to which the connection failed * \param service The service on the node to which the connection failed * \return An initialized connection failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ node: (OFString*)node service: (OFString*)service; /** * \return The errno from when the exception was created @@ -576,31 +576,31 @@ int family; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param node The node on which binding failed * \param service The service on which binding failed * \param family The family for which binnding failed * \return A new bind failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ node: (OFString*)node service: (OFString*)service family: (int)family; /** * Initializes an already allocated bind failed exception. * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param node The node on which binding failed * \param service The service on which binding failed * \param family The family for which binnding failed * \return An initialized bind failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ node: (OFString*)node service: (OFString*)service family: (int)family; /** @@ -632,25 +632,25 @@ int backlog; int err; } /** - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param backlog The requested size of the back log * \return A new listen failed exception */ -+ newWithClass: (Class)class ++ newWithClass: (Class)class_ backLog: (int)backlog; /** * Initializes an already allocated listen failed exception * - * \param class The class of the object which caused the exception + * \param class_ The class of the object which caused the exception * \param backlog The requested size of the back log * \return An initialized listen failed exception */ -- initWithClass: (Class)class +- initWithClass: (Class)class_ backLog: (int)backlog; /** * \return The errno from when the exception was created */ Index: src/OFExceptions.m ================================================================== --- src/OFExceptions.m +++ src/OFExceptions.m @@ -66,26 +66,26 @@ return @"Allocating an object failed!"; } @end @implementation OFException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ { - return [[self alloc] initWithClass: class_]; + return [[self alloc] initWithClass: class__]; } - init { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { self = [super init]; - class = class_; + class_ = class__; return self; } - (void)dealloc @@ -95,37 +95,37 @@ [super dealloc]; } - (Class)inClass { - return class; + return class_; } - (OFString*)string { return string; } @end @implementation OFOutOfMemoryException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ size: (size_t)size { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ size: size]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ size: (size_t)size { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; req_size = size; return self; } @@ -135,11 +135,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Could not allocate %zu bytes in class %s!", req_size, - [class className]]; + [class_ className]]; return string; } - (size_t)requestedSize @@ -147,27 +147,27 @@ return req_size; } @end @implementation OFMemoryNotPartOfObjectException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ pointer: (void*)ptr { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ pointer: ptr]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ pointer: (void*)ptr { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; pointer = ptr; return self; } @@ -179,11 +179,11 @@ string = [[OFString alloc] initWithFormat: @"Memory at %p was not allocated as part of object of class %s, " @"thus the memory allocation was not changed! It is also possible " @"that there was an attempt to free the same memory twice.", - pointer, [class className]]; + pointer, [class_ className]]; return string; } - (void*)pointer @@ -191,27 +191,27 @@ return pointer; } @end @implementation OFNotImplementedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ selector: (SEL)selector_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ selector: selector_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ selector: (SEL)selector_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; selector = selector_; return self; } @@ -221,11 +221,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The method %s of class %s is not or not fully implemented!", - SEL_NAME(selector), [class className]]; + SEL_NAME(selector), [class_ className]]; return string; } @end @@ -234,34 +234,34 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"Value out of range in class %s!", [class className]]; + @"Value out of range in class %s!", [class_ className]]; return string; } @end @implementation OFInvalidArgumentException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ selector: (SEL)selector_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ selector: selector_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ selector: (SEL)selector_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; selector = selector_; return self; } @@ -271,11 +271,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The argument for method %s of class %s is invalid!", - SEL_NAME(selector), [class className]]; + SEL_NAME(selector), [class_ className]]; return string; } @end @@ -284,11 +284,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"The encoding is invalid for class %s!", [class className]]; + @"The encoding is invalid for class %s!", [class_ className]]; return string; } @end @@ -297,11 +297,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"The format is invalid for class %s!", [class className]]; + @"The format is invalid for class %s!", [class_ className]]; return string; } @end @@ -311,11 +311,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The parser in class %s encountered malformed or invalid XML!", - [class className]]; + [class_ className]]; return string; } @end @@ -324,37 +324,37 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"Initialization failed for class %s!", [class className]]; + @"Initialization failed for class %s!", [class_ className]]; return string; } @end @implementation OFOpenFileFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ path: (OFString*)path_ mode: (OFString*)mode_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ path: path_ mode: mode_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ path: (OFString*)path_ mode: (OFString*)mode_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; path = [path_ copy]; mode = [mode_ copy]; err = GET_ERR; @@ -374,11 +374,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to open file %s with mode %s in class %s! " ERRFMT, - [path cString], [mode cString], [self className], ERRPARAM]; + [path cString], [mode cString], [class_ className], ERRPARAM]; return string; } - (int)errNo @@ -396,60 +396,60 @@ return mode; } @end @implementation OFReadOrWriteFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ size: (size_t)size items: (size_t)items { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ size: size items: items]; } -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ size: (size_t)size { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ size: size]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ size: (size_t)size items: (size_t)items { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; req_size = size; req_items = items; has_items = YES; - if (class_ == [OFTCPSocket class]) + if (class__ == [OFTCPSocket class]) err = GET_SOCK_ERR; else err = GET_ERR; return self; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ size: (size_t)size { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; req_size = size; req_items = 0; has_items = NO; - if (class_ == [OFTCPSocket class]) + if (class__ == [OFTCPSocket class]) err = GET_SOCK_ERR; else err = GET_ERR; return self; @@ -483,15 +483,15 @@ return string;; if (has_items) string = [[OFString alloc] initWithFormat: @"Failed to read %zu items of size %zu in class %s! " - ERRFMT, req_items, req_size, [class className], ERRPARAM]; + ERRFMT, req_items, req_size, [class_ className], ERRPARAM]; else string = [[OFString alloc] initWithFormat: @"Failed to read %zu bytes in class %s! " ERRFMT, req_size, - [class className], ERRPARAM]; + [class_ className], ERRPARAM]; return string; } @end @@ -502,41 +502,41 @@ return string; if (has_items) string = [[OFString alloc] initWithFormat: @"Failed to write %zu items of size %zu in class %s! " - ERRFMT, req_items, req_size, [class className], ERRPARAM]; + ERRFMT, req_items, req_size, [class_ className], ERRPARAM]; else string = [[OFString alloc] initWithFormat: @"Failed to write %zu bytes in class %s! " ERRFMT, req_size, - [class className], ERRPARAM]; + [class_ className], ERRPARAM]; return string; } @end @implementation OFLinkFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ source: (OFString*)src_ destination: (OFString*)dest_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ source: src_ destination: dest_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ source: (OFString*)src_ destination: (OFString*)dest_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; src = [src_ copy]; dest = [dest_ copy]; err = GET_ERR; @@ -556,11 +556,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to link file %s to %s in class %s! " ERRFMT, - [src cString], [dest cString], [self className], ERRPARAM]; + [src cString], [dest cString], [class_ className], ERRPARAM]; return string; } - (int)errNo @@ -578,30 +578,30 @@ return dest; } @end @implementation OFSymlinkFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ source: (OFString*)src_ destination: (OFString*)dest_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ source: src_ destination: dest_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ source: (OFString*)src_ destination: (OFString*)dest_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; src = [src_ copy]; dest = [dest_ copy]; err = GET_ERR; @@ -621,11 +621,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to symlink file %s to %s in class %s! " ERRFMT, - [src cString], [dest cString], [self className], ERRPARAM]; + [src cString], [dest cString], [class_ className], ERRPARAM]; return string; } - (int)errNo @@ -649,11 +649,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"Setting an option in class %s failed!", [class className]]; + @"Setting an option in class %s failed!", [class_ className]]; return string; } @end @@ -663,11 +663,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The socket of type %s is not connected or bound!", - [class className]]; + [class_ className]]; return string; } @end @@ -677,37 +677,37 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The socket of type %s is already connected or bound and thus " - @"can't be connected or bound again!", [class className]]; + @"can't be connected or bound again!", [class_ className]]; return string; } @end @implementation OFAddressTranslationFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ node: (OFString*)node_ service: (OFString*)service_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ node: node_ service: service_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ node: (OFString*)node_ service: (OFString*)service_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; node = [node_ copy]; service = [service_ copy]; err = GET_AT_ERR; @@ -731,11 +731,11 @@ @"The service %s on %s could not be translated to an address in " @"class %s. This means that either the node was not found, there " @"is no such service on the node, there was a problem with the " @"name server, there was a problem with your network connection " @"or you specified an invalid node or service. " ERRFMT, - [service cString], [node cString], [class className], AT_ERRPARAM]; + [service cString], [node cString], [class_ className], AT_ERRPARAM]; return string; } - (int)errNo @@ -753,30 +753,30 @@ return service; } @end @implementation OFConnectionFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ node: (OFString*)node_ service: (OFString*)service_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ node: node_ service: service_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ node: (OFString*)node_ service: (OFString*)service_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; node = [node_ copy]; service = [service_ copy]; err = GET_SOCK_ERR; @@ -797,11 +797,11 @@ return string; string = [[OFString alloc] initWithFormat: @"A connection to service %s on node %s could not be established " @"in class %s! " ERRFMT, [node cString], [service cString], - [class className], ERRPARAM]; + [class_ className], ERRPARAM]; return string; } - (int)errNo @@ -819,33 +819,33 @@ return service; } @end @implementation OFBindFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ node: (OFString*)node_ service: (OFString*)service_ family: (int)family_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ node: node_ service: service_ family: family_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ node: (OFString*)node_ service: (OFString*)service_ family: (int)family_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; node = [node_ copy]; service = [service_ copy]; family = family_; err = GET_SOCK_ERR; @@ -867,11 +867,11 @@ return string; string = [[OFString alloc] initWithFormat: @"Binding service %s on node %s using family %d failed in class " @"%s! " ERRFMT, [service cString], [node cString], family, - [class className], ERRPARAM]; + [class_ className], ERRPARAM]; return string; } - (int)errNo @@ -894,27 +894,27 @@ return family; } @end @implementation OFListenFailedException -+ newWithClass: (Class)class_ ++ newWithClass: (Class)class__ backLog: (int)backlog_ { - return [[self alloc] initWithClass: class_ + return [[self alloc] initWithClass: class__ backLog: backlog_]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ backLog: (int)backlog_ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; backlog = backlog_; err = GET_SOCK_ERR; return self; @@ -925,11 +925,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to listen in socket of type %s with a back log of %d! " - ERRFMT, [class className], backlog, ERRPARAM]; + ERRFMT, [class_ className], backlog, ERRPARAM]; return string; } - (int)errNo @@ -942,13 +942,13 @@ return backlog; } @end @implementation OFAcceptFailedException -- initWithClass: (Class)class_ +- initWithClass: (Class)class__ { - self = [super initWithClass: class_]; + self = [super initWithClass: class__]; err = GET_SOCK_ERR; return self; } @@ -958,11 +958,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to accept connection in socket of type %s! " ERRFMT, - [class className], ERRPARAM]; + [class_ className], ERRPARAM]; return string; } - (int)errNo @@ -977,11 +977,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Joining a thread of class %s failed! Most likely, another thread " - @"already waits for the thread to join.", [class className]]; + @"already waits for the thread to join.", [class_ className]]; return string; } @end @@ -992,10 +992,10 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The requested action cannot be performed because the thread of " - @"class %s was canceled!", [class className]]; + @"class %s was canceled!", [class_ className]]; return string; } @end Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -97,15 +97,15 @@ /** * Replaces a method with a method from another class. * * \param selector The selector of the method to replace - * \param class The class from which the new method should be taken + * \param class_ The class from which the new method should be taken * \return The old implementation */ + (IMP)replaceMethod: (SEL)selector - withMethodFromClass: (Class)class; + withMethodFromClass: (Class)class_; /** * Initializes an already allocated object. * * Derived classes may override this, but need to do self = [super init] before @@ -125,14 +125,14 @@ * \return The name of the object's class as a C string */ - (const char*)className; /** - * \param class The class whose kind is checked + * \param class_ The class whose kind is checked * \return A boolean whether the object is of the specified kind */ -- (BOOL)isKindOfClass: (Class)class; +- (BOOL)isKindOfClass: (Class)class_; /** * \param selector The selector which should be checked for respondance * \return A boolean whether the objects responds to the specified selector */