Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -82,11 +82,11 @@ /*! * @brief Creates a new OFArray with the objects from the specified C array of * the specified length. * * @param objects A C array of objects - * @param length The length of the C array + * @param count The length of the C array * @return A new autoreleased OFArray */ + (instancetype)arrayWithObjects: (id const*)objects count: (size_t)count; @@ -127,11 +127,11 @@ /*! * @brief Initializes an OFArray with the objects from the specified C array of * the specified length. * * @param objects A C array of objects - * @param length The length of the C array + * @param count The length of the C array * @return An initialized OFArray */ - initWithObjects: (id const*)objects count: (size_t)count; Index: src/OFDate.h ================================================================== --- src/OFDate.h +++ src/OFDate.h @@ -287,19 +287,19 @@ - (OFString*)localDateStringWithFormat: (OFConstantString*)format; /*! * @brief Returns the earlier of the two dates. * - * @param date Another date + * @param otherDate Another date * @return The earlier date of the two dates */ - (OFDate*)earlierDate: (OFDate*)otherDate; /*! * @brief Returns the later of the two dates. * - * @param date Another date + * @param otherDate Another date * @return The later date of the two dates */ - (OFDate*)laterDate: (OFDate*)otherDate; /*! @@ -310,11 +310,11 @@ - (double)timeIntervalSince1970; /*! * @brief Returns the seconds the receiver is after the date. * - * @param date Date date to generate the difference with receiver + * @param otherDate Date date to generate the difference with receiver * @return The seconds the receiver is after the date. */ - (double)timeIntervalSinceDate: (OFDate*)otherDate; /*! Index: src/OFDictionary.h ================================================================== --- src/OFDictionary.h +++ src/OFDictionary.h @@ -91,11 +91,11 @@ * @param count The number of objects in the arrays * @return A new autoreleased OFDictionary */ + (instancetype)dictionaryWithObjects: (id const*)objects forKeys: (id const*)keys - count: (size_t)count; + count: (size_t)count; /*! * @brief Creates a new OFDictionary with the specified keys objects. * * @param firstKey The first key Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -118,11 +118,13 @@ /*! * @brief An enum for storing endianess. */ typedef enum of_byte_order_t { + /// Most significant byte first (big endian) OF_BYTE_ORDER_BIG_ENDIAN, + /// Least significant byte first (little endian) OF_BYTE_ORDER_LITTLE_ENDIAN } of_byte_order_t; /*! * @brief A range. @@ -136,28 +138,34 @@ /*! * @brief A point. */ typedef struct of_point_t { + /// The x coordinate of the point float x; + /// The y coordinate of the point float y; } of_point_t; /*! * @brief A dimension. */ typedef struct of_dimension_t { + /// The width of the dimension float width; + /// The height of the dimension float height; } of_dimension_t; /*! * @brief A rectangle. */ typedef struct of_rectangle_t { + /// The point from where the rectangle originates of_point_t origin; + /// The size of the rectangle of_dimension_t size; } of_rectangle_t; @class OFString; @class OFThread; @@ -327,11 +335,10 @@ * @brief The root class for all other classes inside ObjFW. */ @interface OFObject { @public - /// The class of the object Class isa; } /*! * @brief A method which is called once when the class is loaded into the @@ -512,11 +519,11 @@ * done. * * The methods which will be added from the specified class are not allowed to * use super or access instance variables, instead they have to use accessors. * - * @param class The class from which the instance methods should be inherited + * @param class_ The class from which the instance methods should be inherited */ + (void)inheritMethodsFromClass: (Class)class_; /*! * @brief Try to resolve the specified class method. Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -89,11 +89,11 @@ * @param length The length of the data that should be read at most. * The buffer must be at least this big! * @return The number of bytes read */ - (size_t)readIntoBuffer: (void*)buffer - length: (size_t)size; + length: (size_t)length; /*! * @brief Reads exactly the specified length bytes from the stream into a * buffer. * @@ -280,77 +280,77 @@ * encoded in big endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nInt16s The number of uint16_ts to read * @param buffer A buffer of sufficient size to store the specified number of * uint16_ts + * @param count The number of uint16_ts to read * @return The number of bytes read */ - (size_t)readBigEndianInt16sIntoBuffer: (uint16_t*)buffer - count: (size_t)nInt16s; + count: (size_t)count; /*! * @brief Reads the specified number of uint32_ts from the stream which are * encoded in big endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nInt32s The number of uint32_ts to read * @param buffer A buffer of sufficient size to store the specified number of * uint32_ts + * @param count The number of uint32_ts to read * @return The number of bytes read */ - (size_t)readBigEndianInt32sIntoBuffer: (uint32_t*)buffer - count: (size_t)nInt32s; + count: (size_t)count; /*! * @brief Reads the specified number of uint64_ts from the stream which are * encoded in big endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nInt64s The number of uint64_ts to read * @param buffer A buffer of sufficient size to store the specified number of * uint64_ts + * @param count The number of uint64_ts to read * @return The number of bytes read */ - (size_t)readBigEndianInt64sIntoBuffer: (uint64_t*)buffer - count: (size_t)nInt64s; + count: (size_t)count; /*! * @brief Reads the specified number of floats from the stream which are encoded * in big endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nFloatss The number of floats to read * @param buffer A buffer of sufficient size to store the specified number of * floats + * @param count The number of floats to read * @return The number of bytes read */ - (size_t)readBigEndianFloatsIntoBuffer: (float*)buffer - count: (size_t)nFloats; + count: (size_t)count; /*! * @brief Reads the specified number of doubles from the stream which are * encoded in big endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nDoubles The number of doubles to read * @param buffer A buffer of sufficient size to store the specified number of * doubles + * @param count The number of doubles to read * @return The number of bytes read */ - (size_t)readBigEndianDoublesIntoBuffer: (double*)buffer - count: (size_t)nDoubles; + count: (size_t)count; /*! * @brief Reads a uint16_t from the stream which is encoded in little endian. * * @warning Only call this when you know that enough data is available! @@ -405,87 +405,87 @@ * encoded in little endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nInt16s The number of uint16_ts to read * @param buffer A buffer of sufficient size to store the specified number of * uint16_ts + * @param count The number of uint16_ts to read * @return The number of bytes read */ - (size_t)readLittleEndianInt16sIntoBuffer: (uint16_t*)buffer - count: (size_t)nInt16s; + count: (size_t)count; /*! * @brief Reads the specified number of uint32_ts from the stream which are * encoded in little endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nInt32s The number of uint32_ts to read * @param buffer A buffer of sufficient size to store the specified number of * uint32_ts + * @param count The number of uint32_ts to read * @return The number of bytes read */ - (size_t)readLittleEndianInt32sIntoBuffer: (uint32_t*)buffer - count: (size_t)nInt32s; + count: (size_t)count; /*! * @brief Reads the specified number of uint64_ts from the stream which are * encoded in little endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nInt64s The number of uint64_ts to read * @param buffer A buffer of sufficient size to store the specified number of * uint64_ts + * @param count The number of uint64_ts to read * @return The number of bytes read */ - (size_t)readLittleEndianInt64sIntoBuffer: (uint64_t*)buffer - count: (size_t)nInt64s; + count: (size_t)count; /*! * @brief Reads the specified number of floats from the stream which are * encoded in little endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nFloats The number of floats to read * @param buffer A buffer of sufficient size to store the specified number of * floats + * @param count The number of floats to read * @return The number of bytes read */ - (size_t)readLittleEndianFloatsIntoBuffer: (float*)buffer - count: (size_t)nFloats; + count: (size_t)count; /*! * @brief Reads the specified number of doubles from the stream which are * encoded in little endian. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nDoubles The number of doubles to read * @param buffer A buffer of sufficient size to store the specified number of * doubles + * @param count The number of doubles to read * @return The number of bytes read */ - (size_t)readLittleEndianDoublesIntoBuffer: (double*)buffer - count: (size_t)nDoubles; + count: (size_t)count; /*! * @brief Reads the specified number of items with an item size of 1 from the * stream and returns them in an OFDataArray. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * @param nItems The number of items to read - * @return An OFDataArray with at nItems items. + * @param size The number of items to read + * @return An OFDataArray with count items. */ - (OFDataArray*)readDataArrayWithSize: (size_t)size; /*! * @brief Reads the specified number of items with the specified item size from @@ -493,15 +493,15 @@ * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * * @param itemSize The size of each item - * @param nItems The number of items to read - * @return An OFDataArray with at nItems items. + * @param count The number of items to read + * @return An OFDataArray with count items. */ - (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize - count: (size_t)nItems; + count: (size_t)count; /*! * @brief Returns an OFDataArray with all the remaining data of the stream. * * @return An OFDataArray with an item size of 1 with all the data of the @@ -759,65 +759,65 @@ /*! * @brief Writes the specified number of uint16_ts into the stream, encoded in * big endian. * - * @param nInt16 The number of uint16_ts to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of uint16_ts to write * @return The number of bytes written to the stream */ - (size_t)writeBigEndianInt16s: (const uint16_t*)buffer - count: (size_t)nInt16s; + count: (size_t)count; /*! * @brief Writes the specified number of uint32_ts into the stream, encoded in * big endian. * - * @param nInt32 The number of uint32_ts to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of uint32_ts to write * @return The number of bytes written to the stream */ - (size_t)writeBigEndianInt32s: (const uint32_t*)buffer - count: (size_t)nInt32s; + count: (size_t)count; /*! * @brief Writes the specified number of uint64_ts into the stream, encoded in * big endian. * - * @param nInt64 The number of uint64_ts to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of uint64_ts to write * @return The number of bytes written to the stream */ - (size_t)writeBigEndianInt64s: (const uint64_t*)buffer - count: (size_t)nInt64s; + count: (size_t)count; /*! * @brief Writes the specified number of floats into the stream, encoded in big * endian. * - * @param nFloats The number of floats to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of floats to write * @return The number of bytes written to the stream */ - (size_t)writeBigEndianFloats: (const float*)buffer - count: (size_t)nFloats; + count: (size_t)count; /*! * @brief Writes the specified number of doubles into the stream, encoded in * big endian. * - * @param nDoubles The number of doubles to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of doubles to write * @return The number of bytes written to the stream */ - (size_t)writeBigEndianDoubles: (const double*)buffer - count: (size_t)nDoubles; + count: (size_t)count; /*! * @brief Writes a uint16_t into the stream, encoded in little endian. * * @param int16 A uint16_t @@ -854,65 +854,65 @@ /*! * @brief Writes the specified number of uint16_ts into the stream, encoded in * little endian. * - * @param nInt16 The number of uint16_ts to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of uint16_ts to write * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianInt16s: (const uint16_t*)buffer - count: (size_t)nInt16s; + count: (size_t)count; /*! * @brief Writes the specified number of uint32_ts into the stream, encoded in * little endian. * - * @param nInt32 The number of uint32_ts to write + * @param count The number of uint32_ts to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianInt32s: (const uint32_t*)buffer - count: (size_t)nInt32s; + count: (size_t)count; /*! * @brief Writes the specified number of uint64_ts into the stream, encoded in * little endian. * - * @param nInt64 The number of uint64_ts to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of uint64_ts to write * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianInt64s: (const uint64_t*)buffer - count: (size_t)nInt64s; + count: (size_t)count; /*! * @brief Writes the specified number of floats into the stream, encoded in * little endian. * - * @param nFloats The number of floats to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of floats to write * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianFloats: (const float*)buffer - count: (size_t)nFloats; + count: (size_t)count; /*! * @brief Writes the specified number of doubles into the stream, encoded in * little endian. * - * @param nDoubles The number of doubles to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary + * @param count The number of doubles to write * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianDoubles: (const double*)buffer - count: (size_t)nDoubles; + count: (size_t)count; /*! * @brief Writes from an OFDataArray into the stream. * * @param dataArray The OFDataArray to write into the stream Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -249,93 +249,93 @@ return OF_BSWAP_DOUBLE_IF_LE(ret); } - (size_t)readBigEndianInt16sIntoBuffer: (uint16_t*)buffer - count: (size_t)nInt16s + count: (size_t)count { - size_t size = nInt16s * sizeof(uint16_t); + size_t size = count * sizeof(uint16_t); [self readIntoBuffer: buffer exactLength: size]; #ifndef OF_BIG_ENDIAN size_t i; - for (i = 0; i < nInt16s; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP16(buffer[i]); #endif return size; } - (size_t)readBigEndianInt32sIntoBuffer: (uint32_t*)buffer - count: (size_t)nInt32s + count: (size_t)count { - size_t size = nInt32s * sizeof(uint32_t); + size_t size = count * sizeof(uint32_t); [self readIntoBuffer: buffer exactLength: size]; #ifndef OF_BIG_ENDIAN size_t i; - for (i = 0; i < nInt32s; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP32(buffer[i]); #endif return size; } - (size_t)readBigEndianInt64sIntoBuffer: (uint64_t*)buffer - count: (size_t)nInt64s + count: (size_t)count { - size_t size = nInt64s * sizeof(uint64_t); + size_t size = count * sizeof(uint64_t); [self readIntoBuffer: buffer exactLength: size]; #ifndef OF_BIG_ENDIAN size_t i; - for (i = 0; i < nInt64s; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP64(buffer[i]); #endif return size; } - (size_t)readBigEndianFloatsIntoBuffer: (float*)buffer - count: (size_t)nFloats + count: (size_t)count { - size_t size = nFloats * sizeof(float); + size_t size = count * sizeof(float); [self readIntoBuffer: buffer exactLength: size]; #ifndef OF_FLOAT_BIG_ENDIAN size_t i; - for (i = 0; i < nFloats; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP_FLOAT(buffer[i]); #endif return size; } - (size_t)readBigEndianDoublesIntoBuffer: (double*)buffer - count: (size_t)nDoubles + count: (size_t)count { - size_t size = nDoubles * sizeof(double); + size_t size = count * sizeof(double); [self readIntoBuffer: buffer exactLength: size]; #ifndef OF_FLOAT_BIG_ENDIAN size_t i; - for (i = 0; i < nDoubles; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP_DOUBLE(buffer[i]); #endif return size; } @@ -389,121 +389,121 @@ return OF_BSWAP_DOUBLE_IF_BE(ret); } - (size_t)readLittleEndianInt16sIntoBuffer: (uint16_t*)buffer - count: (size_t)nInt16s + count: (size_t)count { - size_t size = nInt16s * sizeof(uint16_t); + size_t size = count * sizeof(uint16_t); [self readIntoBuffer: buffer exactLength: size]; #ifdef OF_BIG_ENDIAN size_t i; - for (i = 0; i < nInt16s; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP16(buffer[i]); #endif return size; } - (size_t)readLittleEndianInt32sIntoBuffer: (uint32_t*)buffer - count: (size_t)nInt32s + count: (size_t)count { - size_t size = nInt32s * sizeof(uint32_t); + size_t size = count * sizeof(uint32_t); [self readIntoBuffer: buffer exactLength: size]; #ifdef OF_BIG_ENDIAN size_t i; - for (i = 0; i < nInt32s; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP32(buffer[i]); #endif return size; } - (size_t)readLittleEndianInt64sIntoBuffer: (uint64_t*)buffer - count: (size_t)nInt64s + count: (size_t)count { - size_t size = nInt64s * sizeof(uint64_t); + size_t size = count * sizeof(uint64_t); [self readIntoBuffer: buffer exactLength: size]; #ifdef OF_BIG_ENDIAN size_t i; - for (i = 0; i < nInt64s; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP64(buffer[i]); #endif return size; } - (size_t)readLittleEndianFloatsIntoBuffer: (float*)buffer - count: (size_t)nFloats + count: (size_t)count { - size_t size = nFloats * sizeof(float); + size_t size = count * sizeof(float); [self readIntoBuffer: buffer exactLength: size]; #ifdef OF_FLOAT_BIG_ENDIAN size_t i; - for (i = 0; i < nFloats; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP_FLOAT(buffer[i]); #endif return size; } - (size_t)readLittleEndianDoublesIntoBuffer: (double*)buffer - count: (size_t)nDoubles + count: (size_t)count { - size_t size = nDoubles * sizeof(double); + size_t size = count * sizeof(double); [self readIntoBuffer: buffer exactLength: size]; #ifdef OF_FLOAT_BIG_ENDIAN size_t i; - for (i = 0; i < nDoubles; i++) + for (i = 0; i < count; i++) buffer[i] = OF_BSWAP_DOUBLE(buffer[i]); #endif return size; } -- (OFDataArray*)readDataArrayWithSize: (size_t)nItems +- (OFDataArray*)readDataArrayWithSize: (size_t)size { return [self readDataArrayWithItemSize: 1 - count: nItems]; + count: size]; } - (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize - count: (size_t)nItems + count: (size_t)count { OFDataArray *dataArray; char *tmp; dataArray = [OFDataArray dataArrayWithItemSize: itemSize]; tmp = [self allocMemoryWithSize: itemSize - count: nItems]; + count: count]; @try { [self readIntoBuffer: tmp - exactLength: nItems * itemSize]; + exactLength: count * itemSize]; [dataArray addItemsFromCArray: tmp - count: nItems]; + count: count]; } @finally { [self freeMemory: tmp]; } return dataArray; @@ -1012,27 +1012,27 @@ [self writeBuffer: (char*)&double_ length: 8]; } - (size_t)writeBigEndianInt16s: (const uint16_t*)buffer - count: (size_t)nInt16s + count: (size_t)count { - size_t size = nInt16s * sizeof(uint16_t); + size_t size = count * sizeof(uint16_t); #ifdef OF_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else uint16_t *tmp; tmp = [self allocMemoryWithSize: sizeof(uint16_t) - count: nInt16s]; + count: count]; @try { size_t i; - for (i = 0; i < nInt16s; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP16(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1042,27 +1042,27 @@ return size; } - (size_t)writeBigEndianInt32s: (const uint32_t*)buffer - count: (size_t)nInt32s + count: (size_t)count { - size_t size = nInt32s * sizeof(uint32_t); + size_t size = count * sizeof(uint32_t); #ifdef OF_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else uint32_t *tmp; tmp = [self allocMemoryWithSize: sizeof(uint32_t) - count: nInt32s]; + count: count]; @try { size_t i; - for (i = 0; i < nInt32s; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP32(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1072,27 +1072,27 @@ return size; } - (size_t)writeBigEndianInt64s: (const uint64_t*)buffer - count: (size_t)nInt64s + count: (size_t)count { - size_t size = nInt64s * sizeof(uint64_t); + size_t size = count * sizeof(uint64_t); #ifdef OF_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else uint64_t *tmp; tmp = [self allocMemoryWithSize: sizeof(uint64_t) - count: nInt64s]; + count: count]; @try { size_t i; - for (i = 0; i < nInt64s; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP64(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1102,27 +1102,27 @@ return size; } - (size_t)writeBigEndianFloats: (const float*)buffer - count: (size_t)nFloats + count: (size_t)count { - size_t size = nFloats * sizeof(float); + size_t size = count * sizeof(float); #ifdef OF_FLOAT_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else float *tmp; tmp = [self allocMemoryWithSize: sizeof(float) - count: nFloats]; + count: count]; @try { size_t i; - for (i = 0; i < nFloats; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP_FLOAT(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1132,27 +1132,27 @@ return size; } - (size_t)writeBigEndianDoubles: (const double*)buffer - count: (size_t)nDoubles + count: (size_t)count { - size_t size = nDoubles * sizeof(double); + size_t size = count * sizeof(double); #ifdef OF_FLOAT_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else double *tmp; tmp = [self allocMemoryWithSize: sizeof(double) - count: nDoubles]; + count: count]; @try { size_t i; - for (i = 0; i < nDoubles; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP_DOUBLE(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1202,27 +1202,27 @@ [self writeBuffer: (char*)&double_ length: 8]; } - (size_t)writeLittleEndianInt16s: (const uint16_t*)buffer - count: (size_t)nInt16s + count: (size_t)count { - size_t size = nInt16s * sizeof(uint16_t); + size_t size = count * sizeof(uint16_t); #ifndef OF_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else uint16_t *tmp; tmp = [self allocMemoryWithSize: sizeof(uint16_t) - count: nInt16s]; + count: count]; @try { size_t i; - for (i = 0; i < nInt16s; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP16(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1232,27 +1232,27 @@ return size; } - (size_t)writeLittleEndianInt32s: (const uint32_t*)buffer - count: (size_t)nInt32s + count: (size_t)count { - size_t size = nInt32s * sizeof(uint32_t); + size_t size = count * sizeof(uint32_t); #ifndef OF_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else uint32_t *tmp; tmp = [self allocMemoryWithSize: sizeof(uint32_t) - count: nInt32s]; + count: count]; @try { size_t i; - for (i = 0; i < nInt32s; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP32(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1262,27 +1262,27 @@ return size; } - (size_t)writeLittleEndianInt64s: (const uint64_t*)buffer - count: (size_t)nInt64s + count: (size_t)count { - size_t size = nInt64s * sizeof(uint64_t); + size_t size = count * sizeof(uint64_t); #ifndef OF_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else uint64_t *tmp; tmp = [self allocMemoryWithSize: sizeof(uint64_t) - count: nInt64s]; + count: count]; @try { size_t i; - for (i = 0; i < nInt64s; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP64(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1292,27 +1292,27 @@ return size; } - (size_t)writeLittleEndianFloats: (const float*)buffer - count: (size_t)nFloats + count: (size_t)count { - size_t size = nFloats * sizeof(float); + size_t size = count * sizeof(float); #ifndef OF_FLOAT_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else float *tmp; tmp = [self allocMemoryWithSize: sizeof(float) - count: nFloats]; + count: count]; @try { size_t i; - for (i = 0; i < nFloats; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP_FLOAT(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { @@ -1322,27 +1322,27 @@ return size; } - (size_t)writeLittleEndianDoubles: (const double*)buffer - count: (size_t)nDoubles + count: (size_t)count { - size_t size = nDoubles * sizeof(double); + size_t size = count * sizeof(double); #ifndef OF_FLOAT_BIG_ENDIAN [self writeBuffer: buffer length: size]; #else double *tmp; tmp = [self allocMemoryWithSize: sizeof(double) - count: nDoubles]; + count: count]; @try { size_t i; - for (i = 0; i < nDoubles; i++) + for (i = 0; i < count; i++) tmp[i] = OF_BSWAP_DOUBLE(buffer[i]); [self writeBuffer: tmp length: size]; } @finally { Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -115,11 +115,11 @@ length: (size_t)UTF8StringLength; /*! * @brief Creates a new OFString from a C string with the specified encoding. * - * @param string A C string to initialize the OFString with + * @param cString A C string to initialize the OFString with * @param encoding The encoding of the C string * @return A new autoreleased OFString */ + (instancetype)stringWithCString: (const char*)cString encoding: (of_string_encoding_t)encoding; Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -377,11 +377,11 @@ encoding: encoding] autorelease]; } + (instancetype)stringWithCString: (const char*)cString encoding: (of_string_encoding_t)encoding - length: (size_t)cStringLength + length: (size_t)cStringLength { return [[[self alloc] initWithCString: cString encoding: encoding length: cStringLength] autorelease]; } Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -171,11 +171,11 @@ port: (uint16_t)port; /*! * @brief Listen on the socket. * - * @param backlog Maximum length for the queue of pending connections. + * @param backLog Maximum length for the queue of pending connections. */ - (void)listenWithBackLog: (int)backLog; /*! * @brief Listen on the socket. @@ -188,11 +188,11 @@ * @return An autoreleased OFTCPSocket for the accepted connection. */ - (OFTCPSocket*)accept; /*! - * @brief Asyncronously ccept an incoming connection. + * @brief Asyncronously accept an incoming connection. * * @param target The target on which to execute the selector when a new * connection has been accepted. The method returns whether the * next incoming connection should be accepted by the specified * block as well. @@ -203,11 +203,11 @@ - (void)asyncAcceptWithTarget: (id)target selector: (SEL)selector; #ifdef OF_HAVE_BLOCKS /*! - * @brief Asyncronously ccept an incoming connection. + * @brief Asyncronously accept an incoming connection. * * @param block The block to execute when a new connection has been accepted. * Returns whether the next incoming connection should be accepted * by the specified block as well. */ Index: src/OFTLSSocket.h ================================================================== --- src/OFTLSSocket.h +++ src/OFTLSSocket.h @@ -26,12 +26,14 @@ @protocol OFTLSSocketDelegate /*! * @brief This callback is called when the TLS socket wants to know if it * should accept the received keychain. * - * @param certificate An array of objects implementing the OFX509Certificate - * protocol + * @param socket The socket which wants to know if it should accept the received + * keychain + * @param keychain An array of objects implementing the OFX509Certificate + * protocol * @return Whether the TLS socket should accept the received keychain */ - (BOOL)socket: (id )socket shouldAcceptKeychain: (OFArray*)keychain; @end Index: src/OFTimer.h ================================================================== --- src/OFTimer.h +++ src/OFTimer.h @@ -215,11 +215,11 @@ */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval target: (id)target selector: (SEL)selector - object: (id)object1 + object: (id)object repeats: (BOOL)repeats; /*! * @brief Initializes an already allocated timer with the specified time * interval. @@ -227,10 +227,14 @@ * @param fireDate The date at which the timer should fire * @param interval The time interval after which to repeat the timer, if it is * a repeating timer * @param target The target on which to call the selector * @param selector The selector to call on the target + * @param object1 The first object to pass when calling the selector on the + * target + * @param object2 The second object to pass when calling the selector on the + * target * @param repeats Whether the timer repeats after it has been executed * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval Index: src/OFURL.h ================================================================== --- src/OFURL.h +++ src/OFURL.h @@ -80,11 +80,11 @@ * @param string A string describing a URL * @param URL A URL to which the string is relative * @return An initialized OFURL */ - initWithString: (OFString*)string - relativeToURL: (OFURL*)url; + relativeToURL: (OFURL*)URL; /*! * @brief Returns the scheme part of the URL. * * @return The scheme part of the URL Index: src/OFXMLElement.h ================================================================== --- src/OFXMLElement.h +++ src/OFXMLElement.h @@ -301,11 +301,11 @@ namespace: (OFString*)attributeNS; /*! * @brief Removes the attribute with the specified name. * - * @param attribteName The name of the attribute + * @param attributeName The name of the attribute */ - (void)removeAttributeForName: (OFString*)attributeName; /*! * @brief Removes the attribute with the specified name and namespace. Index: src/OFXMLElementBuilder.h ================================================================== --- src/OFXMLElementBuilder.h +++ src/OFXMLElementBuilder.h @@ -36,11 +36,11 @@ * If the OFXMLElementBuilder was used as a delegate for the OFXMLParser since * parsing started, this will return the complete document as an OFXMLElement * with all children. * * @param builder The builder which built an OFXMLElement - * @param elem The OFXMLElement the OFXMLElementBuilder built + * @param element The OFXMLElement the OFXMLElementBuilder built */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didBuildElement: (OFXMLElement*)element; #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @@ -85,10 +85,11 @@ /*! * @brief This callback is called when the XML parser for the element builder * found an unknown entity. * + * @param builder The element builder which found an unknown entity * @param entity The name of the entity * @return The substitution for the entity */ - (OFString*)elementBuilder: (OFXMLElementBuilder*)builder foundUnknownEntityNamed: (OFString*)entity; Index: src/OFXMLElementBuilder.m ================================================================== --- src/OFXMLElementBuilder.m +++ src/OFXMLElementBuilder.m @@ -187,11 +187,11 @@ } @end @implementation OFObject (OFXMLElementBuilderDelegate) - (void)elementBuilder: (OFXMLElementBuilder*)builder - didBuildElement: (OFXMLElement*)elem + didBuildElement: (OFXMLElement*)element { } - (void)elementBuilder: (OFXMLElementBuilder*)builder didBuildParentlessNode: (OFXMLNode*)node Index: src/exceptions/OFAcceptFailedException.h ================================================================== --- src/exceptions/OFAcceptFailedException.h +++ src/exceptions/OFAcceptFailedException.h @@ -31,32 +31,38 @@ @property (readonly, retain, nonatomic) OFTCPSocket *socket; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased accept failed exception. + * * @param class_ The class of the object which caused the exception * @param socket The socket which could not accept a connection - * @return A new accept failed exception + * @return A new, autoreleased accept failed exception */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket; /*! - * Initializes an already allocated accept failed exception. + * @brief Initializes an already allocated accept failed exception. * * @param class_ The class of the object which caused the exception * @param socket The socket which could not accept a connection * @return An initialized accept failed exception */ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket; /*! + * @brief Returns the socket which could not accept a connection. + * * @return The socket which could not accept a connection */ - (OFTCPSocket*)socket; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFAddressTranslationFailedException.h ================================================================== --- src/exceptions/OFAddressTranslationFailedException.h +++ src/exceptions/OFAddressTranslationFailedException.h @@ -33,21 +33,23 @@ @property (readonly, copy, nonatomic) OFString *host; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased address translation failed exception. + * * @param class_ The class of the object which caused the exception * @param socket The socket which could not translate the address * @param host The host for which translation was requested - * @return A new address translation failed exception + * @return A new, autoreleased address translation failed exception */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host; /*! - * Initializes an already allocated address translation failed exception. + * @brief Initializes an already allocated address translation failed exception. * * @param class_ The class of the object which caused the exception * @param socket The socket which could not translate the address * @param host The host for which translation was requested * @return An initialized address translation failed exception @@ -55,19 +57,25 @@ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host; /*! + * @brief Returns the socket which could not translate the address. + * * @return The socket which could not translate the address */ - (OFTCPSocket*)socket; /*! - * /return The host for which translation was requested + * @brief Returns the host for which the address translation was requested. + * + * @return The host for which the address translation was requested */ - (OFString*)host; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFAllocFailedException.h ================================================================== --- src/exceptions/OFAllocFailedException.h +++ src/exceptions/OFAllocFailedException.h @@ -19,20 +19,22 @@ @class OFString; /*! * @brief An exception indicating an object could not be allocated. * - * This exception is preallocated, as if there's no memory, no exception can + * This exception is preallocated, as when there's no memory, no exception can * be allocated of course. That's why you shouldn't and even can't deallocate * it. * * This is the only exception that is not an OFException as it's special. * It does not know for which class allocation failed and it should not be * handled like other exceptions, as the exception handling code is not - * allowed to allocate ANY memory. + * allowed to allocate any memory. */ @interface OFAllocFailedException: OFObject /*! + * @brief Returns a description of the exception. + * * @return A description of the exception */ - (OFString*)description; @end Index: src/exceptions/OFAlreadyConnectedException.h ================================================================== --- src/exceptions/OFAlreadyConnectedException.h +++ src/exceptions/OFAlreadyConnectedException.h @@ -30,27 +30,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFTCPSocket *socket; #endif /*! + * @brief Creates a new, autoreleased already connected exception. + * * @param class_ The class of the object which caused the exception * @param socket The socket which is already connected - * @return A new already connected exception + * @return A new, autoreleased already connected exception */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket; /*! - * Initializes an already allocated already connected exception. + * @brief Initializes an already allocated already connected exception. * * @param class_ The class of the object which caused the exception * @param socket The socket which is already connected * @return An initialized already connected exception */ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket; /*! + * @brief Returns the socket which is already connected. + * * @return The socket which is already connected */ - (OFTCPSocket*)socket; @end Index: src/exceptions/OFBindFailedException.h ================================================================== --- src/exceptions/OFBindFailedException.h +++ src/exceptions/OFBindFailedException.h @@ -35,23 +35,25 @@ @property (readonly) uint16_t port; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased bind failed exception. + * * @param class_ The class of the object which caused the exception * @param socket The socket which could not be bound * @param host The host on which binding failed * @param port The port on which binding failed - * @return A new bind failed exception + * @return A new, autoreleased bind failed exception */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; /*! - * Initializes an already allocated bind failed exception. + * @brief Initializes an already allocated bind failed exception. * * @param class_ The class of the object which caused the exception * @param socket The socket which could not be bound * @param host The host on which binding failed * @param port The port on which binding failed @@ -61,24 +63,32 @@ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; /*! + * @brief Returns the socket which could not be bound. + * * @return The socket which could not be bound */ - (OFTCPSocket*)socket; /*! + * @brief Returns the host on which binding failed. + * * @return The host on which binding failed */ - (OFString*)host; /*! + * @brief Return the port on which binding failed. + * * @return The port on which binding failed */ - (uint16_t)port; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFChangeDirectoryFailedException.h ================================================================== --- src/exceptions/OFChangeDirectoryFailedException.h +++ src/exceptions/OFChangeDirectoryFailedException.h @@ -29,20 +29,22 @@ @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased change directory failed exception. + * * @param class_ The class of the object which caused the exception * @param path A string with the path of the directory to which couldn't be * changed - * @return A new change directory failed exception + * @return A new, autoreleased change directory failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; /*! - * Initializes an already allocated change directory failed exception. + * @brief Initializes an already allocated change directory failed exception. * * @param class_ The class of the object which caused the exception * @param path A string with the path of the directory to which couldn't be * changed * @return An initialized change directory failed exception @@ -49,14 +51,18 @@ */ - initWithClass: (Class)class_ path: (OFString*)path; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! - * @return A string with the path of the directory to which couldn't changed + * @brief Returns the path to which changing failed. + * + * @return The path to which changing failed */ - (OFString*)path; @end Index: src/exceptions/OFChangeFileModeFailedException.h ================================================================== --- src/exceptions/OFChangeFileModeFailedException.h +++ src/exceptions/OFChangeFileModeFailedException.h @@ -33,21 +33,23 @@ @property (readonly) mode_t mode; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased change file mode failed exception. + * * @param class_ The class of the object which caused the exception * @param path The path of the file * @param mode The new mode for the file - * @return An initialized change file mode failed exception + * @return A new, autoreleased change file mode failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path mode: (mode_t)mode; /*! - * Initializes an already allocated change file mode failed exception. + * @brief Initializes an already allocated change file mode failed exception. * * @param class_ The class of the object which caused the exception * @param path The path of the file * @param mode The new mode for the file * @return An initialized change file mode failed exception @@ -55,19 +57,25 @@ - initWithClass: (Class)class_ path: (OFString*)path mode: (mode_t)mode; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns the path of the file. + * * @return The path of the file */ - (OFString*)path; /*! + * @brief Returns the new mode for the file. + * * @return The new mode for the file */ - (mode_t)mode; @end Index: src/exceptions/OFChangeFileOwnerFailedException.h ================================================================== --- src/exceptions/OFChangeFileOwnerFailedException.h +++ src/exceptions/OFChangeFileOwnerFailedException.h @@ -34,23 +34,25 @@ @property (readonly, copy, nonatomic) OFString *group; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased change file owner failed exception. + * * @param class_ The class of the object which caused the exception * @param path The path of the file * @param owner The new owner for the file * @param group The new group for the file - * @return An initialized change file owner failed exception + * @return A new, autoreleased change file owner failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path owner: (OFString*)owner group: (OFString*)group; /*! - * Initializes an already allocated change file owner failed exception. + * @brief Initializes an already allocated change file owner failed exception. * * @param class_ The class of the object which caused the exception * @param path The path of the file * @param owner The new owner for the file * @param group The new group for the file @@ -60,25 +62,33 @@ path: (OFString*)path owner: (OFString*)owner group: (OFString*)group; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns the path of the file. + * * @return The path of the file */ - (OFString*)path; /*! + * @brief Returns the new owner for the file. + * * @return The new owner for the file */ - (OFString*)owner; /*! + * @brief Returns the new group for the file. + * * @return The new group for the file */ - (OFString*)group; @end #endif Index: src/exceptions/OFConditionBroadcastFailedException.h ================================================================== --- src/exceptions/OFConditionBroadcastFailedException.h +++ src/exceptions/OFConditionBroadcastFailedException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif /*! + * @brief Returns a new, autoreleased condition broadcast failed exception. + * * @param class_ The class of the object which caused the exception * @param condition The condition which could not be broadcasted - * @return A new condition broadcast failed exception + * @return A new, autoreleased condition broadcast failed exception */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; /*! - * Initializes an already allocated condition broadcast failed exception. + * @brief Initializes an already allocated condition broadcast failed exception. * * @param class_ The class of the object which caused the exception * @param condition The condition which could not be broadcasted * @return An initialized condition broadcast failed exception */ - initWithClass: (Class)class_ condition: (OFCondition*)condition; /*! + * @brief Returns the condition which could not be broadcasted. + * * @return The condition which could not be broadcasted */ - (OFCondition*)condition; @end Index: src/exceptions/OFConditionSignalFailedException.h ================================================================== --- src/exceptions/OFConditionSignalFailedException.h +++ src/exceptions/OFConditionSignalFailedException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif /*! + * @brief Creates a new, autoreleased condition signal failed exception. + * * @param class_ The class of the object which caused the exception * @param condition The condition which could not be signaled - * @return A new condition signal failed exception + * @return A new, autoreleased condition signal failed exception */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; /*! - * Initializes an already allocated condition signal failed exception. + * @brief Initializes an already allocated condition signal failed exception. * * @param class_ The class of the object which caused the exception * @param condition The condition which could not be signaled * @return An initialized condition signal failed exception */ - initWithClass: (Class)class_ condition: (OFCondition*)condition; /*! + * @brief Return the condition which could not be signaled. + * * @return The condition which could not be signaled */ - (OFCondition*)condition; @end Index: src/exceptions/OFConditionStillWaitingException.h ================================================================== --- src/exceptions/OFConditionStillWaitingException.h +++ src/exceptions/OFConditionStillWaitingException.h @@ -30,27 +30,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif /*! + * @brief Creates a new, autoreleased condition still waiting exception. + * * @param class_ The class of the object which caused the exception * @param condition The condition for which is still being waited - * @return A new condition still waiting exception + * @return A new, autoreleased condition still waiting exception */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; /*! - * Initializes an already allocated condition still waiting exception. + * @brief Initializes an already allocated condition still waiting exception. * * @param class_ The class of the object which caused the exception * @param condition The condition for which is still being waited * @return An initialized condition still waiting exception */ - initWithClass: (Class)class_ condition: (OFCondition*)condition; /*! + * @brief Return the condition for which is still being waited. + * * @return The condition for which is still being waited */ - (OFCondition*)condition; @end Index: src/exceptions/OFConditionWaitFailedException.h ================================================================== --- src/exceptions/OFConditionWaitFailedException.h +++ src/exceptions/OFConditionWaitFailedException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif /*! + * @brief Creates a new, autoreleased condition wait failed exception. + * * @param class_ The class of the object which caused the exception * @param condition The condition for which could not be waited - * @return A new condition wait failed exception + * @return A new, autoreleased condition wait failed exception */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; /*! - * Initializes an already allocated condition wait failed exception. + * @brief Initializes an already allocated condition wait failed exception. * * @param class_ The class of the object which caused the exception * @param condition The condition for which could not be waited * @return An initialized condition wait failed exception */ - initWithClass: (Class)class_ condition: (OFCondition*)condition; /*! + * @brief Return the condition for which could not be waited. + * * @return The condition for which could not be waited */ - (OFCondition*)condition; @end Index: src/exceptions/OFConnectionFailedException.h ================================================================== --- src/exceptions/OFConnectionFailedException.h +++ src/exceptions/OFConnectionFailedException.h @@ -35,23 +35,25 @@ @property (readonly) uint16_t port; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased connection failed exception. + * * @param class_ The class of the object which caused the exception * @param socket The socket which could not connect * @param host The host to which the connection failed * @param port The port on the host to which the connection failed - * @return A new connection failed exception + * @return A new, autoreleased connection failed exception */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; /*! - * Initializes an already allocated connection failed exception. + * @brief Initializes an already allocated connection failed exception. * * @param class_ The class of the object which caused the exception * @param socket The socket which could not connect * @param host The host to which the connection failed * @param port The port on the host to which the connection failed @@ -61,24 +63,32 @@ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; /*! + * @brief Returns the socket which could not connect. + * * @return The socket which could not connect */ - (OFTCPSocket*)socket; /*! + * @brief Returns the host to which the connection failed. + * * @return The host to which the connection failed */ - (OFString*)host; /*! + * @brief Returns the port on the host to which the connection failed. + * * @return The port on the host to which the connection failed */ - (uint16_t)port; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFCopyFileFailedException.h ================================================================== --- src/exceptions/OFCopyFileFailedException.h +++ src/exceptions/OFCopyFileFailedException.h @@ -31,21 +31,23 @@ @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased copy file failed exception. + * * @param class_ The class of the object which caused the exception * @param source The original path * @param destination The new path - * @return A new copy file failed exception + * @return A new, autoreleased copy file failed exception */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! - * Initializes an already allocated copy file failed exception. + * @brief Initializes an already allocated copy file failed exception. * * @param class_ The class of the object which caused the exception * @param source The original path * @param destination The new path * @return An initialized copy file failed exception @@ -53,19 +55,25 @@ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns the path of the source file. + * * @return The path of the source file */ - (OFString*)sourcePath; /*! + * @brief Returns the destination path. + * * @return The destination path */ - (OFString*)destinationPath; @end Index: src/exceptions/OFCreateDirectoryFailedException.h ================================================================== --- src/exceptions/OFCreateDirectoryFailedException.h +++ src/exceptions/OFCreateDirectoryFailedException.h @@ -29,32 +29,39 @@ @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased create directory failed exception. + * * @param class_ The class of the object which caused the exception * @param path A string with the path of the directory which couldn't be created - * @return A new create directory failed exception + * @return A new, autoreleased create directory failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; /*! - * Initializes an already allocated create directory failed exception. + * @brief Initializes an already allocated create directory failed exception. * * @param class_ The class of the object which caused the exception * @param path A string with the path of the directory which couldn't be created * @return An initialized create directory failed exception */ - initWithClass: (Class)class_ path: (OFString*)path; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns a string with the path of the directory which couldn't be + * created. + * * @return A string with the path of the directory which couldn't be created */ - (OFString*)path; @end Index: src/exceptions/OFDeleteDirectoryFailedException.h ================================================================== --- src/exceptions/OFDeleteDirectoryFailedException.h +++ src/exceptions/OFDeleteDirectoryFailedException.h @@ -29,32 +29,38 @@ @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased delete directory failed exception. + * * @param class_ The class of the object which caused the exception * @param path The path of the directory - * @return A new delete directory failed exception + * @return A new, autoreleased delete directory failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; /*! - * Initializes an already allocated delete directory failed exception. + * @brief Initializes an already allocated delete directory failed exception. * * @param class_ The class of the object which caused the exception * @param path The path of the directory * @return An initialized delete directory failed exception */ - initWithClass: (Class)class_ path: (OFString*)path; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns the path of the directory. + * * @return The path of the directory */ - (OFString*)path; @end Index: src/exceptions/OFDeleteFileFailedException.h ================================================================== --- src/exceptions/OFDeleteFileFailedException.h +++ src/exceptions/OFDeleteFileFailedException.h @@ -29,32 +29,38 @@ @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased delete file failed exception. + * * @param class_ The class of the object which caused the exception * @param path The path of the file - * @return A new delete file failed exception + * @return A new, autoreleased delete file failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; /*! - * Initializes an already allocated delete file failed exception. + * @brief Initializes an already allocated delete file failed exception. * * @param class_ The class of the object which caused the exception * @param path The path of the file * @return An initialized delete file failed exception */ - initWithClass: (Class)class_ path: (OFString*)path; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns the path of the file. + * * @return The path of the file */ - (OFString*)path; @end Index: src/exceptions/OFEnumerationMutationException.h ================================================================== --- src/exceptions/OFEnumerationMutationException.h +++ src/exceptions/OFEnumerationMutationException.h @@ -28,27 +28,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id object; #endif /*! + * @brief Creates a new, autoreleased enumeration mutation exception. + * * @param class_ The class of the object which caused the exception * @param object The object which was mutated during enumeration - * @return A new enumeration mutation exception + * @return A new, autoreleased enumeration mutation exception */ + (instancetype)exceptionWithClass: (Class)class_ object: (id)object; /*! - * Initializes an already allocated enumeration mutation exception. + * @brief Initializes an already allocated enumeration mutation exception. * * @param class_ The class of the object which caused the exception * @param object The object which was mutated during enumeration * @return An initialized enumeration mutation exception */ - initWithClass: (Class)class_ object: (id)object; /*! + * @brief Returns the object which was mutated during enumeration. + * * @return The object which was mutated during enumeration */ - (id)object; @end Index: src/exceptions/OFException.h ================================================================== --- src/exceptions/OFException.h +++ src/exceptions/OFException.h @@ -33,30 +33,34 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) Class inClass; #endif /*! - * Creates a new exception. + * @brief Creates a new, autoreleased exception. * * @param class_ The class of the object which caused the exception - * @return A new exception + * @return A new, autoreleased exception */ + (instancetype)exceptionWithClass: (Class)class_; /*! - * Initializes an already allocated OFException. + * @brief Initializes an already allocated OFException. * * @param class_ The class of the object which caused the exception * @return An initialized OFException */ - initWithClass: (Class)class_; /*! + * @brief Returns the class of the object in which the exception happened. + * * @return The class of the object in which the exception happened */ - (Class)inClass; /*! + * @brief Returns a description of the exception. + * * @return A description of the exception */ - (OFString*)description; @end Index: src/exceptions/OFHTTPRequestFailedException.h ================================================================== --- src/exceptions/OFHTTPRequestFailedException.h +++ src/exceptions/OFHTTPRequestFailedException.h @@ -32,21 +32,23 @@ @property (readonly, retain, nonatomic) OFHTTPRequest *request; @property (readonly, retain, nonatomic) OFHTTPRequestResult *result; #endif /*! + * @brief Creates a new, autoreleased HTTP request failed exception. + * * @param class_ The class of the object which caused the exception * @param request The HTTP request which failed * @param result The result of the failed HTTP request - * @return A new HTTP request failed exception + * @return A new, autoreleased HTTP request failed exception */ + (instancetype)exceptionWithClass: (Class)class_ request: (OFHTTPRequest*)request result: (OFHTTPRequestResult*)result; /*! - * Initializes an already allocated HTTP request failed exception + * @brief Initializes an already allocated HTTP request failed exception. * * @param class_ The class of the object which caused the exception * @param request The HTTP request which failed * @param result The result of the failed HTTP request * @return A new HTTP request failed exception @@ -54,14 +56,18 @@ - initWithClass: (Class)class_ request: (OFHTTPRequest*)request result: (OFHTTPRequestResult*)result; /*! + * @brief Returns the HTTP request which failed. + * * @return The HTTP request which failed */ - (OFHTTPRequest*)request; /*! + * @brief Returns the result of the failed HTTP request. + * * @return The result of the failed HTTP request */ - (OFHTTPRequestResult*)result; @end Index: src/exceptions/OFHashAlreadyCalculatedException.h ================================================================== --- src/exceptions/OFHashAlreadyCalculatedException.h +++ src/exceptions/OFHashAlreadyCalculatedException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFHash *hashObject; #endif /*! + * @brief Creates a new, autoreleased hash already calculated exception. + * * @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 + * @return A new, autoreleased hash already calculated exception */ + (instancetype)exceptionWithClass: (Class)class_ hash: (OFHash*)hash; /*! - * Initializes an already allocated hash already calculated exception. + * @brief Initializes an already allocated hash already calculated exception. * * @param class_ The class of the object which caused the exception * @param hash The hash which has already been calculated * @return An initialized hash already calculated exception */ - initWithClass: (Class)class_ hash: (OFHash*)hash; /*! + * @brief Returns the hash which has already been calculated. + * * @return The hash which has already been calculated */ - (OFHash*)hashObject; @end Index: src/exceptions/OFInvalidArgumentException.h ================================================================== --- src/exceptions/OFInvalidArgumentException.h +++ src/exceptions/OFInvalidArgumentException.h @@ -27,27 +27,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) SEL selector; #endif /*! + * @brief Creates a new, autoreleased invalid argument 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 + * @return A new, autoreleased invalid argument exception */ + (instancetype)exceptionWithClass: (Class)class_ selector: (SEL)selector; /*! - * Initializes an already allocated invalid argument exception + * @brief Initializes an already allocated invalid argument 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_ selector: (SEL)selector; /*! + * @brief Returns the selector to which an invalid argument was passed. + * * @return The selector to which an invalid argument was passed */ - (SEL)selector; @end Index: src/exceptions/OFInvalidJSONException.h ================================================================== --- src/exceptions/OFInvalidJSONException.h +++ src/exceptions/OFInvalidJSONException.h @@ -27,27 +27,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t line; #endif /*! + * @brief Creates a new, autoreleased invalid JSON exception. + * * @param class_ The class of the object which caused the exception * @param line The line in which the parsing error encountered - * @return A new invalid JSON exception + * @return A new, autoreleased invalid JSON exception */ + (instancetype)exceptionWithClass: (Class)class_ line: (size_t)line; /*! - * Initializes an already allocated invalid JSON exception. + * @brief Initializes an already allocated invalid JSON exception. * * @param class_ The class of the object which caused the exception * @param line The line in which the parsing error encountered * @return An initialized invalid JSON exception */ - initWithClass: (Class)class_ line: (size_t)line; /*! + * @brief Returns the line in which parsing the JSON representation failed. + * * @return The line in which parsing the JSON representation failed */ - (size_t)line; @end Index: src/exceptions/OFLinkFailedException.h ================================================================== --- src/exceptions/OFLinkFailedException.h +++ src/exceptions/OFLinkFailedException.h @@ -32,21 +32,23 @@ @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; # endif /*! + * @brief Creates a new, autoreleased link failed 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 + * @return A new, autoreleased link failed exception */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! - * Initializes an already allocated link failed exception. + * @brief Initializes an already allocated link failed 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 @@ -54,20 +56,26 @@ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns a string with the source for the link. + * * @return A string with the source for the link */ - (OFString*)sourcePath; /*! + * @brief Returns a string with the destination for the link. + * * @return A string with the destination for the link */ - (OFString*)destinationPath; @end #endif Index: src/exceptions/OFListenFailedException.h ================================================================== --- src/exceptions/OFListenFailedException.h +++ src/exceptions/OFListenFailedException.h @@ -33,21 +33,23 @@ @property (readonly) int backLog; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased listen failed exception. + * * @param class_ The class of the object which caused the exception * @param socket The socket which failed to listen * @param backlog The requested size of the back log - * @return A new listen failed exception + * @return A new, autoreleased listen failed exception */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket backLog: (int)backlog; /*! - * Initializes an already allocated listen failed exception + * @brief Initializes an already allocated listen failed exception * * @param class_ The class of the object which caused the exception * @param socket The socket which failed to listen * @param backlog The requested size of the back log * @return An initialized listen failed exception @@ -55,19 +57,25 @@ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket backLog: (int)backlog; /*! + * @brief Returns the socket which failed to listen. + * * @return The socket which failed to listen */ - (OFTCPSocket*)socket; /*! - * @return The requested back log. + * @brief Returns the requested back log. + * + * @return The requested back log */ - (int)backLog; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFLockFailedException.h ================================================================== --- src/exceptions/OFLockFailedException.h +++ src/exceptions/OFLockFailedException.h @@ -28,27 +28,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id lock; #endif /*! + * @brief Creates a new, autoreleased lock failed exception. + * * @param class_ The class of the object which caused the exception * @param lock The lock which could not be locked - * @return A new lock failed exception + * @return A new, autoreleased lock failed exception */ + (instancetype)exceptionWithClass: (Class)class_ lock: (id )lock; /*! - * Initializes an already allocated lock failed exception. + * @brief Initializes an already allocated lock failed exception. * * @param class_ The class of the object which caused the exception * @param lock The lock which could not be locked * @return An initialized lock failed exception */ - initWithClass: (Class)class_ lock: (id )lock; /*! - * @param The lock which could not be locked + * @brief Returns the lock which could not be locked. + * + * @return The lock which could not be locked */ - (id )lock; @end Index: src/exceptions/OFMalformedXMLException.h ================================================================== --- src/exceptions/OFMalformedXMLException.h +++ src/exceptions/OFMalformedXMLException.h @@ -29,25 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFXMLParser *parser; #endif /*! + * @brief Creates a new, autoreleased malformed XML exception. + * + * @param class_ The class of the object which caused the exception * @param parser The parser which encountered malformed XML - * @return A new malformed XML exception + * @return A new, autoreleased malformed XML exception */ + (instancetype)exceptionWithClass: (Class)class_ parser: (OFXMLParser*)parser; /*! - * Initializes an already allocated malformed XML exception. + * @brief Initializes an already allocated malformed XML exception. * + * @param class_ The class of the object which caused the exception * @param parser The parser which encountered malformed XML * @return An initialized malformed XML exception */ - initWithClass: (Class)class_ parser: (OFXMLParser*)parser; /*! + * @brief Returns the parser which encountered malformed XML. + * * @return The parser which encountered malformed XML */ - (OFXMLParser*)parser; @end Index: src/exceptions/OFMemoryNotPartOfObjectException.h ================================================================== --- src/exceptions/OFMemoryNotPartOfObjectException.h +++ src/exceptions/OFMemoryNotPartOfObjectException.h @@ -27,27 +27,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) void *pointer; #endif /*! + * @brief Creates a new, autoreleased memory not part of object 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 + * @return A new, autoreleased memory not part of object exception */ + (instancetype)exceptionWithClass: (Class)class_ pointer: (void*)ptr; /*! - * Initializes an already allocated memory not part of object exception. + * @brief Initializes an already allocated memory not part of object 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_ pointer: (void*)ptr; /*! + * @brief Returns a pointer to the memory which is not part of the object. + * * @return A pointer to the memory which is not part of the object */ - (void*)pointer; @end Index: src/exceptions/OFNotConnectedException.h ================================================================== --- src/exceptions/OFNotConnectedException.h +++ src/exceptions/OFNotConnectedException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFStreamSocket *socket; #endif /*! + * @brief Creates a new, autoreleased not connected exception. + * * @param class_ The class of the object which caused the exception * @param socket The socket which is not connected - * @return A new not connected exception + * @return A new, autoreleased not connected exception */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFStreamSocket*)socket; /*! - * Initializes an already allocated not connected exception. + * @brief Initializes an already allocated not connected exception. * * @param class_ The class of the object which caused the exception * @param socket The socket which is not connected * @return An initialized not connected exception */ - initWithClass: (Class)class_ socket: (OFStreamSocket*)socket; /*! + * @brief Returns the socket which is not connected. + * * @return The socket which is not connected */ - (OFStreamSocket*)socket; @end Index: src/exceptions/OFNotImplementedException.h ================================================================== --- src/exceptions/OFNotImplementedException.h +++ src/exceptions/OFNotImplementedException.h @@ -28,27 +28,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) SEL selector; #endif /*! + * @brief Creates a new, autoreleased not implemented 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 + * @return A new, autoreleased not implemented exception */ + (instancetype)exceptionWithClass: (Class)class_ selector: (SEL)selector; /*! - * Initializes an already allocated not implemented exception. + * @brief Initializes an already allocated not implemented 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_ selector: (SEL)selector; /*! + * @brief Returns the selector which is not or not fully implemented. + * * @return The selector which is not or not fully implemented */ - (SEL)selector; @end Index: src/exceptions/OFOpenFileFailedException.h ================================================================== --- src/exceptions/OFOpenFileFailedException.h +++ src/exceptions/OFOpenFileFailedException.h @@ -31,21 +31,23 @@ @property (readonly, copy, nonatomic) OFString *mode; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased open file failed exception. + * * @param class_ The class of the object which caused the exception * @param path A string with the path of the file tried to open * @param mode A string with the mode in which the file should have been opened - * @return A new open file failed exception + * @return A new, autoreleased open file failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path mode: (OFString*)mode; /*! - * Initializes an already allocated open file failed exception. + * @brief Initializes an already allocated open file failed exception. * * @param class_ The class of the object which caused the exception * @param path A string with the path of the file which couldn't be opened * @param mode A string with the mode in which the file should have been opened * @return An initialized open file failed exception @@ -53,19 +55,26 @@ - initWithClass: (Class)class_ path: (OFString*)path mode: (OFString*)mode; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns a string with the path of the file which couldn't be opened. + * * @return A string with the path of the file which couldn't be opened */ - (OFString*)path; /*! + * @brief Returns a string with the mode in which the file should have been + * opened. + * * @return A string with the mode in which the file should have been opened */ - (OFString*)mode; @end Index: src/exceptions/OFOutOfMemoryException.h ================================================================== --- src/exceptions/OFOutOfMemoryException.h +++ src/exceptions/OFOutOfMemoryException.h @@ -27,27 +27,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t requestedSize; #endif /*! + * @brief Creates a new, autoreleased no memory 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 + * @return A new, autoreleased no memory exception */ + (instancetype)exceptionWithClass: (Class)class_ requestedSize: (size_t)size; /*! - * Initializes an already allocated no memory exception. + * @brief Initializes an already allocated no memory 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_ requestedSize: (size_t)size; /*! + * @brief Returns the size of the memoory that couldn't be allocated. + * * @return The size of the memoory that couldn't be allocated */ - (size_t)requestedSize; @end Index: src/exceptions/OFReadOrWriteFailedException.h ================================================================== --- src/exceptions/OFReadOrWriteFailedException.h +++ src/exceptions/OFReadOrWriteFailedException.h @@ -34,22 +34,24 @@ @property (readonly) size_t requestedLength; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased read or write failed exception. + * * @param class_ The class of the object which caused the exception * @param stream The stream which caused the read or write failed exception * @param length The requested length of the data that couldn't be read / * written - * @return A new open file failed exception + * @return A new, autoreleased read or write failed exception */ + (instancetype)exceptionWithClass: (Class)class_ stream: (OFStream*)stream requestedLength: (size_t)length; /*! - * Initializes an already allocated read or write failed exception. + * @brief Initializes an already allocated read or write failed exception. * * @param class_ The class of the object which caused the exception * @param stream The stream which caused the read or write failed exception * @param length The requested length of the data that couldn't be read / * written @@ -58,19 +60,26 @@ - initWithClass: (Class)class_ stream: (OFStream*)stream requestedLength: (size_t)length; /*! + * @brief Returns the stream which caused the read or write failed exception. + * * @return The stream which caused the read or write failed exception */ - (OFStream*)stream; /*! + * @brief Returns the requested length of the data that couldn't be read / + * written. + * * @return The requested length of the data that couldn't be read / written */ - (size_t)requestedLength; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFRenameFileFailedException.h ================================================================== --- src/exceptions/OFRenameFileFailedException.h +++ src/exceptions/OFRenameFileFailedException.h @@ -31,21 +31,23 @@ @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased rename file failed exception. + * * @param class_ The class of the object which caused the exception * @param source The original path * @param destination The new path - * @return A new rename file failed exception + * @return A new, autoreleased rename file failed exception */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! - * Initializes an already allocated rename failed exception. + * @brief Initializes an already allocated rename failed exception. * * @param class_ The class of the object which caused the exception * @param source The original path * @param destination The new path * @return An initialized rename file failed exception @@ -53,19 +55,25 @@ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns the original path. + * * @return The original path */ - (OFString*)sourcePath; /*! + * @brief Returns the new path. + * * @return The new path */ - (OFString*)destinationPath; @end Index: src/exceptions/OFSeekFailedException.h ================================================================== --- src/exceptions/OFSeekFailedException.h +++ src/exceptions/OFSeekFailedException.h @@ -37,23 +37,27 @@ @property (readonly) int whence; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased seek failed exception. + * + * @param class_ The class of the object which caused the exception * @param stream The stream for which seeking failed * @param offset The offset to which seeking failed * @param whence To what the offset is relative - * @return A new seek failed exception + * @return A new, autoreleased seek failed exception */ + (instancetype)exceptionWithClass: (Class)class_ stream: (OFSeekableStream*)stream offset: (off_t)offset whence: (int)whence; /*! - * Initializes an already allocated seek failed exception. + * @brief Initializes an already allocated seek failed exception. * + * @param class_ The class of the object which caused the exception * @param stream The stream for which seeking failed * @param offset The offset to which seeking failed * @param whence To what the offset is relative * @return An initialized seek failed exception */ @@ -61,24 +65,32 @@ stream: (OFSeekableStream*)stream offset: (off_t)offset whence: (int)whence; /*! + * @brief Returns the stream for which seeking failed. + * * @return The stream for which seeking failed */ - (OFSeekableStream*)stream; /*! + * @brief Returns the offset to which seeking failed. + * * @return The offset to which seeking failed */ - (off_t)offset; /*! + * @brief Returns to what the offset is relative. + * * @return To what the offset is relative */ - (int)whence; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFSetOptionFailedException.h ================================================================== --- src/exceptions/OFSetOptionFailedException.h +++ src/exceptions/OFSetOptionFailedException.h @@ -29,25 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFStream *stream; #endif /*! + * @brief Creates a new, autoreleased set option failed exception. + * + * @param class_ The class of the object which caused the exception * @param stream The stream for which the option could not be set - * @return A new set option failed exception + * @return A new, autoreleased set option failed exception */ + (instancetype)exceptionWithClass: (Class)class_ stream: (OFStream*)stream; /*! - * Initializes an already allocated set option failed exception. + * @brief Initializes an already allocated set option failed exception. * + * @param class_ The class of the object which caused the exception * @param stream The stream for which the option could not be set * @return An initialized set option failed exception */ - initWithClass: (Class)class_ stream: (OFStream*)stream; /*! + * @brief Returns the stream for which the option could not be set. + * * @return The stream for which the option could not be set */ - (OFStream*)stream; @end Index: src/exceptions/OFStillLockedException.h ================================================================== --- src/exceptions/OFStillLockedException.h +++ src/exceptions/OFStillLockedException.h @@ -28,27 +28,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id lock; #endif /*! + * @brief Creates a new, autoreleased still locked exception. + * * @param class_ The class of the object which caused the exception * @param lock The lock which is still locked - * @return A new still locked exception + * @return A new, autoreleased still locked exception */ + (instancetype)exceptionWithClass: (Class)class_ lock: (id )lock; /*! - * Initializes an already allocated still locked exception. + * @brief Initializes an already allocated still locked exception. * * @param class_ The class of the object which caused the exception * @param lock The lock which is still locked * @return An initialized still locked exception */ - initWithClass: (Class)class_ lock: (id )lock; /*! + * @brief Returns the lock which is still locked. + * * @return The lock which is still locked */ - (id )lock; @end Index: src/exceptions/OFSymlinkFailedException.h ================================================================== --- src/exceptions/OFSymlinkFailedException.h +++ src/exceptions/OFSymlinkFailedException.h @@ -32,21 +32,23 @@ @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; #endif /*! + * @brief Creates a new, autoreleased symlink failed 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 + * @return A new, autoreleased symlink failed exception */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! - * Initializes an already allocated symlink failed exception. + * @brief Initializes an already allocated symlink failed 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 @@ -54,20 +56,26 @@ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; /*! + * @brief Returns the errno from when the exception was created. + * * @return The errno from when the exception was created */ - (int)errNo; /*! + * @brief Returns a string with the source for the symlink. + * * @return A string with the source for the symlink */ - (OFString*)sourcePath; /*! + * @brief Returns a string with the destination for the symlink. + * * @return A string with the destination for the symlink */ - (OFString*)destinationPath; @end #endif Index: src/exceptions/OFThreadJoinFailedException.h ================================================================== --- src/exceptions/OFThreadJoinFailedException.h +++ src/exceptions/OFThreadJoinFailedException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFThread *thread; #endif /*! + * @brief Creates a new, autoreleased thread join failed exception. + * * @param class_ The class of the object which caused the exception * @param thread The thread which could not be joined - * @return A new thread join failed exception + * @return A new, autoreleased thread join failed exception */ + (instancetype)exceptionWithClass: (Class)class_ thread: (OFThread*)thread; /*! - * Initializes an already allocated thread join failed exception. + * @brief Initializes an already allocated thread join failed exception. * * @param class_ The class of the object which caused the exception * @param thread The thread which could not be joined * @return An initialized thread join failed exception */ - initWithClass: (Class)class_ thread: (OFThread*)thread; /*! + * @brief Returns the thread which could not be joined. + * * @return The thread which could not be joined */ - (OFThread*)thread; @end Index: src/exceptions/OFThreadStartFailedException.h ================================================================== --- src/exceptions/OFThreadStartFailedException.h +++ src/exceptions/OFThreadStartFailedException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFThread *thread; #endif /*! + * @brief Creates a new, autoreleased thread start failed exception. + * * @param class_ The class of the object which caused the exception * @param thread The thread which could not be started - * @return An initialized thread start failed exception + * @return A new, autoreleased thread start failed exception */ + (instancetype)exceptionWithClass: (Class)class_ thread: (OFThread*)thread; /*! - * Initializes an already allocated thread start failed exception. + * @brief Initializes an already allocated thread start failed exception. * * @param class_ The class of the object which caused the exception * @param thread The thread which could not be started * @return An initialized thread start failed exception */ - initWithClass: (Class)class_ thread: (OFThread*)thread; /*! + * @brief Returns the thread which could not be started. + * * @return The thread which could not be started */ - (OFThread*)thread; @end Index: src/exceptions/OFThreadStillRunningException.h ================================================================== --- src/exceptions/OFThreadStillRunningException.h +++ src/exceptions/OFThreadStillRunningException.h @@ -29,27 +29,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFThread *thread; #endif /*! + * @brief Creates a new, autoreleased thread still running exception. + * * @param class_ The class of the object which caused the exception * @param thread The thread which is still running - * @return A new thread still running exception + * @return A new, autoreleased thread still running exception */ + (instancetype)exceptionWithClass: (Class)class_ thread: (OFThread*)thread; /*! - * Initializes an already allocated thread still running exception. + * @brief Initializes an already allocated thread still running exception. * * @param class_ The class of the object which caused the exception * @param thread The thread which is still running * @return An initialized thread still running exception */ - initWithClass: (Class)class_ thread: (OFThread*)thread; /*! + * @brief Returns the thread which is still running. + * * @return The thread which is still running */ - (OFThread*)thread; @end Index: src/exceptions/OFUnboundNamespaceException.h ================================================================== --- src/exceptions/OFUnboundNamespaceException.h +++ src/exceptions/OFUnboundNamespaceException.h @@ -29,50 +29,58 @@ @property (readonly, copy, nonatomic, getter=namespace) OFString *ns; @property (readonly, copy, nonatomic) OFString *prefix; #endif /*! + * @brief Creates a new, autoreleased unbound namespace exception. + * * @param class_ The class of the object which caused the exception * @param ns The namespace which is unbound - * @return A new unbound namespace exception + * @return A new, autoreleased unbound namespace exception */ + (instancetype)exceptionWithClass: (Class)class_ namespace: (OFString*)ns; /*! + * @brief Creates a new, autoreleased unbound namespace exception. + * * @param class_ The class of the object which caused the exception * @param prefix The prefix which is unbound - * @return A new unbound namespace exception + * @return A new, autoreleased unbound namespace exception */ + (instancetype)exceptionWithClass: (Class)class_ prefix: (OFString*)prefix; /*! - * Initializes an already allocated unbound namespace exception + * @brief Initializes an already allocated unbound namespace exception. * * @param class_ The class of the object which caused the exception * @param ns The namespace which is unbound * @return An initialized unbound namespace exception */ - initWithClass: (Class)class_ namespace: (OFString*)ns; /*! - * Initializes an already allocated unbound namespace exception + * @brief Initializes an already allocated unbound namespace exception. * * @param class_ The class of the object which caused the exception * @param prefix The prefix which is unbound * @return An initialized unbound namespace exception */ - initWithClass: (Class)class_ prefix: (OFString*)prefix; /*! + * @brief Returns the unbound namespace. + * * @return The unbound namespace */ - (OFString*)namespace; /*! + * @brief Returns the unbound prefix. + * * @return The unbound prefix */ - (OFString*)prefix; @end Index: src/exceptions/OFUnlockFailedException.h ================================================================== --- src/exceptions/OFUnlockFailedException.h +++ src/exceptions/OFUnlockFailedException.h @@ -28,27 +28,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id lock; #endif /*! + * @brief Creates a new, autoreleased unlock failed exception. + * * @param class_ The class of the object which caused the exception * @param lock The lock which could not be unlocked - * @return A new unlock failed exception + * @return A new, autoreleased unlock failed exception */ + (instancetype)exceptionWithClass: (Class)class_ lock: (id )lock; /*! - * Initializes an already allocated unlock failed exception. + * @brief Initializes an already allocated unlock failed exception. * * @param class_ The class of the object which caused the exception * @param lock The lock which could not be unlocked * @return An initialized unlock failed exception */ - initWithClass: (Class)class_ lock: (id )lock; /*! + * @brief Returns the lock which could not be unlocked. + * * @return The lock which could not be unlocked */ - (id )lock; @end Index: src/exceptions/OFUnsupportedProtocolException.h ================================================================== --- src/exceptions/OFUnsupportedProtocolException.h +++ src/exceptions/OFUnsupportedProtocolException.h @@ -30,27 +30,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFURL *URL; #endif /*! + * @brief Creates a new, autoreleased unsupported protocol exception. + * * @param class_ The class of the object which caused the exception * @param url The URL whose protocol is unsupported - * @return A new unsupported protocol exception + * @return A new, autoreleased unsupported protocol exception */ + (instancetype)exceptionWithClass: (Class)class_ URL: (OFURL*)url; /*! - * Initializes an already allocated unsupported protocol exception + * @brief Initializes an already allocated unsupported protocol exception * * @param class_ The class of the object which caused the exception * @param url The URL whose protocol is unsupported * @return An initialized unsupported protocol exception */ - initWithClass: (Class)class_ URL: (OFURL*)url; /*! + * @brief Returns the URL whose protocol is unsupported. + * * @return The URL whose protocol is unsupported */ - (OFURL*)URL; @end Index: src/exceptions/OFUnsupportedVersionException.h ================================================================== --- src/exceptions/OFUnsupportedVersionException.h +++ src/exceptions/OFUnsupportedVersionException.h @@ -28,27 +28,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *version; #endif /*! + * @brief Creates a new, autoreleased unsupported version exception. + * * @param class_ The class of the object which caused the exception * @param version The version which is unsupported - * @return A new unsupported version exception + * @return A new, autoreleased unsupported version exception */ + (instancetype)exceptionWithClass: (Class)class_ version: (OFString*)version; /*! - * Initializes an already allocated unsupported protocol exception + * @brief Initializes an already allocated unsupported protocol exception. * * @param class_ The class of the object which caused the exception * @param version The version which is unsupported * @return An initialized unsupported version exception */ - initWithClass: (Class)class_ version: (OFString*)version; /*! + * @brief Returns the version which is unsupported. + * * @return The version which is unsupported */ - (OFString*)version; @end