Index: src/OFMutableArray.h ================================================================== --- src/OFMutableArray.h +++ src/OFMutableArray.h @@ -13,11 +13,11 @@ /** * The OFMutableArray class provides a class for storing, adding and removing * objects in an array. */ -@interface OFMutableArray: OFArray +@interface OFMutableArray: OFArray {} /** * Adds an object to the OFDataArray. * * \param obj An object to add */ Index: src/OFMutableDictionary.h ================================================================== --- src/OFMutableDictionary.h +++ src/OFMutableDictionary.h @@ -12,11 +12,11 @@ #import "OFDictionary.h" /** * The OFMutableDictionary class provides a class for using mutable hash tables. */ -@interface OFMutableDictionary: OFDictionary +@interface OFMutableDictionary: OFDictionary {} /** * Sets a key to an object. A key can be any object. * * \param key The key to set * \param obj The object to set the key to Index: src/OFMutableString.h ================================================================== --- src/OFMutableString.h +++ src/OFMutableString.h @@ -15,11 +15,11 @@ #import "OFString.h" /** * A class for storing and modifying strings. */ -@interface OFMutableString: OFString +@interface OFMutableString: OFString {} /** * Sets the OFString to the specified OFString. * * \param str An OFString to set the OFString to. */ Index: src/OFNumber.h ================================================================== --- src/OFNumber.h +++ src/OFNumber.h @@ -39,11 +39,11 @@ OF_NUMBER_FLOAT, OF_NUMBER_DOUBLE, }; /** - * The OFNumber class provides a way to store a number in an object and + * The OFNumber class provides a way to store a number in an object and to * manipulate it. */ @interface OFNumber: OFObject { union { @@ -73,89 +73,505 @@ double double_; } value; enum of_number_type type; } +/** + * \param char_ A char which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithChar: (char)char_; + +/** + * \param short_ A short which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithShort: (short)short_; + +/** + * \param int_ An int which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithInt: (int)int_; + +/** + * \param long_ A long which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithLong: (long)long_; + +/** + * \param uchar An unsigned char which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUChar: (unsigned char)uchar; + +/** + * \param ushort An unsigned short which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUShort: (unsigned short)ushort; + +/** + * \param uint An unsigned int which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUInt: (unsigned int)uint; + +/** + * \param ulong An unsigned long which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithULong: (unsigned long)ulong; + +/** + * \param int8 An int8_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithInt8: (int8_t)int8; + +/** + * \param int16 An int16_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithInt16: (int16_t)int16; + +/** + * \param int32 An int32_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithInt32: (int32_t)int32; + +/** + * \param int64 An int64_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithInt64: (int64_t)int64; + +/** + * \param uint8 An uint8_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUInt8: (uint8_t)uint8; + +/** + * \param uint16 An uint16_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUInt16: (uint16_t)uint16; + +/** + * \param uint32 An uint32_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUInt32: (uint32_t)uint32; + +/** + * \param uint64 An uint64_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUInt64: (uint64_t)uint64; + +/** + * \param size A size_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithSize: (size_t)size; + +/** + * \param ssize An ssize_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithSSize: (ssize_t)ssize; + +/** + * \param intmax An intmax_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithIntMax: (intmax_t)intmax; + +/** + * \param uintmax An uintmax_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithUIntMax: (uintmax_t)uintmax; + +/** + * \param ptrdifff A ptrdiff_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithPtrDiff: (ptrdiff_t)ptrdiff; + +/** + * \param intptr An intptr_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithIntPtr: (intptr_t)intptr; + +/** + * \param float_ A float which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithFloat: (float)float_; + +/** + * \param double_ A double which the OFNumber should contain + * \return A new autoreleased OFNumber + */ + numberWithDouble: (double)double_; +/** + * Initializes an already allocated OFNumber with the specified char. + * + * \param char_ A char which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithChar: (char)char_; + +/** + * Initializes an already allocated OFNumber with the specified short. + * + * \param short_ A short which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithShort: (short)short_; + +/** + * Initializes an already allocated OFNumber with the specified int. + * + * \param int_ An int which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithInt: (int)int_; + +/** + * Initializes an already allocated OFNumber with the specified long. + * + * \param long_ A long which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithLong: (long)long_; + +/** + * Initializes an already allocated OFNumber with the specified unsigned char. + * + * \param uchar An unsigned char which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUChar: (unsigned char)uchar; + +/** + * Initializes an already allocated OFNumber with the specified unsigned short. + * + * \param ushort An unsigned short which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUShort: (unsigned short)ushort; + +/** + * Initializes an already allocated OFNumber with the specified unsigned int . + * + * \param uint An unsigned int which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUInt: (unsigned int)uint; + +/** + * Initializes an already allocated OFNumber with the specified unsigned long. + * + * \param ulong An unsigned long which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithULong: (unsigned long)ulong; + +/** + * Initializes an already allocated OFNumber with the specified int8_t. + * + * \param int8 An int8_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithInt8: (int8_t)int8; + +/** + * Initializes an already allocated OFNumber with the specified int16_t. + * + * \param int16 An int16_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithInt16: (int16_t)int16; + +/** + * Initializes an already allocated OFNumber with the specified int32_t. + * + * \param int32 An int32_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithInt32: (int32_t)int32; + +/** + * Initializes an already allocated OFNumber with the specified int64_t. + * + * \param int64 An int64_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithInt64: (int64_t)int64; + +/** + * Initializes an already allocated OFNumber with the specified uint8_t. + * + * \param uint8 An uint8_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUInt8: (uint8_t)uint8; + +/** + * Initializes an already allocated OFNumber with the specified uint16_t. + * + * \param uint16 An uint16_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUInt16: (uint16_t)uint16; + +/** + * Initializes an already allocated OFNumber with the specified uint32_t. + * + * \param uint32 An uint32_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUInt32: (uint32_t)uint32; + +/** + * Initializes an already allocated OFNumber with the specified uint64_t. + * + * \param uint64 An uint64_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUInt64: (uint64_t)uint64; + +/** + * Initializes an already allocated OFNumber with the specified size_t. + * + * \param size A size_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithSize: (size_t)size; + +/** + * Initializes an already allocated OFNumber with the specified ssize_t. + * + * \param ssize An ssize_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithSSize: (ssize_t)ssize; + +/** + * Initializes an already allocated OFNumber with the specified intmax_t. + * + * \param intmax An intmax_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithIntMax: (intmax_t)intmax; + +/** + * Initializes an already allocated OFNumber with the specified uintmax_t. + * + * \param uintmax An uintmax_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithUIntMax: (uintmax_t)uintmax; + +/** + * Initializes an already allocated OFNumber with the specified ptrdiff_t. + * + * \param ptrdiff A ptrdiff_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithPtrDiff: (ptrdiff_t)ptrdiff; + +/** + * Initializes an already allocated OFNumber with the specified intptr_t. + * + * \param intptr An intptr_t which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithIntPtr: (intptr_t)intptr; + +/** + * Initializes an already allocated OFNumber with the specified float. + * + * \param float_ A float which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithFloat: (float)float_; + +/** + * Initializes an already allocated OFNumber with the specified double. + * + * \param double_ A double which the OFNumber should contain + * \return An initialized OFNumber + */ - initWithDouble: (double)double_; +/** + * \return An enum of type of_number_type indicating the type of contained + * number of the OFNumber + */ - (enum of_number_type)type; +/** + * \return The OFNumber as a char + */ - (char)asChar; + +/** + * \return The OFNumber as a short + */ - (short)asShort; + +/** + * \return The OFNumber as an int + */ - (int)asInt; + +/** + * \return The OFNumber as a long + */ - (long)asLong; + +/** + * \return The OFNumber as an unsigned char + */ - (unsigned char)asUChar; + +/** + * \return The OFNumber as an unsigned short + */ - (unsigned short)asUShort; + +/** + * \return The OFNumber as an unsigned int + */ - (unsigned int)asUInt; + +/** + * \return The OFNumber as an unsigned long + */ - (unsigned long)asULong; + +/** + * \return The OFNumber as an int8_t + */ - (int8_t)asInt8; + +/** + * \return The OFNumber as an int16_t + */ - (int16_t)asInt16; + +/** + * \return The OFNumber as an int32_t + */ - (int32_t)asInt32; + +/** + * \return The OFNumber as an int64_t + */ - (int64_t)asInt64; + +/** + * \return The OFNumber as an uint8_t + */ - (uint8_t)asUInt8; + +/** + * \return The OFNumber as an uint16_t + */ - (uint16_t)asUInt16; + +/** + * \return The OFNumber as an uint32_t + */ - (uint32_t)asUInt32; + +/** + * \return The OFNumber as an uint64_t + */ - (uint64_t)asUInt64; + +/** + * \return The OFNumber as a size_t + */ - (size_t)asSize; + +/** + * \return The OFNumber as an ssize_t + */ - (ssize_t)asSSize; + +/** + * \return The OFNumber as an intmax_t + */ - (intmax_t)asIntMax; + +/** + * \return The OFNumber as an uintmax_t + */ - (uintmax_t)asUIntMax; + +/** + * \return The OFNumber as a ptrdiff_t + */ - (ptrdiff_t)asPtrDiff; + +/** + * \return The OFNumber as an intptr_t + */ - (intptr_t)asIntPtr; + +/** + * \return The OFNumber as a float + */ - (float)asFloat; + +/** + * \return The OFNumber as a double + */ - (double)asDouble; +/** + * Adds the specified OFNumber to the OFNumber. + * + * \param num The OFNumber to add + */ - add: (OFNumber*)num; + +/** + * Subtracts the specified OFNumber from the OFNumber. + * + * \param num The OFNumber to substract + */ - subtract: (OFNumber*)num; + +/** + * Multiplies the OFNumber with the specified OFNumber. + * + * \param num The OFNumber to multiply with + */ - multiplyWith: (OFNumber*)num; + +/** + * Divides the OFNumber by the specified OFNumber. + * + * \param num The OFNumber to divide by + */ - divideBy: (OFNumber*)num; + +/** + * Increases the OFNumber by 1. + */ - increase; + +/** + * Decreases the OFNumber by 1. + */ - decrease; @end Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -36,11 +36,11 @@ */ - (size_t)readNBytes: (size_t)size intoBuffer: (char*)buf; /** - * Read until a newline or \0 occurs. + * Read until a newline, \\0 or end of stream occurs. * * If you want to use readNBytes afterwards again, you have to clear the cache * before and optionally get the cache before clearing it! * * \return The line that was read, autoreleased, or nil if the end of the Index: src/OFThread.h ================================================================== --- src/OFThread.h +++ src/OFThread.h @@ -62,11 +62,11 @@ #endif } /** * \param obj An object that is passed to the main method as a copy or nil - * \return A new, autoreleased thread + * \return A new autoreleased thread */ + threadWithObject: (id)obj; /** * Sets the Thread Local Storage for the specified key. @@ -123,11 +123,11 @@ CRITICAL_SECTION mutex; #endif } /** - * \return A new, autoreleased mutex. + * \return A new autoreleased mutex. */ + mutex; /** * Locks the mutex. Index: src/OFURLEncoding.h ================================================================== --- src/OFURLEncoding.h +++ src/OFURLEncoding.h @@ -19,16 +19,16 @@ */ @interface OFString (OFURLEncoding) /** * Encodes a string for use in a URL. * - * \return A new, autoreleased string + * \return A new autoreleased string */ - (OFString*)stringByURLEncoding; /** * Decodes a string used in a URL. * - * \return A new, autoreleased string + * \return A new autoreleased string */ - (OFString*)stringByURLDecoding; @end Index: src/OFXMLElement.h ================================================================== --- src/OFXMLElement.h +++ src/OFXMLElement.h @@ -14,28 +14,87 @@ #import "OFDictionary.h" #import "OFArray.h" extern int _OFXMLElement_reference; +/** + * The OFXMLElement represents an XML element as an object which can be + * modified and converted back to XML again. + */ @interface OFXMLElement: OFObject { OFString *name; OFDictionary *attrs; OFString *stringval; OFArray *children; } +/** + * \param name The name for the element + * \return A new autorelease OFXMLElement with the specified element name + */ + elementWithName: (OFString*)name; + +/** + * \param name The name for the element + * \param stringval The value for the element + * \return A new autorelease OFXMLElement with the specified element name and + * value + */ + elementWithName: (OFString*)name andStringValue: (OFString*)stringval; + +/** + * Initializes an already allocated OFXMLElement with the specified name. + * + * \param name The name for the element + * \return An initialized OFXMLElement with the specified element name + */ - initWithName: (OFString*)name; + +/** + * Initializes an already allocated OFXMLElement with the specified name and + * value. + * + * \param name The name for the element + * \param stringval The value for the element + * \return An initialized OFXMLElement with the specified element name and + * value + */ - initWithName: (OFString*)name andStringValue: (OFString*)stringval; + +/** + * \return A new autoreleased OFString representing the OFXMLElement as an + * XML string + */ - (OFString*)string; + +/** + * Adds the specified attribute with the specified value. + * + * \param name The name of the attribute + * \param value The value of the attribute + */ - addAttributeWithName: (OFString*)name andValue: (OFString*)value; + +/** + * Adds a child to the OFXMLElement. + * + * \param child Another OFXMLElement which is added as a child + */ - addChild: (OFXMLElement*)child; @end +/** + * The OFXMLEscaping category provides an easy way to escape strings for use in + * an XML document. + */ @interface OFString (OFXMLEscaping) +/** + * Escapes a string for use in an XML document. + * + * \return A new autoreleased string + */ - stringByXMLEscaping; @end