Index: src/OFDataArray.h ================================================================== --- src/OFDataArray.h +++ src/OFDataArray.h @@ -48,11 +48,12 @@ * @return A new autoreleased OFDataArray */ + (instancetype)dataArray; /*! - * @brief Creates a new OFDataArray whose items all have the same size. + * @brief Creates a new OFDataArray whose items all have the same specified + * size. * * @param itemSize The size of a single element in the OFDataArray * @return A new autoreleased OFDataArray */ + (instancetype)dataArrayWithItemSize: (size_t)itemSize; Index: src/OFFile.h ================================================================== --- src/OFFile.h +++ src/OFFile.h @@ -271,11 +271,24 @@ @end #ifdef __cplusplus extern "C" { #endif +/*! @file */ + +/*! + * @brief The standard input stream. + */ extern OFStream *of_stdin; + +/*! + * @brief The standard output stream. + */ extern OFStream *of_stdout; + +/*! + * @brief The standard error stream. + */ extern OFStream *of_stderr; #ifdef __cplusplus } #endif Index: src/OFHTTPRequest.h ================================================================== --- src/OFHTTPRequest.h +++ src/OFHTTPRequest.h @@ -19,13 +19,21 @@ @class OFURL; @class OFDictionary; @class OFDataArray; @class OFString; +/*! @file */ + +/*! + * @brief The type of an HTTP request. + */ typedef enum of_http_request_type_t { + /*! GET */ OF_HTTP_REQUEST_TYPE_GET, + /*! POST */ OF_HTTP_REQUEST_TYPE_POST, + /*! HEAD */ OF_HTTP_REQUEST_TYPE_HEAD } of_http_request_type_t; /*! * @brief A class for storing HTTP requests. Index: src/OFNumber.h ================================================================== --- src/OFNumber.h +++ src/OFNumber.h @@ -25,40 +25,68 @@ #import "OFObject.h" #import "OFSerialization.h" #import "OFJSONRepresentation.h" +/*! @file */ + /*! - * @brief The type of a number. + * @brief The C type of a number stored in an OFNumber. */ typedef enum of_number_type_t { + /*! BOOL */ OF_NUMBER_BOOL = 0x01, + /*! unsigned char */ OF_NUMBER_UCHAR = 0x02, + /*! unsigned short */ OF_NUMBER_USHORT = 0x03, + /*! unsigned int */ OF_NUMBER_UINT = 0x04, + /*! unsigned long */ OF_NUMBER_ULONG = 0x05, + /*! size_t */ OF_NUMBER_SIZE = 0x06, + /*! uint8_t */ OF_NUMBER_UINT8 = 0x07, + /*! uint16_t */ OF_NUMBER_UINT16 = 0x08, + /*! uint32_t */ OF_NUMBER_UINT32 = 0x09, + /*! uint64_t */ OF_NUMBER_UINT64 = 0x0A, + /*! uintptr_t */ OF_NUMBER_UINTPTR = 0x0B, + /*! uintmax_t */ OF_NUMBER_UINTMAX = 0x0C, OF_NUMBER_SIGNED = 0x10, + /*! signed char */ OF_NUMBER_CHAR = OF_NUMBER_UCHAR | OF_NUMBER_SIGNED, + /*! signed short */ OF_NUMBER_SHORT = OF_NUMBER_USHORT | OF_NUMBER_SIGNED, + /*! signed int */ OF_NUMBER_INT = OF_NUMBER_UINT | OF_NUMBER_SIGNED, + /*! signed long */ OF_NUMBER_LONG = OF_NUMBER_ULONG | OF_NUMBER_SIGNED, + /*! int8_t */ OF_NUMBER_INT8 = OF_NUMBER_UINT8 | OF_NUMBER_SIGNED, + /*! int16_t */ OF_NUMBER_INT16 = OF_NUMBER_UINT16 | OF_NUMBER_SIGNED, + /*! int32_t */ OF_NUMBER_INT32 = OF_NUMBER_UINT32 | OF_NUMBER_SIGNED, + /*! int64_t */ OF_NUMBER_INT64 = OF_NUMBER_UINT64 | OF_NUMBER_SIGNED, + /*! ssize_t */ OF_NUMBER_SSIZE = OF_NUMBER_SIZE | OF_NUMBER_SIGNED, + /*! intmax_t */ OF_NUMBER_INTMAX = OF_NUMBER_UINTMAX | OF_NUMBER_SIGNED, + /*! ptrdiff_t */ OF_NUMBER_PTRDIFF = 0x0D | OF_NUMBER_SIGNED, + /*! intptr_t */ OF_NUMBER_INTPTR = 0x0E | OF_NUMBER_SIGNED, + /*! float */ OF_NUMBER_FLOAT = 0x20, + /*! double */ OF_NUMBER_DOUBLE = 0x40 | OF_NUMBER_FLOAT, } of_number_type_t; /*! * @brief Provides a way to store a number in an object. Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -102,70 +102,72 @@ #endif #define OF_RETAIN_COUNT_MAX UINT_MAX #define OF_NOT_FOUND SIZE_MAX +/*! @file */ + /*! * @brief A result of a comparison. */ typedef enum of_comparison_result_t { - /// The left object is smaller than the right + /*! The left object is smaller than the right */ OF_ORDERED_ASCENDING = -1, - /// Both objects are equal + /*! Both objects are equal */ OF_ORDERED_SAME = 0, - /// The left object is bigger than the right + /*! The left object is bigger than the right */ OF_ORDERED_DESCENDING = 1 } of_comparison_result_t; /*! * @brief An enum for storing endianess. */ typedef enum of_byte_order_t { - /// Most significant byte first (big endian) + /*! Most significant byte first (big endian) */ OF_BYTE_ORDER_BIG_ENDIAN, - /// Least significant byte first (little endian) + /*! Least significant byte first (little endian) */ OF_BYTE_ORDER_LITTLE_ENDIAN } of_byte_order_t; /*! * @brief A range. */ typedef struct of_range_t { - /// The start of the range + /*! The start of the range */ size_t location; - /// The length of the range + /*! The length of the range */ size_t length; } of_range_t; /*! * @brief A point. */ typedef struct of_point_t { - /// The x coordinate of the point + /*! The x coordinate of the point */ float x; - /// The y coordinate of the point + /*! The y coordinate of the point */ float y; } of_point_t; /*! * @brief A dimension. */ typedef struct of_dimension_t { - /// The width of the dimension + /*! The width of the dimension */ float width; - /// The height of the dimension + /*! 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 + /*! The point from where the rectangle originates */ of_point_t origin; - /// The size of the rectangle + /*! The size of the rectangle */ of_dimension_t size; } of_rectangle_t; @class OFString; @class OFThread; Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -37,19 +37,27 @@ typedef uint_least16_t of_char16_t; typedef uint_least32_t of_char32_t; #endif typedef of_char32_t of_unichar_t; +/*! @file */ + /*! * @brief The encoding of a string. */ typedef enum of_string_encoding_t { + /*! UTF-8 */ OF_STRING_ENCODING_UTF_8, + /*! ASCII */ OF_STRING_ENCODING_ASCII, + /*! ISO 8859-1 */ OF_STRING_ENCODING_ISO_8859_1, + /*! ISO 8859-15 */ OF_STRING_ENCODING_ISO_8859_15, + /*! Windows-1252 */ OF_STRING_ENCODING_WINDOWS_1252, + /*! Try to automatically detect the encoding */ OF_STRING_ENCODING_AUTODETECT = 0xFF } of_string_encoding_t; enum { OF_STRING_SEARCH_BACKWARDS = 1,