Index: src/OFApplication.h ================================================================== --- src/OFApplication.h +++ src/OFApplication.h @@ -27,83 +27,83 @@ main(int argc, char *argv[]) \ { \ return of_application_main(&argc, &argv, [cls class]); \ } -/** - * \brief A protocol for delegates of OFApplication. +/*! + * @brief A protocol for delegates of OFApplication. */ #ifndef OF_APPLICATION_M @protocol OFApplicationDelegate #else @protocol OFApplicationDelegate #endif -/** - * \brief A method which is called when the application was initialized and is +/*! + * @brief A method which is called when the application was initialized and is * running now. */ - (void)applicationDidFinishLaunching; #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional #endif -/** - * \brief A method which is called when the application will terminate. +/*! + * @brief A method which is called when the application will terminate. */ - (void)applicationWillTerminate; -/** - * \brief A method which is called when the application received a SIGINT. +/*! + * @brief A method which is called when the application received a SIGINT. * - * \warning You are not allowed to send any messages inside this method, as + * @warning You are not allowed to send any messages inside this method, as * message dispatching is not signal-safe! You are only allowed to do * signal-safe operations like setting a variable or calling a * signal-safe function! */ - (void)applicationDidReceiveSIGINT; #ifndef _WIN32 -/** - * \brief A method which is called when the application received a SIGHUP. +/*! + * @brief A method which is called when the application received a SIGHUP. * * This signal is not available on Windows. * - * \warning You are not allowed to send any messages inside this method, as + * @warning You are not allowed to send any messages inside this method, as * message dispatching is not signal-safe! You are only allowed to do * signal-safe operations like setting a variable or calling a * signal-safe function! */ - (void)applicationDidReceiveSIGHUP; -/** - * \brief A method which is called when the application received a SIGUSR1. +/*! + * @brief A method which is called when the application received a SIGUSR1. * * This signal is not available on Windows. * - * \warning You are not allowed to send any messages inside this method, as + * @warning You are not allowed to send any messages inside this method, as * message dispatching is not signal-safe! You are only allowed to do * signal-safe operations like setting a variable or calling a * signal-safe function! */ - (void)applicationDidReceiveSIGUSR1; -/** - * \brief A method which is called when the application received a SIGUSR2. +/*! + * @brief A method which is called when the application received a SIGUSR2. * * This signal is not available on Windows. * - * \warning You are not allowed to send any messages inside this method, as + * @warning You are not allowed to send any messages inside this method, as * message dispatching is not signal-safe! You are only allowed to do * signal-safe operations like setting a variable or calling a * signal-safe function! */ - (void)applicationDidReceiveSIGUSR2; #endif @end -/** - * \brief Represents the application as an object. +/*! + * @brief Represents the application as an object. */ @interface OFApplication: OFObject { OFString *programName; OFMutableArray *arguments; @@ -125,121 +125,121 @@ @property (readonly, copy, nonatomic) OFArray *arguments; @property (readonly, copy, nonatomic) OFDictionary *environment; @property (assign) id delegate; #endif -/** - * \brief Returns the only OFApplication instance in the application. +/*! + * @brief Returns the only OFApplication instance in the application. * - * \return The only OFApplication instance in the application + * @return The only OFApplication instance in the application */ + (OFApplication*)sharedApplication; -/** - * \brief Returns the name of the program (argv[0]). +/*! + * @brief Returns the name of the program (argv[0]). * - * \return The name of the program (argv[0]) + * @return The name of the program (argv[0]) */ + (OFString*)programName; -/** - * \brief Returns the arguments passed to the application. +/*! + * @brief Returns the arguments passed to the application. * - * \return The arguments passed to the application + * @return The arguments passed to the application */ + (OFArray*)arguments; -/** - * \brief Returns the environment of the application. +/*! + * @brief Returns the environment of the application. * - * \return The environment of the application + * @return The environment of the application */ + (OFDictionary*)environment; -/** - * \brief Terminates the application. +/*! + * @brief Terminates the application. */ + (void)terminate; -/** - * \brief Terminates the application with the specified status. +/*! + * @brief Terminates the application with the specified status. * - * \param status The status with which the application will terminate + * @param status The status with which the application will terminate */ + (void)terminateWithStatus: (int)status; -/** - * \brief Sets argc and argv. +/*! + * @brief Sets argc and argv. * * You should not call this directly, but use OF_APPLICATION_DELEGATE instead! * - * \param argc The number of arguments - * \param argv The argument values + * @param argc The number of arguments + * @param argv The argument values */ - (void)setArgumentCount: (int*)argc andArgumentValues: (char**[])argv; -/** - * \brief Gets args and argv. +/*! + * @brief Gets args and argv. * - * \param argc A pointer where a pointer to argc should be stored - * \param argv A pointer where a pointer to argv should be stored + * @param argc A pointer where a pointer to argc should be stored + * @param argv A pointer where a pointer to argv should be stored */ - (void)getArgumentCount: (int**)argc andArgumentValues: (char***[])argv; -/** - * \brief Returns the name of the program (argv[0]). +/*! + * @brief Returns the name of the program (argv[0]). * - * \return The name of the program (argv[0]) + * @return The name of the program (argv[0]) */ - (OFString*)programName; -/** - * \brief Returns the arguments passed to the application. +/*! + * @brief Returns the arguments passed to the application. * - * \return The arguments passed to the application + * @return The arguments passed to the application */ - (OFArray*)arguments; -/** - * \brief Returns the environment of the application. +/*! + * @brief Returns the environment of the application. * - * \return The environment of the application + * @return The environment of the application */ - (OFDictionary*)environment; -/** - * \brief Returns the delegate of the application. +/*! + * @brief Returns the delegate of the application. * - * \return The delegate of the application + * @return The delegate of the application */ - (id )delegate; -/** - * \brief Sets the delegate of the application. +/*! + * @brief Sets the delegate of the application. * - * \param delegate The delegate for the application + * @param delegate The delegate for the application */ - (void)setDelegate: (id )delegate; -/** - * \brief Starts the application after everything has been initialized. +/*! + * @brief Starts the application after everything has been initialized. * * You should not call this directly, but use OF_APPLICATION_DELEGATE instead! */ - (void)run; -/** - * \brief Terminates the application. +/*! + * @brief Terminates the application. */ - (void)terminate; -/** - * \brief Terminates the application with the specified status. +/*! + * @brief Terminates the application with the specified status. * - * \param status The status with which the application will terminate + * @param status The status with which the application will terminate */ - (void)terminateWithStatus: (int)status; @end @interface OFObject (OFApplicationDelegate) Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -37,295 +37,295 @@ typedef BOOL (^of_array_filter_block_t)(id odject, size_t index); typedef id (^of_array_map_block_t)(id object, size_t index); typedef id (^of_array_fold_block_t)(id left, id right); #endif -/** - * \brief An abstract class for storing objects in an array. +/*! + * @brief An abstract class for storing objects in an array. */ @interface OFArray: OFObject #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t count; #endif -/** - * \brief Creates a new OFArray. +/*! + * @brief Creates a new OFArray. * - * \return A new autoreleased OFArray + * @return A new autoreleased OFArray */ + (instancetype)array; -/** - * \brief Creates a new OFArray with the specified object. +/*! + * @brief Creates a new OFArray with the specified object. * - * \param object An object - * \return A new autoreleased OFArray + * @param object An object + * @return A new autoreleased OFArray */ + (instancetype)arrayWithObject: (id)object; -/** - * \brief Creates a new OFArray with the specified objects, terminated by nil. +/*! + * @brief Creates a new OFArray with the specified objects, terminated by nil. * - * \param firstObject The first object in the array - * \return A new autoreleased OFArray + * @param firstObject The first object in the array + * @return A new autoreleased OFArray */ + (instancetype)arrayWithObjects: (id)firstObject, ... OF_SENTINEL; -/** - * \brief Creates a new OFArray with the objects from the specified array. +/*! + * @brief Creates a new OFArray with the objects from the specified array. * - * \param array An array - * \return A new autoreleased OFArray + * @param array An array + * @return A new autoreleased OFArray */ + (instancetype)arrayWithArray: (OFArray*)array; -/** - * \brief Creates a new OFArray with the objects from the specified C array of +/*! + * @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 - * \return A new autoreleased OFArray + * @param objects A C array of objects + * @param length The length of the C array + * @return A new autoreleased OFArray */ + (instancetype)arrayWithObjects: (id const*)objects count: (size_t)count; -/** - * \brief Initializes an OFArray with the specified object. +/*! + * @brief Initializes an OFArray with the specified object. * - * \param object An object - * \return An initialized OFArray + * @param object An object + * @return An initialized OFArray */ - initWithObject: (id)object; -/** - * \brief Initializes an OFArray with the specified objects. +/*! + * @brief Initializes an OFArray with the specified objects. * - * \param firstObject The first object - * \return An initialized OFArray + * @param firstObject The first object + * @return An initialized OFArray */ - initWithObjects: (id)firstObject, ... OF_SENTINEL; -/** - * \brief Initializes an OFArray with the specified object and a va_list. +/*! + * @brief Initializes an OFArray with the specified object and a va_list. * - * \param firstObject The first object - * \param arguments A va_list - * \return An initialized OFArray + * @param firstObject The first object + * @param arguments A va_list + * @return An initialized OFArray */ - initWithObject: (id)firstObject arguments: (va_list)arguments; -/** - * \brief Initializes an OFArray with the objects from the specified array. +/*! + * @brief Initializes an OFArray with the objects from the specified array. * - * \param array An array - * \return An initialized OFArray + * @param array An array + * @return An initialized OFArray */ - initWithArray: (OFArray*)array; -/** - * \brief Initializes an OFArray with the objects from the specified C array of +/*! + * @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 - * \return An initialized OFArray + * @param objects A C array of objects + * @param length The length of the C array + * @return An initialized OFArray */ - initWithObjects: (id const*)objects count: (size_t)count; -/** - * \brief Returns a specified object of the array. +/*! + * @brief Returns a specified object of the array. * * The returned object is not retained and autoreleased for performance * reasons! * - * \param index The number of the object to return - * \return The specified object of the OFArray + * @param index The number of the object to return + * @return The specified object of the OFArray */ - (id)objectAtIndex: (size_t)index; - (id)objectAtIndexedSubscript: (size_t)index; -/** - * \brief Copies the objects at the specified range to the specified buffer. +/*! + * @brief Copies the objects at the specified range to the specified buffer. * - * \param buffer The buffer to copy the objects to - * \param range The range to copy + * @param buffer The buffer to copy the objects to + * @param range The range to copy */ - (void)getObjects: (__unsafe_unretained id*)buffer inRange: (of_range_t)range; -/** - * \brief Returns the objects of the array as a C array. - * - * \return The objects of the array as a C array - */ -- (id*)objects; - -/** - * \brief Returns the index of the first object that is equivalent to the - * specified object or OF_NOT_FOUND if it was not found. - * - * \param object The object whose index is returned - * \return The index of the first object equivalent to the specified object - * or OF_NOT_FOUND if it was not found - */ -- (size_t)indexOfObject: (id)object; - -/** - * \brief Returns the index of the first object that has the same address as the - * specified object or OF_NOT_FOUND if it was not found. - * - * \param object The object whose index is returned - * \return The index of the first object that has the same aaddress as - * the specified object or OF_NOT_FOUND if it was not found - */ -- (size_t)indexOfObjectIdenticalTo: (id)object; - -/** - * \brief Checks whether the array contains an object with the specified - * address. - * - * \param object The object which is checked for being in the array - * \return A boolean whether the array contains an object with the specified - * address. - */ -- (BOOL)containsObjectIdenticalTo: (id)object; - -/** - * \brief Returns the first object of the array or nil. - * - * The returned object is not retained and autoreleased for performance - * reasons! - * - * \return The first object of the array or nil - */ -- (id)firstObject; - -/** - * \brief Returns the last object of the array or nil. - * - * The returned object is not retained and autoreleased for performance - * reasons! - * - * \return The last object of the array or nil - */ -- (id)lastObject; - -/** - * \brief Returns the objects in the specified range as a new OFArray. - * - * \param range The range for the subarray - * \return The subarray as a new autoreleased OFArray - */ -- (OFArray*)objectsInRange: (of_range_t)range; - -/** - * \brief Creates a string by joining all objects of the array. - * - * \param separator The string with which the objects should be joined - * \return A string containing all objects joined by the separator - */ -- (OFString*)componentsJoinedByString: (OFString*)separator; - -/** - * \brief Creates a string by calling the selector on all objects of the array - * and joining the strings returned by calling the selector. - * - * \param separator The string with which the objects should be joined - * \param selector The selector to perform on the objects - * \return A string containing all objects joined by the separator - */ -- (OFString*)componentsJoinedByString: (OFString*)separator - usingSelector: (SEL)selector; - -/** - * \brief Performs the specified selector on all objects in the array. - * - * \param selector The selector to perform on all objects in the array - */ -- (void)makeObjectsPerformSelector: (SEL)selector; - -/** - * \brief Performs the specified selector on all objects in the array with the - * specified object. - * - * \param selector The selector to perform on all objects in the array - * \param object The object to perform the selector with on all objects in the +/*! + * @brief Returns the objects of the array as a C array. + * + * @return The objects of the array as a C array + */ +- (id*)objects; + +/*! + * @brief Returns the index of the first object that is equivalent to the + * specified object or OF_NOT_FOUND if it was not found. + * + * @param object The object whose index is returned + * @return The index of the first object equivalent to the specified object + * or OF_NOT_FOUND if it was not found + */ +- (size_t)indexOfObject: (id)object; + +/*! + * @brief Returns the index of the first object that has the same address as the + * specified object or OF_NOT_FOUND if it was not found. + * + * @param object The object whose index is returned + * @return The index of the first object that has the same aaddress as + * the specified object or OF_NOT_FOUND if it was not found + */ +- (size_t)indexOfObjectIdenticalTo: (id)object; + +/*! + * @brief Checks whether the array contains an object with the specified + * address. + * + * @param object The object which is checked for being in the array + * @return A boolean whether the array contains an object with the specified + * address. + */ +- (BOOL)containsObjectIdenticalTo: (id)object; + +/*! + * @brief Returns the first object of the array or nil. + * + * The returned object is not retained and autoreleased for performance + * reasons! + * + * @return The first object of the array or nil + */ +- (id)firstObject; + +/*! + * @brief Returns the last object of the array or nil. + * + * The returned object is not retained and autoreleased for performance + * reasons! + * + * @return The last object of the array or nil + */ +- (id)lastObject; + +/*! + * @brief Returns the objects in the specified range as a new OFArray. + * + * @param range The range for the subarray + * @return The subarray as a new autoreleased OFArray + */ +- (OFArray*)objectsInRange: (of_range_t)range; + +/*! + * @brief Creates a string by joining all objects of the array. + * + * @param separator The string with which the objects should be joined + * @return A string containing all objects joined by the separator + */ +- (OFString*)componentsJoinedByString: (OFString*)separator; + +/*! + * @brief Creates a string by calling the selector on all objects of the array + * and joining the strings returned by calling the selector. + * + * @param separator The string with which the objects should be joined + * @param selector The selector to perform on the objects + * @return A string containing all objects joined by the separator + */ +- (OFString*)componentsJoinedByString: (OFString*)separator + usingSelector: (SEL)selector; + +/*! + * @brief Performs the specified selector on all objects in the array. + * + * @param selector The selector to perform on all objects in the array + */ +- (void)makeObjectsPerformSelector: (SEL)selector; + +/*! + * @brief Performs the specified selector on all objects in the array with the + * specified object. + * + * @param selector The selector to perform on all objects in the array + * @param object The object to perform the selector with on all objects in the * array */ - (void)makeObjectsPerformSelector: (SEL)selector withObject: (id)object; -/** - * \brief Returns a sorted copy of the array. +/*! + * @brief Returns a sorted copy of the array. * - * \return A sorted copy of the array + * @return A sorted copy of the array */ - (OFArray*)sortedArray; -/** - * \brief Returns a copy of the array with the order reversed. +/*! + * @brief Returns a copy of the array with the order reversed. * - * \return A copy of the array with the order reversed + * @return A copy of the array with the order reversed */ - (OFArray*)reversedArray; -/** - * \brief Creates a new array with the specified object added. +/*! + * @brief Creates a new array with the specified object added. * - * \param object The object to add - * \return A new array with the specified object added + * @param object The object to add + * @return A new array with the specified object added */ - (OFArray*)arrayByAddingObject: (id)object; -/** - * \brief Creates a new array with the objects from the specified array added. +/*! + * @brief Creates a new array with the objects from the specified array added. * - * \param array The array with objects to add - * \return A new array with the objects from the specified array added + * @param array The array with objects to add + * @return A new array with the objects from the specified array added */ - (OFArray*)arrayByAddingObjectsFromArray: (OFArray*)array; -/** - * \brief Creates a new array with the specified object removed. +/*! + * @brief Creates a new array with the specified object removed. * - * \param object The object to remove - * \return A new array with the specified object removed + * @param object The object to remove + * @return A new array with the specified object removed */ - (OFArray*)arrayByRemovingObject: (id)object; #ifdef OF_HAVE_BLOCKS -/** - * \brief Executes a block for each object. +/*! + * @brief Executes a block for each object. * - * \param block The block to execute for each object + * @param block The block to execute for each object */ - (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block; -/** - * \brief Creates a new array, mapping each object using the specified block. +/*! + * @brief Creates a new array, mapping each object using the specified block. * - * \param block A block which maps an object for each object - * \return A new, autoreleased OFArray + * @param block A block which maps an object for each object + * @return A new, autoreleased OFArray */ - (OFArray*)mappedArrayUsingBlock: (of_array_map_block_t)block; -/** - * \brief Creates a new array, only containing the objects for which the block +/*! + * @brief Creates a new array, only containing the objects for which the block * returns YES. * - * \param block A block which determines if the object should be in the new + * @param block A block which determines if the object should be in the new * array - * \return A new, autoreleased OFArray + * @return A new, autoreleased OFArray */ - (OFArray*)filteredArrayUsingBlock: (of_array_filter_block_t)block; -/** - * \brief Folds the array to a single object using the specified block. +/*! + * @brief Folds the array to a single object using the specified block. * * If the array is empty, it will return nil. * * If there is only one object in the array, that object will be returned and * the block will not be invoked. @@ -332,13 +332,13 @@ * * If there are at least two objects, the block is invoked for each object * except the first, where left is always to what the array has already been * folded and right what should be added to left. * - * \param block A block which folds two objects into one, which is called for + * @param block A block which folds two objects into one, which is called for * all objects except the first - * \return The array folded to a single object + * @return The array folded to a single object */ - (id)foldUsingBlock: (of_array_fold_block_t)block; #endif @end Index: src/OFAutoreleasePool.h ================================================================== --- src/OFAutoreleasePool.h +++ src/OFAutoreleasePool.h @@ -14,12 +14,12 @@ * file. */ #import "OFObject.h" -/** - * \brief A pool that keeps track of objects to release. +/*! + * @brief A pool that keeps track of objects to release. * * The OFAutoreleasePool class is a class that keeps track of objects that will * be released when the autorelease pool is released. * * Every thread has its own stack of autorelease pools. @@ -28,21 +28,21 @@ { void *pool; BOOL ignoreRelease; } -/** - * \brief Adds an object to the autorelease pool at the top of the +/*! + * @brief Adds an object to the autorelease pool at the top of the * thread-specific autorelease pool stack. * - * \param object The object to add to the autorelease pool - * \return The object + * @param object The object to add to the autorelease pool + * @return The object */ + (id)addObject: (id)object; -/** - * \brief Releases all objects in the autorelease pool. +/*! + * @brief Releases all objects in the autorelease pool. * * This does not free the memory allocated to store pointers to the objects in * the pool, so reusing the pool does not allocate any memory until the previous * number of objects is exceeded. It behaves this way to optimize loops that * always work with the same or similar number of objects and call relaseObjects @@ -54,17 +54,17 @@ * have been added to the pool that should be released before the next iteration * of a loop, which adds objects again. Thus, it is usually a clean up call. */ - (void)releaseObjects; -/** - * \brief Releases all objects in the autorelease pool and deallocates the pool. +/*! + * @brief Releases all objects in the autorelease pool and deallocates the pool. */ - (void)release; -/** - * \brief Releases all objects in the autorelease pool and deallocates the pool. +/*! + * @brief Releases all objects in the autorelease pool and deallocates the pool. */ - (void)drain; @end #ifdef __cplusplus Index: src/OFBlock.h ================================================================== --- src/OFBlock.h +++ src/OFBlock.h @@ -44,12 +44,12 @@ #endif #ifndef Block_release # define Block_release(x) _Block_release((const void*)(x)) #endif -/** - * \brief The class for all blocks, since all blocks are also objects. +/*! + * @brief The class for all blocks, since all blocks are also objects. */ @interface OFBlock: OFObject @end @interface OFStackBlock: OFBlock Index: src/OFCollection.h ================================================================== --- src/OFCollection.h +++ src/OFCollection.h @@ -14,29 +14,29 @@ * file. */ #import "OFEnumerator.h" -/** - * \brief A protocol with methods common for all collections. +/*! + * @brief A protocol with methods common for all collections. */ @protocol OFCollection #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t count; #endif -/** - * \brief Returns the number of objects in the collection. +/*! + * @brief Returns the number of objects in the collection. * - * \return The number of objects in the collection + * @return The number of objects in the collection */ - (size_t)count; -/** - * \brief Checks whether the collection contains an object equal to the +/*! + * @brief Checks whether the collection contains an object equal to the * specified object. * - * \param object The object which is checked for being in the collection - * \return A boolean whether the collection contains the specified object + * @param object The object which is checked for being in the collection + * @return A boolean whether the collection contains the specified object */ - (BOOL)containsObject: (id)object; @end Index: src/OFCondition.h ================================================================== --- src/OFCondition.h +++ src/OFCondition.h @@ -14,37 +14,37 @@ * file. */ #import "OFMutex.h" -/** - * \brief A class implementing a condition variable for thread synchronization. +/*! + * @brief A class implementing a condition variable for thread synchronization. */ @interface OFCondition: OFMutex { of_condition_t condition; BOOL conditionInitialized; } -/** - * \brief Creates a new condition. +/*! + * @brief Creates a new condition. * - * \return A new, autoreleased OFCondition + * @return A new, autoreleased OFCondition */ + (instancetype)condition; -/** - * \brief Blocks the current thread until another thread calls -[signal] or +/*! + * @brief Blocks the current thread until another thread calls -[signal] or * -[broadcast]. */ - (void)wait; -/** - * \brief Signals the next waiting thread to continue. +/*! + * @brief Signals the next waiting thread to continue. */ - (void)signal; -/** - * \brief Signals all threads to continue. +/*! + * @brief Signals all threads to continue. */ - (void)broadcast; @end Index: src/OFConstantString.h ================================================================== --- src/OFConstantString.h +++ src/OFConstantString.h @@ -25,14 +25,14 @@ # ifdef __cplusplus } # endif #endif -/** - * \brief A class for storing constant strings using the \@"" literal. +/*! + * @brief A class for storing constant strings using the \@"" literal. */ @interface OFConstantString: OFString { char *cString; size_t cStringLength; } @end Index: src/OFCountedSet.h ================================================================== --- src/OFCountedSet.h +++ src/OFCountedSet.h @@ -19,27 +19,27 @@ #ifdef OF_HAVE_BLOCKS typedef void (^of_counted_set_enumeration_block_t)(id object, size_t count, BOOL *stop); #endif -/** - * \brief An abstract class for a mutable unordered set of objects, counting how +/*! + * @brief An abstract class for a mutable unordered set of objects, counting how * often it contains an object. */ @interface OFCountedSet: OFMutableSet -/** - * \brief Returns how often the object is in the set. +/*! + * @brief Returns how often the object is in the set. * - * \return How often the object is in the set + * @return How often the object is in the set */ - (size_t)countForObject: (id)object; #ifdef OF_HAVE_BLOCKS -/** - * \brief Executes a block for each object in the set. +/*! + * @brief Executes a block for each object in the set. * - * \param block The block to execute for each object in the set + * @param block The block to execute for each object in the set */ - (void)enumerateObjectsAndCountUsingBlock: (of_counted_set_enumeration_block_t)block; #endif @end Index: src/OFDataArray+Hashing.h ================================================================== --- src/OFDataArray+Hashing.h +++ src/OFDataArray+Hashing.h @@ -24,23 +24,23 @@ extern int _OFDataArray_Hashing_reference; #ifdef __cplusplus } #endif -/** - * \brief A category which provides methods to calculate hashes for data arrays. +/*! + * @brief A category which provides methods to calculate hashes for data arrays. */ @interface OFDataArray (Hashing) -/** - * \brief Returns the MD5 hash of the data array as an autoreleased OFString. +/*! + * @brief Returns the MD5 hash of the data array as an autoreleased OFString. * - * \return The MD5 hash of the data array as an autoreleased OFString + * @return The MD5 hash of the data array as an autoreleased OFString */ - (OFString*)MD5Hash; -/** - * \brief Returns the SHA-1 hash of the data array as an autoreleased OFString. +/*! + * @brief Returns the SHA-1 hash of the data array as an autoreleased OFString. * - * \return The SHA-1 hash of the data array as an autoreleased OFString + * @return The SHA-1 hash of the data array as an autoreleased OFString */ - (OFString*)SHA1Hash; @end Index: src/OFDataArray.h ================================================================== --- src/OFDataArray.h +++ src/OFDataArray.h @@ -18,12 +18,12 @@ #import "OFSerialization.h" @class OFString; @class OFURL; -/** - * \brief A class for storing arbitrary data in an array. +/*! + * @brief A class for storing arbitrary data in an array. * * If you plan to store large hunks of data, you should consider using * OFBigDataArray, which allocates the memory in pages rather than in bytes. * * For security reasons, serialization and deserialization is only implemented @@ -40,245 +40,245 @@ @property (readonly, getter=cArray) void *data; @property (readonly) size_t count; @property (readonly) size_t itemSize; #endif -/** - * \brief Creates a new OFDataArray with an item size of 1. +/*! + * @brief Creates a new OFDataArray with an item size of 1. * - * \return A new autoreleased OFDataArray + * @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 size. * - * \param itemSize The size of each element in the OFDataArray - * \return A new autoreleased OFDataArray + * @param itemSize The size of each element in the OFDataArray + * @return A new autoreleased OFDataArray */ + (instancetype)dataArrayWithItemSize: (size_t)itemSize; -/** - * \brief Creates a new OFDataArary with an item size of 1, containing the data +/*! + * @brief Creates a new OFDataArary with an item size of 1, containing the data * of the specified file. * - * \param path The path of the file - * \return A new autoreleased OFDataArray + * @param path The path of the file + * @return A new autoreleased OFDataArray */ + (instancetype)dataArrayWithContentsOfFile: (OFString*)path; -/** - * \brief Creates a new OFDataArray with an item size of 1, containing the data +/*! + * @brief Creates a new OFDataArray with an item size of 1, containing the data * of the specified URL. * - * \param URL The URL to the contents for the OFDataArray - * \return A new autoreleased OFDataArray + * @param URL The URL to the contents for the OFDataArray + * @return A new autoreleased OFDataArray */ + (instancetype)dataArrayWithContentsOfURL: (OFURL*)URL; -/** - * \brief Creates a new OFDataArray with an item size of 1, containing the data +/*! + * @brief Creates a new OFDataArray with an item size of 1, containing the data * of the string representation. * - * \param string The string representation of the data - * \return A new autoreleased OFDataArray + * @param string The string representation of the data + * @return A new autoreleased OFDataArray */ + (instancetype)dataArrayWithStringRepresentation: (OFString*)string; -/** - * \brief Creates a new OFDataArray with an item size of 1, containing the data +/*! + * @brief Creates a new OFDataArray with an item size of 1, containing the data * of the Base64-encoded string. * - * \param string The string with the Base64-encoded data - * \return A new autoreleased OFDataArray + * @param string The string with the Base64-encoded data + * @return A new autoreleased OFDataArray */ + (instancetype)dataArrayWithBase64EncodedString: (OFString*)string; -/** - * \brief Initializes an already allocated OFDataArray with an item size of 1. +/*! + * @brief Initializes an already allocated OFDataArray with an item size of 1. * - * \return A initialized OFDataArray + * @return A initialized OFDataArray */ - init; -/** - * \brief Initializes an already allocated OFDataArray whose items all have the +/*! + * @brief Initializes an already allocated OFDataArray whose items all have the * same size. * - * \param itemSize The size of each element in the OFDataArray - * \return An initialized OFDataArray + * @param itemSize The size of each element in the OFDataArray + * @return An initialized OFDataArray */ - initWithItemSize: (size_t)itemSize; -/** - * \brief Initializes an already allocated OFDataArray with an item size of 1, +/*! + * @brief Initializes an already allocated OFDataArray with an item size of 1, * containing the data of the specified file. * - * \param path The path of the file - * \return An initialized OFDataArray + * @param path The path of the file + * @return An initialized OFDataArray */ - initWithContentsOfFile: (OFString*)path; -/** - * \brief Initializes an already allocated OFDataArray with an item size of 1, +/*! + * @brief Initializes an already allocated OFDataArray with an item size of 1, * containing the data of the specified URL. * - * \param URL The URL to the contents for the OFDataArray - * \return A new autoreleased OFDataArray + * @param URL The URL to the contents for the OFDataArray + * @return A new autoreleased OFDataArray */ - initWithContentsOfURL: (OFURL*)URL; -/** - * \brief Initializes an already allocated OFDataArray with an item size of 1, +/*! + * @brief Initializes an already allocated OFDataArray with an item size of 1, * containing the data of the string representation. * - * \param string The string representation of the data - * \return A new autoreleased OFDataArray + * @param string The string representation of the data + * @return A new autoreleased OFDataArray */ - initWithStringRepresentation: (OFString*)string; -/** - * \brief Initializes an already allocated OFDataArray with an item size of 1, +/*! + * @brief Initializes an already allocated OFDataArray with an item size of 1, * containing the data of the Base64-encoded string. * - * \param string The string with the Base64-encoded data - * \return A initialized OFDataArray + * @param string The string with the Base64-encoded data + * @return A initialized OFDataArray */ - initWithBase64EncodedString: (OFString*)string; -/** - * \brief Returns the number of items in the OFDataArray. +/*! + * @brief Returns the number of items in the OFDataArray. * - * \return The number of items in the OFDataArray + * @return The number of items in the OFDataArray */ - (size_t)count; -/** - * \brief Returns the size of each item in the OFDataArray in bytes. +/*! + * @brief Returns the size of each item in the OFDataArray in bytes. * - * \return The size of each item in the OFDataArray in bytes + * @return The size of each item in the OFDataArray in bytes */ - (size_t)itemSize; -/** - * \brief Returns all elements of the OFDataArray as a C array. +/*! + * @brief Returns all elements of the OFDataArray as a C array. * - * \warning The pointer is only valid until the OFDataArray is changed! + * @warning The pointer is only valid until the OFDataArray is changed! * * Modifying the returned array directly is allowed and will change the contents * of the data array. * - * \return All elements of the OFDataArray as a C array + * @return All elements of the OFDataArray as a C array */ - (void*)cArray OF_RETURNS_INNER_POINTER; -/** - * \brief Returns a specific item of the OFDataArray. +/*! + * @brief Returns a specific item of the OFDataArray. * - * \param index The number of the item to return - * \return The specified item of the OFDataArray + * @param index The number of the item to return + * @return The specified item of the OFDataArray */ - (void*)itemAtIndex: (size_t)index OF_RETURNS_INNER_POINTER; -/** - * \brief Returns the first item of the OFDataArray. +/*! + * @brief Returns the first item of the OFDataArray. * - * \return The first item of the OFDataArray or NULL + * @return The first item of the OFDataArray or NULL */ - (void*)firstItem OF_RETURNS_INNER_POINTER; -/** - * \brief Returns the last item of the OFDataArray. +/*! + * @brief Returns the last item of the OFDataArray. * - * \return The last item of the OFDataArray or NULL + * @return The last item of the OFDataArray or NULL */ - (void*)lastItem OF_RETURNS_INNER_POINTER; -/** - * \brief Adds an item to the OFDataArray. +/*! + * @brief Adds an item to the OFDataArray. * - * \param item A pointer to an arbitrary item + * @param item A pointer to an arbitrary item */ - (void)addItem: (const void*)item; -/** - * \brief Adds an item to the OFDataArray at the specified index. +/*! + * @brief Adds an item to the OFDataArray at the specified index. * - * \param item A pointer to an arbitrary item - * \param index The index where the item should be added + * @param item A pointer to an arbitrary item + * @param index The index where the item should be added */ - (void)insertItem: (const void*)item atIndex: (size_t)index; -/** - * \brief Adds items from a C array to the OFDataArray. +/*! + * @brief Adds items from a C array to the OFDataArray. * - * \param count The number of items to add - * \param cArray A C array containing the items to add + * @param count The number of items to add + * @param cArray A C array containing the items to add */ - (void)addItemsFromCArray: (const void*)cArray count: (size_t)count; -/** - * \brief Adds items from a C array to the OFDataArray at the specified index. +/*! + * @brief Adds items from a C array to the OFDataArray at the specified index. * - * \param cArray A C array containing the items to add - * \param index The index where the items should be added - * \param count The number of items to add + * @param cArray A C array containing the items to add + * @param index The index where the items should be added + * @param count The number of items to add */ - (void)insertItemsFromCArray: (const void*)cArray atIndex: (size_t)index count: (size_t)count; -/** - * \brief Removes the item at the specified index. +/*! + * @brief Removes the item at the specified index. * - * \param index The index of the item to remove + * @param index The index of the item to remove */ - (void)removeItemAtIndex: (size_t)index; -/** - * \brief Removes the specified amount of items at the specified index. +/*! + * @brief Removes the specified amount of items at the specified index. * - * \param range The range of items to remove + * @param range The range of items to remove */ - (void)removeItemsInRange: (of_range_t)range; -/** - * \brief Removes the last item. +/*! + * @brief Removes the last item. */ - (void)removeLastItem; -/** - * \brief Removes all items. +/*! + * @brief Removes all items. */ - (void)removeAllItems; -/** - * \brief Returns the string representation of the data array. +/*! + * @brief Returns the string representation of the data array. * - * \return The string representation of the data array. + * @return The string representation of the data array. */ - (OFString*)stringRepresentation; -/** - * \brief Returns a string containing the data in Base64 encoding. +/*! + * @brief Returns a string containing the data in Base64 encoding. * - * \return A string containing the data in Base64 encoding + * @return A string containing the data in Base64 encoding */ - (OFString*)stringByBase64Encoding; -/** - * \brief Writes the OFDataArray into the specified file. +/*! + * @brief Writes the OFDataArray into the specified file. * - * \param path The path of the file to write to + * @param path The path of the file to write to */ - (void)writeToFile: (OFString*)path; @end -/** - * \brief A class for storing arbitrary big data in an array. +/*! + * @brief A class for storing arbitrary big data in an array. * * The OFBigDataArray class is a class for storing arbitrary data in an array * and is designed to store large hunks of data. Therefore, it allocates * memory in pages rather than a chunk of memory for each item. */ Index: src/OFDate.h ================================================================== --- src/OFDate.h +++ src/OFDate.h @@ -18,317 +18,317 @@ #import "OFSerialization.h" @class OFString; @class OFConstantString; -/** - * \brief A class for storing, accessing and comparing dates. +/*! + * @brief A class for storing, accessing and comparing dates. */ @interface OFDate: OFObject { double seconds; } -/** - * \brief Creates a new OFDate with the current date and time. +/*! + * @brief Creates a new OFDate with the current date and time. * - * \return A new, autoreleased OFDate with the current date and time + * @return A new, autoreleased OFDate with the current date and time */ + (instancetype)date; -/** - * \brief Creates a new OFDate with the specified date and time since +/*! + * @brief Creates a new OFDate with the specified date and time since * 1970-01-01T00:00:00Z. * - * \param seconds The seconds since 1970-01-01T00:00:00Z - * \return A new, autoreleased OFDate with the specified date and time + * @param seconds The seconds since 1970-01-01T00:00:00Z + * @return A new, autoreleased OFDate with the specified date and time */ + (instancetype)dateWithTimeIntervalSince1970: (double)seconds; -/** - * \brief Creates a new OFDate with the specified date and time since now. +/*! + * @brief Creates a new OFDate with the specified date and time since now. * - * \param seconds The seconds since now - * \return A new, autoreleased OFDate with the specified date and time + * @param seconds The seconds since now + * @return A new, autoreleased OFDate with the specified date and time */ + (instancetype)dateWithTimeIntervalSinceNow: (double)seconds; -/** - * \brief Creates a new OFDate with the specified string in the specified +/*! + * @brief Creates a new OFDate with the specified string in the specified * format. * * The time zone used is UTC. See +[dateWithLocalDateString:format:] if you * want local time. * * See the manpage for strftime for information on the format. * - * \warning The format is currently limited to the following format specifiers: + * @warning The format is currently limited to the following format specifiers: * %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t. * - * \param string The string describing the date - * \param format The format of the string describing the date - * \return A new, autoreleased OFDate with the specified date and time + * @param string The string describing the date + * @param format The format of the string describing the date + * @return A new, autoreleased OFDate with the specified date and time */ + (instancetype)dateWithDateString: (OFString*)string format: (OFString*)format; -/** - * \brief Creates a new OFDate with the specified string in the specified +/*! + * @brief Creates a new OFDate with the specified string in the specified * format. * * See the manpage for strftime for information on the format. * - * \warning The format is currently limited to the following format specifiers: + * @warning The format is currently limited to the following format specifiers: * %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t. * - * \param string The string describing the date - * \param format The format of the string describing the date - * \return A new, autoreleased OFDate with the specified date and time + * @param string The string describing the date + * @param format The format of the string describing the date + * @return A new, autoreleased OFDate with the specified date and time */ + (instancetype)dateWithLocalDateString: (OFString*)string format: (OFString*)format; -/** - * \brief Returns a date in the distant future. +/*! + * @brief Returns a date in the distant future. * * The date is system-dependant. * - * \return A date in the distant future + * @return A date in the distant future */ + (instancetype)distantFuture; -/** - * \brief Returns a date in the distant past. +/*! + * @brief Returns a date in the distant past. * * The date is system-dependant. * - * \return A date in the distant past + * @return A date in the distant past */ + (instancetype)distantPast; -/** - * \brief Initializes an already allocated OFDate with the specified date and +/*! + * @brief Initializes an already allocated OFDate with the specified date and * time since 1970-01-01T00:00:00Z. * - * \param seconds The seconds since 1970-01-01T00:00:00Z - * \return An initialized OFDate with the specified date and time + * @param seconds The seconds since 1970-01-01T00:00:00Z + * @return An initialized OFDate with the specified date and time */ - initWithTimeIntervalSince1970: (double)seconds; -/** - * \brief Initializes an already allocated OFDate with the specified date and +/*! + * @brief Initializes an already allocated OFDate with the specified date and * time since now. * - * \param seconds The seconds since now - * \return An initialized OFDate with the specified date and time + * @param seconds The seconds since now + * @return An initialized OFDate with the specified date and time */ - initWithTimeIntervalSinceNow: (double)seconds; -/** - * \brief Initializes an already allocated OFDate with the specified string in +/*! + * @brief Initializes an already allocated OFDate with the specified string in * the specified format. * * The time zone used is UTC. If a time zone is specified anyway, an * OFInvalidFormatException is thrown. See -[initWithLocalDateString:format:] * if you want to specify a time zone. * * See the manpage for strftime for information on the format. * - * \warning The format is currently limited to the following format specifiers: + * @warning The format is currently limited to the following format specifiers: * %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t. * - * \param string The string describing the date - * \param format The format of the string describing the date - * \return An initialized OFDate with the specified date and time + * @param string The string describing the date + * @param format The format of the string describing the date + * @return An initialized OFDate with the specified date and time */ - initWithDateString: (OFString*)string format: (OFString*)format; -/** - * \brief Initializes an already allocated OFDate with the specified string in +/*! + * @brief Initializes an already allocated OFDate with the specified string in * the specified format. * * If no time zone is specified, local time is assumed. * * See the manpage for strftime for information on the format. * - * \warning The format is currently limited to the following format specifiers: + * @warning The format is currently limited to the following format specifiers: * %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t. * - * \param string The string describing the date - * \param format The format of the string describing the date - * \return An initialized OFDate with the specified date and time + * @param string The string describing the date + * @param format The format of the string describing the date + * @return An initialized OFDate with the specified date and time */ - initWithLocalDateString: (OFString*)string format: (OFString*)format; -/** - * \brief Returns the microsecond of the date. +/*! + * @brief Returns the microsecond of the date. * - * \return The microsecond of the date + * @return The microsecond of the date */ - (uint32_t)microsecond; -/** - * \brief Returns the second of the date. +/*! + * @brief Returns the second of the date. * - * \return The second of the date + * @return The second of the date */ - (uint8_t)second; -/** - * \brief Returns the minute of the date. +/*! + * @brief Returns the minute of the date. * - * \return The minute of the date + * @return The minute of the date */ - (uint8_t)minute; -/** - * \brief Returns the hour of the date. +/*! + * @brief Returns the hour of the date. * - * \return The hour of the date + * @return The hour of the date */ - (uint8_t)hour; -/** - * \brief Returns the hour of the date in local time. +/*! + * @brief Returns the hour of the date in local time. * - * \return The hour of the date in local time + * @return The hour of the date in local time */ - (uint8_t)localHour; -/** - * \brief Returns the day of the month. +/*! + * @brief Returns the day of the month. * - * \return The day of the month of the date + * @return The day of the month of the date */ - (uint8_t)dayOfMonth; -/** - * \brief Returns the day of the month of the date in local time. +/*! + * @brief Returns the day of the month of the date in local time. * - * \return The day of the month of the date in local time + * @return The day of the month of the date in local time */ - (uint8_t)localDayOfMonth; -/** - * \brief Returns the month of the year of the date. +/*! + * @brief Returns the month of the year of the date. * - * \return The month of the year of the date + * @return The month of the year of the date */ - (uint8_t)monthOfYear; -/** - * \brief Returns the month of the year of the date in local time. +/*! + * @brief Returns the month of the year of the date in local time. * - * \return The month of the year of the date in local time + * @return The month of the year of the date in local time */ - (uint8_t)localMonthOfYear; -/** - * \brief Returns the year of the date. +/*! + * @brief Returns the year of the date. * - * \return The year of the date + * @return The year of the date */ - (uint16_t)year; -/** - * \brief Returns the year of the date in local time. +/*! + * @brief Returns the year of the date in local time. * - * \return The year of the date in local time + * @return The year of the date in local time */ - (uint16_t)localYear; -/** - * \brief Returns the day of the week of the date. +/*! + * @brief Returns the day of the week of the date. * - * \return The day of the week of the date + * @return The day of the week of the date */ - (uint8_t)dayOfWeek; -/** - * \brief Returns the day of the week of the date in local time. +/*! + * @brief Returns the day of the week of the date in local time. * - * \return The day of the week of the date in local time + * @return The day of the week of the date in local time */ - (uint8_t)localDayOfWeek; -/** - * \brief Returns the day of the year of the date. +/*! + * @brief Returns the day of the year of the date. * - * \return The day of the year of the date + * @return The day of the year of the date */ - (uint16_t)dayOfYear; -/** - * \brief Returns the day of the year of the date in local time. +/*! + * @brief Returns the day of the year of the date in local time. * - * \return The day of the year of the date in local time + * @return The day of the year of the date in local time */ - (uint16_t)localDayOfYear; -/** - * \brief Creates a string of the date with the specified format. +/*! + * @brief Creates a string of the date with the specified format. * * See the manpage for strftime for information on the format. * - * \param format The format for the date string - * \return A new, autoreleased OFString + * @param format The format for the date string + * @return A new, autoreleased OFString */ - (OFString*)dateStringWithFormat: (OFConstantString*)format; -/** - * \brief Creates a string of the local date with the specified format. +/*! + * @brief Creates a string of the local date with the specified format. * * See the manpage for strftime for information on the format. * - * \param format The format for the date string - * \return A new, autoreleased OFString + * @param format The format for the date string + * @return A new, autoreleased OFString */ - (OFString*)localDateStringWithFormat: (OFConstantString*)format; -/** - * \brief Returns the earlier of the two dates. +/*! + * @brief Returns the earlier of the two dates. * - * \param date Another date - * \return The earlier date of the two dates + * @param date Another date + * @return The earlier date of the two dates */ - (OFDate*)earlierDate: (OFDate*)otherDate; -/** - * \brief Returns the later of the two dates. +/*! + * @brief Returns the later of the two dates. * - * \param date Another date - * \return The later date of the two dates + * @param date Another date + * @return The later date of the two dates */ - (OFDate*)laterDate: (OFDate*)otherDate; -/** - * \brief Returns the seconds since 1970-01-01T00:00:00Z. +/*! + * @brief Returns the seconds since 1970-01-01T00:00:00Z. * - * \return The seconds since 1970-01-01T00:00:00Z + * @return The seconds since 1970-01-01T00:00:00Z */ - (double)timeIntervalSince1970; -/** - * \brief Returns the seconds the receiver is after the date. +/*! + * @brief Returns the seconds the receiver is after the date. * - * \param date Date date to generate the difference with receiver - * \return The seconds the receiver is after the date. + * @param date Date date to generate the difference with receiver + * @return The seconds the receiver is after the date. */ - (double)timeIntervalSinceDate: (OFDate*)otherDate; -/** - * \brief Returns the seconds the receiver is in the future. +/*! + * @brief Returns the seconds the receiver is in the future. * - * \return The seconds the receiver is in the future + * @return The seconds the receiver is in the future */ - (double)timeIntervalSinceNow; -/** - * \brief Creates a new date with the specified time interval added. +/*! + * @brief Creates a new date with the specified time interval added. * - * \param seconds The seconds after the date - * \return A new, autoreleased OFDate + * @param seconds The seconds after the date + * @return A new, autoreleased OFDate */ - (OFDate*)dateByAddingTimeInterval: (double)seconds; @end Index: src/OFDictionary.h ================================================================== --- src/OFDictionary.h +++ src/OFDictionary.h @@ -36,214 +36,214 @@ BOOL *stop); typedef BOOL (^of_dictionary_filter_block_t)(id key, id object); typedef id (^of_dictionary_map_block_t)(id key, id object); #endif -/** - * \brief An abstract class for storing objects in a dictionary. +/*! + * @brief An abstract class for storing objects in a dictionary. * * Keys are copied and thus must conform to the OFCopying protocol. * * Note: Fast enumeration on a dictionary enumerates through the keys of the * dictionary. */ @interface OFDictionary: OFObject -/** - * \brief Creates a new OFDictionary. +/*! + * @brief Creates a new OFDictionary. * - * \return A new autoreleased OFDictionary + * @return A new autoreleased OFDictionary */ + (instancetype)dictionary; -/** - * \brief Creates a new OFDictionary with the specified dictionary. +/*! + * @brief Creates a new OFDictionary with the specified dictionary. * - * \param dictionary An OFDictionary - * \return A new autoreleased OFDictionary + * @param dictionary An OFDictionary + * @return A new autoreleased OFDictionary */ + (instancetype)dictionaryWithDictionary: (OFDictionary*)dictionary; -/** - * \brief Creates a new OFDictionary with the specified key and object. +/*! + * @brief Creates a new OFDictionary with the specified key and object. * - * \param key The key - * \param object The object - * \return A new autoreleased OFDictionary + * @param key The key + * @param object The object + * @return A new autoreleased OFDictionary */ + (instancetype)dictionaryWithObject: (id)object forKey: (id)key; -/** - * \brief Creates a new OFDictionary with the specified keys and objects. +/*! + * @brief Creates a new OFDictionary with the specified keys and objects. * - * \param keys An array of keys - * \param objects An array of objects - * \return A new autoreleased OFDictionary + * @param keys An array of keys + * @param objects An array of objects + * @return A new autoreleased OFDictionary */ + (instancetype)dictionaryWithObjects: (OFArray*)objects forKeys: (OFArray*)keys; -/** - * \brief Creates a new OFDictionary with the specified keys and objects. +/*! + * @brief Creates a new OFDictionary with the specified keys and objects. * - * \param keys An array of keys - * \param objects An array of objects - * \param count The number of objects in the arrays - * \return A new autoreleased OFDictionary + * @param keys An array of keys + * @param objects An array of objects + * @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; -/** - * \brief Creates a new OFDictionary with the specified keys objects. +/*! + * @brief Creates a new OFDictionary with the specified keys objects. * - * \param firstKey The first key - * \return A new autoreleased OFDictionary + * @param firstKey The first key + * @return A new autoreleased OFDictionary */ + (instancetype)dictionaryWithKeysAndObjects: (id)firstKey, ... OF_SENTINEL; -/** - * \brief Initializes an already allocated OFDictionary. +/*! + * @brief Initializes an already allocated OFDictionary. * - * \return An initialized OFDictionary + * @return An initialized OFDictionary */ - init; -/** - * \brief Initializes an already allocated OFDictionary with the specified +/*! + * @brief Initializes an already allocated OFDictionary with the specified * OFDictionary. * - * \param dictionary An OFDictionary - * \return An initialized OFDictionary + * @param dictionary An OFDictionary + * @return An initialized OFDictionary */ - initWithDictionary: (OFDictionary*)dictionary; -/** - * \brief Initializes an already allocated OFDictionary with the specified key +/*! + * @brief Initializes an already allocated OFDictionary with the specified key * and object. * - * \param key The key - * \param object The object - * \return A new initialized OFDictionary + * @param key The key + * @param object The object + * @return A new initialized OFDictionary */ - initWithObject: (id)object forKey: (id)key; -/** - * \brief Initializes an already allocated OFDictionary with the specified keys +/*! + * @brief Initializes an already allocated OFDictionary with the specified keys * and objects. * - * \param keys An array of keys - * \param objects An array of objects - * \return A new initialized OFDictionary + * @param keys An array of keys + * @param objects An array of objects + * @return A new initialized OFDictionary */ - initWithObjects: (OFArray*)objects forKeys: (OFArray*)keys; -/** - * \brief Initializes an already allocated OFDictionary with the specified keys +/*! + * @brief Initializes an already allocated OFDictionary with the specified keys * and objects. * - * \param keys An array of keys - * \param objects An array of objects - * \param count The number of objects in the arrays - * \return A new initialized OFDictionary + * @param keys An array of keys + * @param objects An array of objects + * @param count The number of objects in the arrays + * @return A new initialized OFDictionary */ - initWithObjects: (id const*)objects forKeys: (id const*)keys count: (size_t)count; -/** - * \brief Initializes an already allocated OFDictionary with the specified keys +/*! + * @brief Initializes an already allocated OFDictionary with the specified keys * and objects. * - * \param firstKey The first key - * \return A new initialized OFDictionary + * @param firstKey The first key + * @return A new initialized OFDictionary */ - initWithKeysAndObjects: (id)firstKey, ... OF_SENTINEL; -/** - * \brief Initializes an already allocated OFDictionary with the specified key +/*! + * @brief Initializes an already allocated OFDictionary with the specified key * and va_list. * - * \param firstKey The first key - * \param arguments A va_list of the other arguments - * \return A new initialized OFDictionary + * @param firstKey The first key + * @param arguments A va_list of the other arguments + * @return A new initialized OFDictionary */ - initWithKey: (id)firstKey arguments: (va_list)arguments; -/** - * \brief Returns the object for the given key or nil if the key was not found. +/*! + * @brief Returns the object for the given key or nil if the key was not found. * * The returned object is not retained and autoreleased for performance * reasons! * - * \param key The key whose object should be returned - * \return The object for the given key or nil if the key was not found + * @param key The key whose object should be returned + * @return The object for the given key or nil if the key was not found */ - (id)objectForKey: (id)key; - (id)objectForKeyedSubscript: (id)key; -/** - * \brief Checks whether the dictionary contains an object with the specified +/*! + * @brief Checks whether the dictionary contains an object with the specified * address. * - * \param object The object which is checked for being in the dictionary - * \return A boolean whether the dictionary contains an object with the + * @param object The object which is checked for being in the dictionary + * @return A boolean whether the dictionary contains an object with the * specified address. */ - (BOOL)containsObjectIdenticalTo: (id)object; -/** - * \brief Returns an array of all keys. +/*! + * @brief Returns an array of all keys. * - * \return An array of all keys + * @return An array of all keys */ - (OFArray*)allKeys; -/** - * \brief Returns an array of all objects. +/*! + * @brief Returns an array of all objects. * - * \return An array of all objects + * @return An array of all objects */ - (OFArray*)allObjects; -/** - * \brief Returns an OFEnumerator to enumerate through the dictionary's keys. +/*! + * @brief Returns an OFEnumerator to enumerate through the dictionary's keys. * - * \return An OFEnumerator to enumerate through the dictionary's keys + * @return An OFEnumerator to enumerate through the dictionary's keys */ - (OFEnumerator*)keyEnumerator; #ifdef OF_HAVE_BLOCKS -/** - * \brief Executes a block for each key / object pair. +/*! + * @brief Executes a block for each key / object pair. * - * \param block The block to execute for each key / object pair. + * @param block The block to execute for each key / object pair. */ - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block; -/** - * \brief Creates a new dictionary, mapping each object using the specified +/*! + * @brief Creates a new dictionary, mapping each object using the specified * block. * - * \param block A block which maps an object for each object - * \return A new, autorelease OFDictionary + * @param block A block which maps an object for each object + * @return A new, autorelease OFDictionary */ - (OFDictionary*)mappedDictionaryUsingBlock: (of_dictionary_map_block_t)block; -/** - * \brief Creates a new dictionary, only containing the objects for which the +/*! + * @brief Creates a new dictionary, only containing the objects for which the * block returns YES. * - * \param block A block which determines if the object should be in the new + * @param block A block which determines if the object should be in the new * dictionary - * \return A new, autoreleased OFDictionary + * @return A new, autoreleased OFDictionary */ - (OFDictionary*)filteredDictionaryUsingBlock: (of_dictionary_filter_block_t)block; #endif @end Index: src/OFEnumerator.h ================================================================== --- src/OFEnumerator.h +++ src/OFEnumerator.h @@ -16,36 +16,36 @@ #import "OFObject.h" @class OFEnumerator; -/** - * \brief A protocol for getting an enumerator for the object. +/*! + * @brief A protocol for getting an enumerator for the object. */ @protocol OFEnumerating -/** - * \brief Returns an OFEnumerator to enumerate through all objects of the +/*! + * @brief Returns an OFEnumerator to enumerate through all objects of the * collection. * - * \returns An OFEnumerator to enumerate through all objects of the collection + * @returns An OFEnumerator to enumerate through all objects of the collection */ - (OFEnumerator*)objectEnumerator; @end -/** - * \brief A class which provides methods to enumerate through collections. +/*! + * @brief A class which provides methods to enumerate through collections. */ @interface OFEnumerator: OFObject -/** - * \brief Returns the next object. +/*! + * @brief Returns the next object. * - * \return The next object + * @return The next object */ - (id)nextObject; -/** - * \brief Resets the enumerator, so the next call to nextObject returns the +/*! + * @brief Resets the enumerator, so the next call to nextObject returns the * first object again. */ - (void)reset; @end @@ -55,12 +55,12 @@ * We need this bad check to see if we already imported Cocoa, which defines * this as well. */ #define of_fast_enumeration_state_t NSFastEnumerationState #ifndef NSINTEGER_DEFINED -/** - * \brief State information for fast enumerations. +/*! + * @brief State information for fast enumerations. */ typedef struct of_fast_enumeration_state_t { /// Arbitrary state information for the enumeration unsigned long state; /// Pointer to a C array of objects to return @@ -70,26 +70,26 @@ /// Additional arbitrary state information unsigned long extra[5]; } of_fast_enumeration_state_t; #endif -/** - * \brief A protocol for fast enumeration. +/*! + * @brief A protocol for fast enumeration. * * The OFFastEnumeration protocol needs to be implemented by all classes * supporting fast enumeration. */ @protocol OFFastEnumeration -/** - * \brief A method which is called by the code produced by the compiler when +/*! + * @brief A method which is called by the code produced by the compiler when * doing a fast enumeration. * - * \param state Context information for the enumeration - * \param objects A pointer to an array where to put the objects - * \param count The number of objects that can be stored at objects - * \return The number of objects returned in objects or 0 when the enumeration + * @param state Context information for the enumeration + * @param objects A pointer to an array where to put the objects + * @param count The number of objects that can be stored at objects + * @return The number of objects returned in objects or 0 when the enumeration * finished. */ - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (__unsafe_unretained id*)objects count: (int)count; @end Index: src/OFFile.h ================================================================== --- src/OFFile.h +++ src/OFFile.h @@ -34,209 +34,209 @@ extern void of_log(OFConstantString*, ...); #ifdef __cplusplus } #endif -/** - * \brief A class which provides functions to read, write and manipulate files. +/*! + * @brief A class which provides functions to read, write and manipulate files. */ @interface OFFile: OFSeekableStream { int fd; BOOL closable; BOOL atEndOfStream; } -/** - * \brief Creates a new OFFile with the specified path and mode. +/*! + * @brief Creates a new OFFile with the specified path and mode. * - * \param path The path to the file to open as a string - * \param mode The mode in which the file should be opened as a string - * \return A new autoreleased OFFile + * @param path The path to the file to open as a string + * @param mode The mode in which the file should be opened as a string + * @return A new autoreleased OFFile */ + (instancetype)fileWithPath: (OFString*)path mode: (OFString*)mode; -/** - * \brief Creates a new OFFile with the specified file descriptor. +/*! + * @brief Creates a new OFFile with the specified file descriptor. * - * \param fileDescriptor A file descriptor, returned from for example open(). + * @param fileDescriptor A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! - * \return A new autoreleased OFFile + * @return A new autoreleased OFFile */ + (instancetype)fileWithFileDescriptor: (int)fileDescriptor; -/** - * \brief Returns the path fo the current working directory. +/*! + * @brief Returns the path fo the current working directory. * - * \return The path of the current working directory + * @return The path of the current working directory */ + (OFString*)currentDirectoryPath; -/** - * \brief Checks whether a file exists at the specified path. +/*! + * @brief Checks whether a file exists at the specified path. * - * \param path The path to check - * \return A boolean whether there is a file at the specified path + * @param path The path to check + * @return A boolean whether there is a file at the specified path */ + (BOOL)fileExistsAtPath: (OFString*)path; -/** - * \brief Checks whether a directory exists at the specified path. +/*! + * @brief Checks whether a directory exists at the specified path. * - * \param path The path to check - * \return A boolean whether there is a directory at the specified path + * @param path The path to check + * @return A boolean whether there is a directory at the specified path */ + (BOOL)directoryExistsAtPath: (OFString*)path; -/** - * \brief Creates a directory at the specified path. +/*! + * @brief Creates a directory at the specified path. * - * \param path The path of the directory + * @param path The path of the directory */ + (void)createDirectoryAtPath: (OFString*)path; -/** - * \brief Creates a directory at the specified path. +/*! + * @brief Creates a directory at the specified path. * - * \param path The path of the directory - * \param createParents Whether to create the parents of the directory + * @param path The path of the directory + * @param createParents Whether to create the parents of the directory */ + (void)createDirectoryAtPath: (OFString*)path createParents: (BOOL)createParents; -/** - * \brief Returns an array with the files in the specified directory. +/*! + * @brief Returns an array with the files in the specified directory. * - * \param path The path of the directory - * \return An array of OFStrings with the files at the specified path + * @param path The path of the directory + * @return An array of OFStrings with the files at the specified path */ + (OFArray*)filesInDirectoryAtPath: (OFString*)path; -/** - * \brief Changes the current working directory. +/*! + * @brief Changes the current working directory. * - * \param path The new directory to change to + * @param path The new directory to change to */ + (void)changeToDirectoryAtPath: (OFString*)path; -/** - * \brief Returns the size of the specified file. +/*! + * @brief Returns the size of the specified file. * - * \return The size of the specified file + * @return The size of the specified file */ + (off_t)sizeOfFileAtPath: (OFString*)path; -/** - * \brief Returns the date of the last modification of the file. +/*! + * @brief Returns the date of the last modification of the file. * - * \return The date of the last modification of the file + * @return The date of the last modification of the file */ + (OFDate*)modificationDateOfFileAtPath: (OFString*)path; #ifndef _PSP -/** - * \brief Changes the mode of a file. +/*! + * @brief Changes the mode of a file. * * Only changes read-only flag on Windows. * - * \param path The path to the file of which the mode should be changed as a + * @param path The path to the file of which the mode should be changed as a * string - * \param mode The new mode for the file + * @param mode The new mode for the file */ + (void)changeModeOfFileAtPath: (OFString*)path mode: (mode_t)mode; #endif #if !defined(_WIN32) && !defined(_PSP) -/** - * \brief Changes the owner of a file. +/*! + * @brief Changes the owner of a file. * * Not available on Windows. * - * \param path The path to the file of which the owner should be changed as a + * @param path The path to the file of which the owner should be changed as a * string - * \param owner The new owner for the file - * \param group The new group for the file + * @param owner The new owner for the file + * @param group The new group for the file */ + (void)changeOwnerOfFileAtPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group; #endif -/** - * \brief Copies a file. +/*! + * @brief Copies a file. * - * \param source The file to copy - * \param destination The destination path + * @param source The file to copy + * @param destination The destination path */ + (void)copyFileAtPath: (OFString*)source toPath: (OFString*)destination; -/** - * \brief Renames a file. +/*! + * @brief Renames a file. * - * \param source The file to rename - * \param destination The new name + * @param source The file to rename + * @param destination The new name */ + (void)renameFileAtPath: (OFString*)source toPath: (OFString*)destination; -/** - * \brief Deletes a file. +/*! + * @brief Deletes a file. * - * \param path The path to the file of which should be deleted as a string + * @param path The path to the file of which should be deleted as a string */ + (void)deleteFileAtPath: (OFString*)path; -/** - * \brief Deletes an empty directory. +/*! + * @brief Deletes an empty directory. * - * \param path The path to the directory which should be deleted as a string + * @param path The path to the directory which should be deleted as a string */ + (void)deleteDirectoryAtPath: (OFString*)path; #ifndef _WIN32 -/** - * \brief Creates a hard link for a file. +/*! + * @brief Creates a hard link for a file. * * Not available on Windows. * - * \param source The path to the file of which should be linked as a string - * \param destination The path to where the file should be linked as a string + * @param source The path to the file of which should be linked as a string + * @param destination The path to where the file should be linked as a string */ + (void)linkFileAtPath: (OFString*)source toPath: (OFString*)destination; #endif #if !defined(_WIN32) && !defined(_PSP) -/** - * \brief Creates a symbolink link for a file. +/*! + * @brief Creates a symbolink link for a file. * * Not available on Windows. * - * \param source The path to the file of which should be symlinked as a string - * \param destination The path to where the file should be symlinked as a string + * @param source The path to the file of which should be symlinked as a string + * @param destination The path to where the file should be symlinked as a string */ + (void)symlinkFileAtPath: (OFString*)source toPath: (OFString*)destination; #endif -/** - * \brief Initializes an already allocated OFFile. +/*! + * @brief Initializes an already allocated OFFile. * - * \param path The path to the file to open as a string - * \param mode The mode in which the file should be opened as a string - * \return An initialized OFFile + * @param path The path to the file to open as a string + * @param mode The mode in which the file should be opened as a string + * @return An initialized OFFile */ - initWithPath: (OFString*)path mode: (OFString*)mode; -/** - * \brief Initializes an already allocated OFFile. +/*! + * @brief Initializes an already allocated OFFile. * - * \param fileDescriptor A file descriptor, returned from for example open(). + * @param fileDescriptor A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! */ - initWithFileDescriptor: (int)fileDescriptor; @end Index: src/OFHTTPRequest.h ================================================================== --- src/OFHTTPRequest.h +++ src/OFHTTPRequest.h @@ -28,61 +28,61 @@ OF_HTTP_REQUEST_TYPE_GET, OF_HTTP_REQUEST_TYPE_POST, OF_HTTP_REQUEST_TYPE_HEAD } of_http_request_type_t; -/** - * \brief A delegate for OFHTTPRequests. +/*! + * @brief A delegate for OFHTTPRequests. */ #ifndef OF_HTTP_REQUEST_M @protocol OFHTTPRequestDelegate #else @protocol OFHTTPRequestDelegate #endif #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional #endif -/** - * \brief A callback which is called when an OFHTTPRequest creates a socket. +/*! + * @brief A callback which is called when an OFHTTPRequest creates a socket. * * This is useful if the connection is using HTTPS and the server requires a * client certificate. This callback can then be used to tell the TLS socket * about the certificate. Another use case is to tell the socket about a SOCKS5 * proxy it should use for this connection. * - * \param request The OFHTTPRequest that created a socket - * \param socket The socket created by the OFHTTPRequest + * @param request The OFHTTPRequest that created a socket + * @param socket The socket created by the OFHTTPRequest */ - (void)request: (OFHTTPRequest*)request didCreateSocket: (OFTCPSocket*)socket; -/** - * \brief A callback which is called when an OFHTTPRequest received headers. +/*! + * @brief A callback which is called when an OFHTTPRequest received headers. * - * \param request The OFHTTPRequest which received the headers - * \param headers The headers received - * \param statusCode The status code received + * @param request The OFHTTPRequest which received the headers + * @param headers The headers received + * @param statusCode The status code received */ - (void)request: (OFHTTPRequest*)request didReceiveHeaders: (OFDictionary*)headers withStatusCode: (int)statusCode; -/** - * \brief A callback which is called when an OFHTTPRequest received data. +/*! + * @brief A callback which is called when an OFHTTPRequest received data. * * This is useful for example if you want to update a status display. * - * \param request The OFHTTPRequest which received data - * \param data The data the OFHTTPRequest received - * \param length The length of the data received, in bytes + * @param request The OFHTTPRequest which received data + * @param data The data the OFHTTPRequest received + * @param length The length of the data received, in bytes */ - (void)request: (OFHTTPRequest*)request didReceiveData: (const char*)data withLength: (size_t)length; -/** - * \brief A callback which is called when an OFHTTPRequest will follow a +/*! + * @brief A callback which is called when an OFHTTPRequest will follow a * redirect. * * If you want to get the headers and data for each redirect, set the number of * redirects to 0 and perform a new OFHTTPRequest for each redirect. However, * this callback will not be called then and you have to look at the status code @@ -90,20 +90,20 @@ * * This callback will only be called if the OFHTTPRequest will follow a * redirect. If the maximum number of redirects has been reached already, this * callback will not be called. * - * \param request The OFHTTPRequest which will follow a redirect - * \param URL The URL to which it will follow a redirect - * \return A boolean whether the OFHTTPRequest should follow the redirect + * @param request The OFHTTPRequest which will follow a redirect + * @param URL The URL to which it will follow a redirect + * @return A boolean whether the OFHTTPRequest should follow the redirect */ - (BOOL)request: (OFHTTPRequest*)request willFollowRedirectTo: (OFURL*)URL; @end -/** - * \brief A class for storing and performing HTTP requests. +/*! + * @brief A class for storing and performing HTTP requests. */ @interface OFHTTPRequest: OFObject { OFURL *URL; of_http_request_type_t requestType; @@ -122,154 +122,154 @@ @property BOOL redirectsFromHTTPSToHTTPAllowed; @property (assign) id delegate; @property BOOL storesData; #endif -/** - * \brief Creates a new OFHTTPRequest. +/*! + * @brief Creates a new OFHTTPRequest. * - * \return A new, autoreleased OFHTTPRequest + * @return A new, autoreleased OFHTTPRequest */ + (instancetype)request; -/** - * \brief Creates a new OFHTTPRequest with the specified URL. +/*! + * @brief Creates a new OFHTTPRequest with the specified URL. * - * \param URL The URL for the request - * \return A new, autoreleased OFHTTPRequest + * @param URL The URL for the request + * @return A new, autoreleased OFHTTPRequest */ + (instancetype)requestWithURL: (OFURL*)URL; -/** - * \brief Initializes an already allocated OFHTTPRequest with the specified URL. +/*! + * @brief Initializes an already allocated OFHTTPRequest with the specified URL. * - * \param URL The URL for the request - * \return An initialized OFHTTPRequest + * @param URL The URL for the request + * @return An initialized OFHTTPRequest */ - initWithURL: (OFURL*)URL; -/** - * \brief Sets the URL of the HTTP request. +/*! + * @brief Sets the URL of the HTTP request. * - * \param URL The URL of the HTTP request + * @param URL The URL of the HTTP request */ - (void)setURL: (OFURL*)URL; -/** - * \brief Returns the URL of the HTTP request. +/*! + * @brief Returns the URL of the HTTP request. * - * \return The URL of the HTTP request + * @return The URL of the HTTP request */ - (OFURL*)URL; -/** - * \brief Sets the request type of the HTTP request. +/*! + * @brief Sets the request type of the HTTP request. * - * \param requestType The request type of the HTTP request + * @param requestType The request type of the HTTP request */ - (void)setRequestType: (of_http_request_type_t)requestType; -/** - * \brief Returns the request type of the HTTP request. +/*! + * @brief Returns the request type of the HTTP request. * - * \return The request type of the HTTP request + * @return The request type of the HTTP request */ - (of_http_request_type_t)requestType; -/** - * \brief Sets the query string of the HTTP request. +/*! + * @brief Sets the query string of the HTTP request. * - * \param queryString The query string of the HTTP request + * @param queryString The query string of the HTTP request */ - (void)setQueryString: (OFString*)queryString; -/** - * \brief Returns the query string of the HTTP request. +/*! + * @brief Returns the query string of the HTTP request. * - * \return The query string of the HTTP request + * @return The query string of the HTTP request */ - (OFString*)queryString; -/** - * \brief Sets a dictionary with headers for the HTTP request. +/*! + * @brief Sets a dictionary with headers for the HTTP request. * - * \param headers A dictionary with headers for the HTTP request + * @param headers A dictionary with headers for the HTTP request */ - (void)setHeaders: (OFDictionary*)headers; -/** - * \brief Retrusn a dictionary with headers for the HTTP request. +/*! + * @brief Retrusn a dictionary with headers for the HTTP request. * - * \return A dictionary with headers for the HTTP request. + * @return A dictionary with headers for the HTTP request. */ - (OFDictionary*)headers; -/** - * \brief Sets whether redirects from HTTPS to HTTP are allowed. +/*! + * @brief Sets whether redirects from HTTPS to HTTP are allowed. * - * \param allowed Whether redirects from HTTPS to HTTP are allowed + * @param allowed Whether redirects from HTTPS to HTTP are allowed */ - (void)setRedirectsFromHTTPSToHTTPAllowed: (BOOL)allowed; -/** - * \brief Returns whether redirects from HTTPS to HTTP will be allowed +/*! + * @brief Returns whether redirects from HTTPS to HTTP will be allowed * - * \return Whether redirects from HTTPS to HTTP will be allowed + * @return Whether redirects from HTTPS to HTTP will be allowed */ - (BOOL)redirectsFromHTTPSToHTTPAllowed; -/** - * \brief Sets the delegate of the HTTP request. +/*! + * @brief Sets the delegate of the HTTP request. * - * \param delegate The delegate of the HTTP request + * @param delegate The delegate of the HTTP request */ - (void)setDelegate: (id )delegate; -/** - * \brief Returns the delegate of the HTTP reqeust. +/*! + * @brief Returns the delegate of the HTTP reqeust. * - * \return The delegate of the HTTP request + * @return The delegate of the HTTP request */ - (id )delegate; -/** - * \brief Sets whether an OFDataArray with the data should be created. +/*! + * @brief Sets whether an OFDataArray with the data should be created. * * Setting this to NO is only useful if you are using the delegate to handle the * data. * - * \param storesData Whether to store the data in an OFDataArray + * @param storesData Whether to store the data in an OFDataArray */ - (void)setStoresData: (BOOL)storesData; -/** - * \brief Returns whether an OFDataArray with the date should be created. +/*! + * @brief Returns whether an OFDataArray with the date should be created. * - * \return Whether an OFDataArray with the data should be created + * @return Whether an OFDataArray with the data should be created */ - (BOOL)storesData; -/** - * \brief Performs the HTTP request and returns an OFHTTPRequestResult. +/*! + * @brief Performs the HTTP request and returns an OFHTTPRequestResult. * - * \return An OFHTTPRequestResult with the result of the HTTP request + * @return An OFHTTPRequestResult with the result of the HTTP request */ - (OFHTTPRequestResult*)perform; -/** - * \brief Performs the HTTP request and returns an OFHTTPRequestResult. +/*! + * @brief Performs the HTTP request and returns an OFHTTPRequestResult. * - * \param redirects The maximum number of redirects after which no further + * @param redirects The maximum number of redirects after which no further * attempt is done to follow the redirect, but instead the * redirect is returned as an OFHTTPRequest - * \return An OFHTTPRequestResult with the result of the HTTP request + * @return An OFHTTPRequestResult with the result of the HTTP request */ - (OFHTTPRequestResult*)performWithRedirects: (size_t)redirects; @end -/** - * \brief A class for storing the result of an HTTP request. +/*! + * @brief A class for storing the result of an HTTP request. */ @interface OFHTTPRequestResult: OFObject { short statusCode; OFDataArray *data; @@ -284,33 +284,33 @@ - initWithStatusCode: (short)status headers: (OFDictionary*)headers data: (OFDataArray*)data; -/** - * \brief Returns the state code of the result of the HTTP request. +/*! + * @brief Returns the state code of the result of the HTTP request. * - * \return The status code of the result of the HTTP request + * @return The status code of the result of the HTTP request */ - (short)statusCode; -/** - * \brief Returns the headers of the result of the HTTP request. +/*! + * @brief Returns the headers of the result of the HTTP request. * - * \return The headers of the result of the HTTP request + * @return The headers of the result of the HTTP request */ - (OFDictionary*)headers; -/** - * \brief Returns the data received for the HTTP request. +/*! + * @brief Returns the data received for the HTTP request. * * Returns nil if storesData was set to NO. * - * \return The data received for the HTTP request + * @return The data received for the HTTP request */ - (OFDataArray*)data; @end @interface OFObject (OFHTTPRequestDelegate) @end extern Class of_http_request_tls_socket_class; Index: src/OFHash.h ================================================================== --- src/OFHash.h +++ src/OFHash.h @@ -14,12 +14,12 @@ * file. */ #import "OFObject.h" -/** - * \brief A base class for classes providing hash functions. +/*! + * @brief A base class for classes providing hash functions. */ @interface OFHash: OFObject { BOOL calculated; } @@ -26,52 +26,52 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, getter=isCalculated) BOOL calculated; #endif -/** - * \brief Creates a new hash. +/*! + * @brief Creates a new hash. * - * \return A new autoreleased OFHash + * @return A new autoreleased OFHash */ + (instancetype)hash; -/** - * \brief Returns the digest size of the hash, in bytes. +/*! + * @brief Returns the digest size of the hash, in bytes. * - * \return The digest size of the hash, in bytes + * @return The digest size of the hash, in bytes */ + (size_t)digestSize; -/** - * \brief Returns the block size of the hash, in bytes. +/*! + * @brief Returns the block size of the hash, in bytes. * - * \return The block size of the hash, in bytes + * @return The block size of the hash, in bytes */ + (size_t)blockSize; -/** - * \brief Adds a buffer to the hash to be calculated. +/*! + * @brief Adds a buffer to the hash to be calculated. * - * \param buffer The buffer which should be included into the calculation - * \param length The length of the buffer + * @param buffer The buffer which should be included into the calculation + * @param length The length of the buffer */ - (void)updateWithBuffer: (const void*)buffer length: (size_t)length; -/** - * \brief Returns a buffer containing the hash. +/*! + * @brief Returns a buffer containing the hash. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. * - * \return A buffer containing the hash + * @return A buffer containing the hash */ - (uint8_t*)digest OF_RETURNS_INNER_POINTER; -/** - * \brief Returns a boolean whether the hash has already been calculated. +/*! + * @brief Returns a boolean whether the hash has already been calculated. * - * \return A boolean whether the hash has already been calculated + * @return A boolean whether the hash has already been calculated */ - (BOOL)isCalculated; @end Index: src/OFIntrospection.h ================================================================== --- src/OFIntrospection.h +++ src/OFIntrospection.h @@ -18,12 +18,12 @@ @class OFString; @class OFArray; @class OFMutableArray; -/** - * \brief A class for describing a method. +/*! + * @brief A class for describing a method. */ @interface OFMethod: OFObject { SEL selector; OFString *name; @@ -34,34 +34,34 @@ @property (readonly) SEL selector; @property (readonly, copy) OFString *name; @property (readonly) const char *typeEncoding; #endif -/** - * \brief Returns the selector of the method. +/*! + * @brief Returns the selector of the method. * - * \return The selector of the method + * @return The selector of the method */ - (SEL)selector; -/** - * \brief Returns the name of the method. +/*! + * @brief Returns the name of the method. * - * \return The name of the method + * @return The name of the method */ - (OFString*)name; -/** - * \brief Returns the type encoding for the method. +/*! + * @brief Returns the type encoding for the method. * - * \return The type encoding for the method + * @return The type encoding for the method */ - (const char*)typeEncoding; @end -/** - * \brief A class for describing an instance variable. +/*! + * @brief A class for describing an instance variable. */ @interface OFInstanceVariable: OFObject { OFString *name; const char *typeEncoding; @@ -72,34 +72,34 @@ @property (readonly, copy) OFString *name; @property (readonly) ptrdiff_t offset; @property (readonly) const char *typeEncoding; #endif -/** - * \brief Returns the name of the instance variable. +/*! + * @brief Returns the name of the instance variable. * - * \return The name of the instance variable + * @return The name of the instance variable */ - (OFString*)name; -/** - * \brief Returns the offset of the instance variable. +/*! + * @brief Returns the offset of the instance variable. * - * \return The offset of the instance variable + * @return The offset of the instance variable */ - (ptrdiff_t)offset; -/** - * \brief Returns the type encoding for the instance variable. +/*! + * @brief Returns the type encoding for the instance variable. * - * \return The type encoding for the instance variable + * @return The type encoding for the instance variable */ - (const char*)typeEncoding; @end -/** - * \brief A class for introspecting classes. +/*! + * @brief A class for introspecting classes. */ @interface OFIntrospection: OFObject { OFMutableArray *classMethods; OFMutableArray *instanceMethods; @@ -113,43 +113,43 @@ @property (readonly, copy) OFArray *classMethods; @property (readonly, copy) OFArray *instanceMethods; @property (readonly, copy) OFArray *instanceVariables; #endif -/** - * \brief Creates a new introspection for the specified class. +/*! + * @brief Creates a new introspection for the specified class. * - * \return A new, autoreleased introspection for the specified class + * @return A new, autoreleased introspection for the specified class */ + (instancetype)introspectionWithClass: (Class)class_; -/** - * \brief Initializes an already allocated OFIntrospection with the specified +/*! + * @brief Initializes an already allocated OFIntrospection with the specified * class. * - * \return An initialized OFIntrospection + * @return An initialized OFIntrospection */ - initWithClass: (Class)class_; -/** - * \brief Returns the class methods of the class. +/*! + * @brief Returns the class methods of the class. * - * \return An array of OFMethods + * @return An array of OFMethods */ - (OFArray*)classMethods; -/** - * \brief Returns the instance methods of the class. +/*! + * @brief Returns the instance methods of the class. * - * \return An array of OFMethods + * @return An array of OFMethods */ - (OFArray*)instanceMethods; -/** - * \brief Returns the instance variables of the class. +/*! + * @brief Returns the instance variables of the class. * - * \return An array of OFInstanceVariables + * @return An array of OFInstanceVariables */ - (OFArray*)instanceVariables; /* TODO: protocols */ @end Index: src/OFJSONRepresentation.h ================================================================== --- src/OFJSONRepresentation.h +++ src/OFJSONRepresentation.h @@ -14,21 +14,21 @@ * file. */ @class OFString; -/** - * \brief A protocol implemented by classes that support encoding to a JSON +/*! + * @brief A protocol implemented by classes that support encoding to a JSON * representation. * - * \warning Although this method can be called directly on classes other than + * @warning Although this method can be called directly on classes other than * OFArray and OFDictionary, this will generate invalid JSON, as JSON * requires all data to be encapsulated in an array or a dictionary! */ @protocol OFJSONRepresentation -/** - * \brief Returns the JSON representation of the object as a string. +/*! + * @brief Returns the JSON representation of the object as a string. * - * \return The JSON representation of the object as a string. + * @return The JSON representation of the object as a string. */ - (OFString*)JSONRepresentation; @end Index: src/OFList.h ================================================================== --- src/OFList.h +++ src/OFList.h @@ -18,12 +18,12 @@ #import "OFCollection.h" #import "OFEnumerator.h" #import "OFSerialization.h" typedef struct of_list_object_t of_list_object_t; -/** - * \brief A list object. +/*! + * @brief A list object. * * A struct that contains a pointer to the next list object, the previous list * object and the object. */ struct of_list_object_t { @@ -33,12 +33,12 @@ of_list_object_t *previous; /// The object for the list object __unsafe_unretained id object; }; -/** - * \brief A class which provides easy to use double-linked lists. +/*! + * @brief A class which provides easy to use double-linked lists. */ @interface OFList: OFObject { of_list_object_t *firstListObject; of_list_object_t *lastListObject; @@ -49,115 +49,115 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) of_list_object_t *firstListObject; @property (readonly) of_list_object_t *lastListObject; #endif -/** - * \brief Creates a new OFList. +/*! + * @brief Creates a new OFList. * - * \return A new autoreleased OFList + * @return A new autoreleased OFList */ + (instancetype)list; -/** - * \brief Returns the first list object of the list. +/*! + * @brief Returns the first list object of the list. * - * \return The first list object of the list + * @return The first list object of the list */ - (of_list_object_t*)firstListObject; -/** - * \brief Retrusn the last list object of the list. +/*! + * @brief Retrusn the last list object of the list. * - * \return The last list object of the list + * @return The last list object of the list */ - (of_list_object_t*)lastListObject; -/** - * \brief Appends an object to the list. +/*! + * @brief Appends an object to the list. * - * \param object The object to append - * \return An of_list_object_t, needed to identify the object inside the list. + * @param object The object to append + * @return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)appendObject: (id)object; -/** - * \brief Prepends an object to the list. +/*! + * @brief Prepends an object to the list. * - * \param object The object to prepend - * \return An of_list_object_t, needed to identify the object inside the list. + * @param object The object to prepend + * @return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)prependObject: (id)object; -/** - * \brief Inserts an object before another list object. +/*! + * @brief Inserts an object before another list object. * - * \param object The object to insert - * \param listObject The of_list_object_t of the object before which it should + * @param object The object to insert + * @param listObject The of_list_object_t of the object before which it should * be inserted - * \return An of_list_object_t, needed to identify the object inside the list. + * @return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)insertObject: (id)object beforeListObject: (of_list_object_t*)listObject; -/** - * \brief Inserts an object after another list object. +/*! + * @brief Inserts an object after another list object. * - * \param object The object to insert - * \param listObject The of_list_object_t of the object after which it should be + * @param object The object to insert + * @param listObject The of_list_object_t of the object after which it should be * inserted - * \return An of_list_object_t, needed to identify the object inside the list. + * @return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)insertObject: (id)object afterListObject: (of_list_object_t*)listObject; -/** - * \brief Removes the object with the specified list object from the list. +/*! + * @brief Removes the object with the specified list object from the list. * - * \param listObject The list object returned by append / prepend + * @param listObject The list object returned by append / prepend */ - (void)removeListObject: (of_list_object_t*)listObject; -/** - * \brief Checks whether the list contains an object with the specified address. +/*! + * @brief Checks whether the list contains an object with the specified address. * - * \param object The object which is checked for being in the list - * \return A boolean whether the list contains an object with the specified + * @param object The object which is checked for being in the list + * @return A boolean whether the list contains an object with the specified * address. */ - (BOOL)containsObjectIdenticalTo: (id)object; -/** - * \brief Returns the first object of the list or nil. +/*! + * @brief Returns the first object of the list or nil. * * The returned object is not retained and autoreleased for performance * reasons! * - * \return The first object of the list or nil + * @return The first object of the list or nil */ - (id)firstObject; -/** - * \brief Returns the last object of the list or nil. +/*! + * @brief Returns the last object of the list or nil. * * The returned object is not retained and autoreleased for performance * reasons! * - * \return The last object of the list or nil + * @return The last object of the list or nil */ - (id)lastObject; -/** - * \brief Removes all objects from the list. +/*! + * @brief Removes all objects from the list. */ - (void)removeAllObjects; @end @interface OFListEnumerator: OFEnumerator Index: src/OFLocking.h ================================================================== --- src/OFLocking.h +++ src/OFLocking.h @@ -14,26 +14,26 @@ * file. */ #import "OFObject.h" -/** - * \brief A protocol for locks. +/*! + * @brief A protocol for locks. */ @protocol OFLocking -/** - * \brief Locks the lock. +/*! + * @brief Locks the lock. */ - (void)lock; -/** - * \brief Tries to lock the lock. +/*! + * @brief Tries to lock the lock. * - * \return A boolean whether the lock could be locked + * @return A boolean whether the lock could be locked */ - (BOOL)tryLock; -/** - * \brief Unlocks the lock. +/*! + * @brief Unlocks the lock. */ - (void)unlock; @end Index: src/OFMD5Hash.h ================================================================== --- src/OFMD5Hash.h +++ src/OFMD5Hash.h @@ -16,12 +16,12 @@ #import "OFHash.h" #define OF_MD5_DIGEST_SIZE 16 -/** - * \brief A class which provides functions to create an MD5 hash. +/*! + * @brief A class which provides functions to create an MD5 hash. */ @interface OFMD5Hash: OFHash { uint32_t buffer[4]; uint32_t bits[2]; Index: src/OFMutableArray.h ================================================================== --- src/OFMutableArray.h +++ src/OFMutableArray.h @@ -18,145 +18,145 @@ #ifdef OF_HAVE_BLOCKS typedef id (^of_array_replace_block_t)(id obj, size_t idx, BOOL *stop); #endif -/** - * \brief An abstract class for storing, adding and removing objects in anr +/*! + * @brief An abstract class for storing, adding and removing objects in anr * array. */ @interface OFMutableArray: OFArray -/** - * \brief Adds an object to the end of the array. +/*! + * @brief Adds an object to the end of the array. * - * \param object An object to add + * @param object An object to add */ - (void)addObject: (id)object; -/** - * \brief Adds the objects from the specified OFArray to the end of the array. +/*! + * @brief Adds the objects from the specified OFArray to the end of the array. * - * \brief array An array of objects to add + * @brief array An array of objects to add */ - (void)addObjectsFromArray: (OFArray*)array; -/** - * \brief Inserts an object to the OFArray at the specified index. +/*! + * @brief Inserts an object to the OFArray at the specified index. * - * \param object An object to add - * \param index The index where the object should be inserted + * @param object An object to add + * @param index The index where the object should be inserted */ - (void)insertObject: (id)object atIndex: (size_t)index; -/** - * \brief Inserts the objects from the specified OFArray at the specified index. +/*! + * @brief Inserts the objects from the specified OFArray at the specified index. * - * \param array An array of objects - * \param index The index where the objects should be inserted + * @param array An array of objects + * @param index The index where the objects should be inserted */ - (void)insertObjectsFromArray: (OFArray*)array atIndex: (size_t)index; -/** - * \brief Replaces the first object equivalent to the specified object with the +/*! + * @brief Replaces the first object equivalent to the specified object with the * other specified object. * - * \param oldObject The object to replace - * \param newObject The replacement object + * @param oldObject The object to replace + * @param newObject The replacement object */ - (void)replaceObject: (id)oldObject withObject: (id)newObject; -/** - * \brief Replaces the object at the specified index with the specified object. +/*! + * @brief Replaces the object at the specified index with the specified object. * - * \param index The index of the object to replace - * \param object The replacement object + * @param index The index of the object to replace + * @param object The replacement object */ - (void)replaceObjectAtIndex: (size_t)index withObject: (id)object; - (void)setObject: (id)object atIndexedSubscript: (size_t)index; -/** - * \brief Replaces the first object that has the same address as the specified +/*! + * @brief Replaces the first object that has the same address as the specified * object with the other specified object. * - * \param oldObject The object to replace - * \param newObject The replacement object + * @param oldObject The object to replace + * @param newObject The replacement object */ - (void)replaceObjectIdenticalTo: (id)oldObject withObject: (id)newObject; -/** - * \brief Removes the first object equivalent to the specified object. +/*! + * @brief Removes the first object equivalent to the specified object. * - * \param object The object to remove + * @param object The object to remove */ - (void)removeObject: (id)object; -/** - * \brief Removes the first object that has the same address as the specified +/*! + * @brief Removes the first object that has the same address as the specified * object. * - * \param object The object to remove + * @param object The object to remove */ - (void)removeObjectIdenticalTo: (id)object; -/** - * \brief Removes the object at the specified index. +/*! + * @brief Removes the object at the specified index. * - * \param index The index of the object to remove + * @param index The index of the object to remove */ - (void)removeObjectAtIndex: (size_t)index; -/** - * \brief Removes the object in the specified range. +/*! + * @brief Removes the object in the specified range. * - * \param range The range of the objects to remove + * @param range The range of the objects to remove */ - (void)removeObjectsInRange: (of_range_t)range; -/** - * \brief Removes the last object. +/*! + * @brief Removes the last object. */ - (void)removeLastObject; -/** - * \brief Removes all objects. +/*! + * @brief Removes all objects. */ - (void)removeAllObjects; #ifdef OF_HAVE_BLOCKS -/** - * \brief Replaces each object with the object returned by the block. +/*! + * @brief Replaces each object with the object returned by the block. * - * \param block The block which returns a new object for each object + * @param block The block which returns a new object for each object */ - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block; #endif -/** - * \brief Exchange the objects at the specified indices. +/*! + * @brief Exchange the objects at the specified indices. * - * \param index1 The index of the first object to exchange - * \param index2 The index of the second object to exchange + * @param index1 The index of the first object to exchange + * @param index2 The index of the second object to exchange */ - (void)exchangeObjectAtIndex: (size_t)index1 withObjectAtIndex: (size_t)index2; -/** - * \brief Sorts the array. +/*! + * @brief Sorts the array. */ - (void)sort; -/** - * \brief Reverts the order of the objects in the array. +/*! + * @brief Reverts the order of the objects in the array. */ - (void)reverse; -/** - * \brief Converts the mutable array to an immutable array. +/*! + * @brief Converts the mutable array to an immutable array. */ - (void)makeImmutable; @end Index: src/OFMutableDictionary.h ================================================================== --- src/OFMutableDictionary.h +++ src/OFMutableDictionary.h @@ -18,43 +18,43 @@ #ifdef OF_HAVE_BLOCKS typedef id (^of_dictionary_replace_block_t)(id key, id object, BOOL *stop); #endif -/** - * \brief An abstract class for storing and changing objects in a dictionary. +/*! + * @brief An abstract class for storing and changing objects in a dictionary. */ @interface OFMutableDictionary: OFDictionary -/** - * \brief Sets an object for a key. +/*! + * @brief Sets an object for a key. * * A key can be any object that conforms to the OFCopying protocol. * - * \param key The key to set - * \param object The object to set the key to + * @param key The key to set + * @param object The object to set the key to */ - (void)setObject: (id)object forKey: (id)key; - (void)setObject: (id)object forKeyedSubscript: (id)key; -/** - * \brief Removes the object for the specified key from the dictionary. +/*! + * @brief Removes the object for the specified key from the dictionary. * - * \param key The key whose object should be removed + * @param key The key whose object should be removed */ - (void)removeObjectForKey: (id)key; #ifdef OF_HAVE_BLOCKS -/** - * \brief Replaces each object with the object returned by the block. +/*! + * @brief Replaces each object with the object returned by the block. * - * \param block The block which returns a new object for each object + * @param block The block which returns a new object for each object */ - (void)replaceObjectsUsingBlock: (of_dictionary_replace_block_t)block; #endif -/** - * \brief Converts the mutable dictionary to an immutable dictionary. +/*! + * @brief Converts the mutable dictionary to an immutable dictionary. */ - (void)makeImmutable; @end Index: src/OFMutableSet.h ================================================================== --- src/OFMutableSet.h +++ src/OFMutableSet.h @@ -14,50 +14,50 @@ * file. */ #import "OFSet.h" -/** - * \brief An abstract class for a mutable unordered set of unique objects. +/*! + * @brief An abstract class for a mutable unordered set of unique objects. */ @interface OFMutableSet: OFSet -/** - * \brief Adds the specified object to the set. +/*! + * @brief Adds the specified object to the set. * - * \param object The object to add to the set + * @param object The object to add to the set */ - (void)addObject: (id)object; -/** - * \brief Removes the specified object from the set. +/*! + * @brief Removes the specified object from the set. * - * \param object The object to remove from the set + * @param object The object to remove from the set */ - (void)removeObject: (id)object; -/** - * \brief Removes all objects from the receiver that are in the specified set. +/*! + * @brief Removes all objects from the receiver that are in the specified set. * - * \param set The set whose objects will be removed from the receiver + * @param set The set whose objects will be removed from the receiver */ - (void)minusSet: (OFSet*)set; -/** - * \brief Removes all objects from the receiver that are not in the specified +/*! + * @brief Removes all objects from the receiver that are not in the specified * set. * - * \param set The set to intersect + * @param set The set to intersect */ - (void)intersectSet: (OFSet*)set; -/** - * \brief Creates a union of the receiver and the specified set. +/*! + * @brief Creates a union of the receiver and the specified set. * - * \param set The set to create the union with + * @param set The set to create the union with */ - (void)unionSet: (OFSet*)set; -/** - * \brief Converts the mutable set to an immutable set. +/*! + * @brief Converts the mutable set to an immutable set. */ - (void)makeImmutable; @end Index: src/OFMutableString.h ================================================================== --- src/OFMutableString.h +++ src/OFMutableString.h @@ -14,185 +14,185 @@ * file. */ #import "OFString.h" -/** - * \brief A class for storing and modifying strings. +/*! + * @brief A class for storing and modifying strings. */ @interface OFMutableString: OFString -/** - * \brief Sets the character at the specified index. +/*! + * @brief Sets the character at the specified index. * - * \param character The character to set - * \param index The index where to set the character + * @param character The character to set + * @param index The index where to set the character */ - (void)setCharacter: (of_unichar_t)character atIndex: (size_t)index; -/** - * \brief Appends a UTF-8 encoded C string to the OFMutableString. +/*! + * @brief Appends a UTF-8 encoded C string to the OFMutableString. * - * \param UTF8String A UTF-8 encoded C string to append + * @param UTF8String A UTF-8 encoded C string to append */ - (void)appendUTF8String: (const char*)UTF8String; -/** - * \brief Appends a UTF-8 encoded C string with the specified length to the +/*! + * @brief Appends a UTF-8 encoded C string with the specified length to the * OFMutableString. * - * \param UTF8String A UTF-8 encoded C string to append - * \param UTF8StringLength The length of the UTF-8 encoded C string + * @param UTF8String A UTF-8 encoded C string to append + * @param UTF8StringLength The length of the UTF-8 encoded C string */ - (void)appendUTF8String: (const char*)UTF8String length: (size_t)UTF8StringLength; -/** - * \brief Appends a C string with the specified encoding to the OFMutableString. +/*! + * @brief Appends a C string with the specified encoding to the OFMutableString. * - * \param cString A C string to append - * \param encoding The encoding of the C string + * @param cString A C string to append + * @param encoding The encoding of the C string */ - (void)appendCString: (const char*)cString encoding: (of_string_encoding_t)encoding; -/** - * \brief Appends a C string with the specified encoding and length to the +/*! + * @brief Appends a C string with the specified encoding and length to the * OFMutableString. * - * \param cString A C string to append - * \param encoding The encoding of the C string - * \param cStringLength The length of the UTF-8 encoded C string + * @param cString A C string to append + * @param encoding The encoding of the C string + * @param cStringLength The length of the UTF-8 encoded C string */ - (void)appendCString: (const char*)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength; -/** - * \brief Appends another OFString to the OFMutableString. +/*! + * @brief Appends another OFString to the OFMutableString. * - * \param string An OFString to append + * @param string An OFString to append */ - (void)appendString: (OFString*)string; -/** - * \brief Appends a formatted string to the OFMutableString. +/*! + * @brief Appends a formatted string to the OFMutableString. * * See printf for the format syntax. As an addition, %@ is available as format * specifier for objects. * - * \param format A format string which generates the string to append + * @param format A format string which generates the string to append */ - (void)appendFormat: (OFConstantString*)format, ...; -/** - * \brief Appends a formatted string to the OFMutableString. +/*! + * @brief Appends a formatted string to the OFMutableString. * * See printf for the format syntax. As an addition, %@ is available as format * specifier for objects. * - * \param format A format string which generates the string to append - * \param arguments The arguments used in the format string + * @param format A format string which generates the string to append + * @param arguments The arguments used in the format string */ - (void)appendFormat: (OFConstantString*)format arguments: (va_list)arguments; -/** - * \brief Prepends another OFString to the OFMutableString. +/*! + * @brief Prepends another OFString to the OFMutableString. * - * \param string An OFString to prepend + * @param string An OFString to prepend */ - (void)prependString: (OFString*)string; -/** - * \brief Reverses the string. +/*! + * @brief Reverses the string. */ - (void)reverse; -/** - * \brief Converts the string to uppercase. +/*! + * @brief Converts the string to uppercase. */ - (void)uppercase; -/** - * \brief Converts the string to lowercase. +/*! + * @brief Converts the string to lowercase. */ - (void)lowercase; -/** - * \brief Capitalizes the string. +/*! + * @brief Capitalizes the string. * - * \note This only considers spaces, tabs and newlines to be word delimiters! + * @note This only considers spaces, tabs and newlines to be word delimiters! * Also note that this might change in the future to all word delimiters * specified by Unicode! */ - (void)capitalize; -/** - * \brief Inserts a string at the specified index. +/*! + * @brief Inserts a string at the specified index. * - * \param string The string to insert - * \param index The index + * @param string The string to insert + * @param index The index */ - (void)insertString: (OFString*)string atIndex: (size_t)index; -/** - * \brief Deletes the characters at the specified range. +/*! + * @brief Deletes the characters at the specified range. * - * \param range The range of the characters which should be removed + * @param range The range of the characters which should be removed */ - (void)deleteCharactersInRange: (of_range_t)range; -/** - * \brief Replaces the characters at the specified range. +/*! + * @brief Replaces the characters at the specified range. * - * \param range The range of the characters which should be replaced - * \param replacement The string to the replace the characters with + * @param range The range of the characters which should be replaced + * @param replacement The string to the replace the characters with */ - (void)replaceCharactersInRange: (of_range_t)range withString: (OFString*)replacement; -/** - * \brief Replaces all occurrences of a string with another string. +/*! + * @brief Replaces all occurrences of a string with another string. * - * \param string The string to replace - * \param replacement The string with which it should be replaced + * @param string The string to replace + * @param replacement The string with which it should be replaced */ - (void)replaceOccurrencesOfString: (OFString*)string withString: (OFString*)replacement; -/** - * \brief Replaces all occurrences of a string in the specified range with +/*! + * @brief Replaces all occurrences of a string in the specified range with * another string. * - * \param string The string to replace - * \param replacement The string with which it should be replaced - * \param options Options modifying search behaviour + * @param string The string to replace + * @param replacement The string with which it should be replaced + * @param options Options modifying search behaviour * Possible values: None yet - * \param range The range in which the string should be replaced + * @param range The range in which the string should be replaced */ - (void)replaceOccurrencesOfString: (OFString*)string withString: (OFString*)replacement options: (int)options range: (of_range_t)range; -/** - * \brief Deletes all whitespaces at the beginning of the string. +/*! + * @brief Deletes all whitespaces at the beginning of the string. */ - (void)deleteLeadingWhitespaces; -/** - * \brief Deletes all whitespaces at the end of the string. +/*! + * @brief Deletes all whitespaces at the end of the string. */ - (void)deleteTrailingWhitespaces; -/** - * \brief Deletes all whitespaces at the beginning and the end of the string. +/*! + * @brief Deletes all whitespaces at the beginning and the end of the string. */ - (void)deleteEnclosingWhitespaces; -/** - * \brief Converts the mutable string to an immutable string. +/*! + * @brief Converts the mutable string to an immutable string. */ - (void)makeImmutable; @end Index: src/OFMutex.h ================================================================== --- src/OFMutex.h +++ src/OFMutex.h @@ -17,21 +17,21 @@ #import "OFObject.h" #import "OFLocking.h" #import "threading.h" -/** - * \brief A class for creating mutual exclusions. +/*! + * @brief A class for creating mutual exclusions. */ @interface OFMutex: OFObject { of_mutex_t mutex; BOOL initialized; } -/** - * \brief Creates a new mutex. +/*! + * @brief Creates a new mutex. * - * \return A new autoreleased mutex. + * @return A new autoreleased mutex. */ + (instancetype)mutex; @end Index: src/OFNull.h ================================================================== --- src/OFNull.h +++ src/OFNull.h @@ -16,16 +16,16 @@ #import "OFObject.h" #import "OFSerialization.h" #import "OFJSONRepresentation.h" -/** - * \brief A class for representing null values in collections. +/*! + * @brief A class for representing null values in collections. */ @interface OFNull: OFObject -/** - * \brief Returns an OFNull singleton. +/*! + * @brief Returns an OFNull singleton. * - * \return An OFNull singleton + * @return An OFNull singleton */ + (OFNull*)null; @end Index: src/OFNumber.h ================================================================== --- src/OFNumber.h +++ src/OFNumber.h @@ -25,12 +25,12 @@ #import "OFObject.h" #import "OFSerialization.h" #import "OFJSONRepresentation.h" -/** - * \brief The type of a number. +/*! + * @brief The type of a number. */ typedef enum of_number_type_t { OF_NUMBER_BOOL = 0x01, OF_NUMBER_UCHAR = 0x02, OF_NUMBER_USHORT = 0x03, @@ -58,12 +58,12 @@ OF_NUMBER_INTPTR = 0x0E | OF_NUMBER_SIGNED, OF_NUMBER_FLOAT = 0x20, OF_NUMBER_DOUBLE = 0x40 | OF_NUMBER_FLOAT, } of_number_type_t; -/** - * \brief Provides a way to store a number in an object. +/*! + * @brief Provides a way to store a number in an object. */ @interface OFNumber: OFObject { union of_number_value { @@ -99,735 +99,735 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) of_number_type_t type; #endif -/** - * \brief Creates a new OFNumber with the specified BOOL. +/*! + * @brief Creates a new OFNumber with the specified BOOL. * - * \param bool_ A BOOL which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param bool_ A BOOL which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithBool: (BOOL)bool_; -/** - * \brief Creates a new OFNumber with the specified signed char. +/*! + * @brief Creates a new OFNumber with the specified signed char. * - * \param char_ A signed char which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param char_ A signed char which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithChar: (signed char)char_; -/** - * \brief Creates a new OFNumber with the specified signed short. +/*! + * @brief Creates a new OFNumber with the specified signed short. * - * \param short_ A signed short which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param short_ A signed short which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithShort: (signed short)short_; -/** - * \brief Creates a new OFNumber with the specified signed int. +/*! + * @brief Creates a new OFNumber with the specified signed int. * - * \param int_ A signed int which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param int_ A signed int which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithInt: (signed int)int_; -/** - * \brief Creates a new OFNumber with the specified signed long. +/*! + * @brief Creates a new OFNumber with the specified signed long. * - * \param long_ A signed long which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param long_ A signed long which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithLong: (signed long)long_; -/** - * \brief Creates a new OFNumber with the specified unsigned char. +/*! + * @brief Creates a new OFNumber with the specified unsigned char. * - * \param uchar An unsigned char which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uchar An unsigned char which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUnsignedChar: (unsigned char)uchar; -/** - * \brief Creates a new OFNumber with the specified unsigned short. +/*! + * @brief Creates a new OFNumber with the specified unsigned short. * - * \param ushort An unsigned short which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param ushort An unsigned short which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUnsignedShort: (unsigned short)ushort; -/** - * \brief Creates a new OFNumber with the specified unsigned int. +/*! + * @brief Creates a new OFNumber with the specified unsigned int. * - * \param uint An unsigned int which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uint An unsigned int which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUnsignedInt: (unsigned int)uint; -/** - * \brief Creates a new OFNumber with the specified unsigned long. +/*! + * @brief Creates a new OFNumber with the specified unsigned long. * - * \param ulong An unsigned long which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param ulong An unsigned long which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUnsignedLong: (unsigned long)ulong; -/** - * \brief Creates a new OFNumber with the specified int8_t. +/*! + * @brief Creates a new OFNumber with the specified int8_t. * - * \param int8 An int8_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param int8 An int8_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithInt8: (int8_t)int8; -/** - * \brief Creates a new OFNumber with the specified int16_t. +/*! + * @brief Creates a new OFNumber with the specified int16_t. * - * \param int16 An int16_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param int16 An int16_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithInt16: (int16_t)int16; -/** - * \brief Creates a new OFNumber with the specified int32_t. +/*! + * @brief Creates a new OFNumber with the specified int32_t. * - * \param int32 An int32_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param int32 An int32_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithInt32: (int32_t)int32; -/** - * \brief Creates a new OFNumber with the specified int64_t. +/*! + * @brief Creates a new OFNumber with the specified int64_t. * - * \param int64 An int64_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param int64 An int64_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithInt64: (int64_t)int64; -/** - * \brief Creates a new OFNumber with the specified uint8_t. +/*! + * @brief Creates a new OFNumber with the specified uint8_t. * - * \param uint8 A uint8_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uint8 A uint8_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUInt8: (uint8_t)uint8; -/** - * \brief Creates a new OFNumber with the specified uint16_t. +/*! + * @brief Creates a new OFNumber with the specified uint16_t. * - * \param uint16 A uint16_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uint16 A uint16_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUInt16: (uint16_t)uint16; -/** - * \brief Creates a new OFNumber with the specified uint32_t. +/*! + * @brief Creates a new OFNumber with the specified uint32_t. * - * \param uint32 A uint32_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uint32 A uint32_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUInt32: (uint32_t)uint32; -/** - * \brief Creates a new OFNumber with the specified uint64_t. +/*! + * @brief Creates a new OFNumber with the specified uint64_t. * - * \param uint64 A uint64_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uint64 A uint64_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUInt64: (uint64_t)uint64; -/** - * \brief Creates a new OFNumber with the specified size_t. +/*! + * @brief Creates a new OFNumber with the specified size_t. * - * \param size A size_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param size A size_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithSize: (size_t)size; -/** - * \brief Creates a new OFNumber with the specified ssize_t. +/*! + * @brief Creates a new OFNumber with the specified ssize_t. * - * \param ssize An ssize_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param ssize An ssize_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithSSize: (ssize_t)ssize; -/** - * \brief Creates a new OFNumber with the specified intmax_t. +/*! + * @brief Creates a new OFNumber with the specified intmax_t. * - * \param intmax An intmax_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param intmax An intmax_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithIntMax: (intmax_t)intmax; -/** - * \brief Creates a new OFNumber with the specified uintmax_t. +/*! + * @brief Creates a new OFNumber with the specified uintmax_t. * - * \param uintmax A uintmax_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uintmax A uintmax_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUIntMax: (uintmax_t)uintmax; -/** - * \brief Creates a new OFNumber with the specified ptrdiff_t. +/*! + * @brief Creates a new OFNumber with the specified ptrdiff_t. * - * \param ptrdiff A ptrdiff_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param ptrdiff A ptrdiff_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithPtrDiff: (ptrdiff_t)ptrdiff; -/** - * \brief Creates a new OFNumber with the specified intptr_t. +/*! + * @brief Creates a new OFNumber with the specified intptr_t. * - * \param intptr An intptr_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param intptr An intptr_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithIntPtr: (intptr_t)intptr; -/** - * \brief Creates a new OFNumber with the specified uintptr_t. +/*! + * @brief Creates a new OFNumber with the specified uintptr_t. * - * \param uintptr A uintptr_t which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param uintptr A uintptr_t which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithUIntPtr: (uintptr_t)uintptr; -/** - * \brief Creates a new OFNumber with the specified float. +/*! + * @brief Creates a new OFNumber with the specified float. * - * \param float_ A float which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param float_ A float which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithFloat: (float)float_; -/** - * \brief Creates a new OFNumber with the specified double. +/*! + * @brief Creates a new OFNumber with the specified double. * - * \param double_ A double which the OFNumber should contain - * \return A new autoreleased OFNumber + * @param double_ A double which the OFNumber should contain + * @return A new autoreleased OFNumber */ + (instancetype)numberWithDouble: (double)double_; -/** - * \brief Initializes an already allocated OFNumber with the specified BOOL. +/*! + * @brief Initializes an already allocated OFNumber with the specified BOOL. * - * \param bool_ A BOOL which the OFNumber should contain - * \return An initialized OFNumber + * @param bool_ A BOOL which the OFNumber should contain + * @return An initialized OFNumber */ - initWithBool: (BOOL)bool_; -/** - * \brief Initializes an already allocated OFNumber with the specified signed +/*! + * @brief Initializes an already allocated OFNumber with the specified signed * char. * - * \param char_ A signed char which the OFNumber should contain - * \return An initialized OFNumber + * @param char_ A signed char which the OFNumber should contain + * @return An initialized OFNumber */ - initWithChar: (signed char)char_; -/** - * \brief Initializes an already allocated OFNumber with the specified signed +/*! + * @brief Initializes an already allocated OFNumber with the specified signed * short. * - * \param short_ A signed short which the OFNumber should contain - * \return An initialized OFNumber + * @param short_ A signed short which the OFNumber should contain + * @return An initialized OFNumber */ - initWithShort: (signed short)short_; -/** - * \brief Initializes an already allocated OFNumber with the specified signed +/*! + * @brief Initializes an already allocated OFNumber with the specified signed * int. * - * \param int_ A signed int which the OFNumber should contain - * \return An initialized OFNumber + * @param int_ A signed int which the OFNumber should contain + * @return An initialized OFNumber */ - initWithInt: (signed int)int_; -/** - * \brief Initializes an already allocated OFNumber with the specified signed +/*! + * @brief Initializes an already allocated OFNumber with the specified signed * long. * - * \param long_ A signed long which the OFNumber should contain - * \return An initialized OFNumber + * @param long_ A signed long which the OFNumber should contain + * @return An initialized OFNumber */ - initWithLong: (signed long)long_; -/** - * \brief Initializes an already allocated OFNumber with the specified unsigned +/*! + * @brief Initializes an already allocated OFNumber with the specified unsigned * char. * - * \param uchar An unsigned char which the OFNumber should contain - * \return An initialized OFNumber + * @param uchar An unsigned char which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUnsignedChar: (unsigned char)uchar; -/** - * \brief Initializes an already allocated OFNumber with the specified unsigned +/*! + * @brief Initializes an already allocated OFNumber with the specified unsigned * short. * - * \param ushort An unsigned short which the OFNumber should contain - * \return An initialized OFNumber + * @param ushort An unsigned short which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUnsignedShort: (unsigned short)ushort; -/** - * \brief Initializes an already allocated OFNumber with the specified unsigned +/*! + * @brief Initializes an already allocated OFNumber with the specified unsigned * int. * - * \param uint An unsigned int which the OFNumber should contain - * \return An initialized OFNumber + * @param uint An unsigned int which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUnsignedInt: (unsigned int)uint; -/** - * \brief Initializes an already allocated OFNumber with the specified unsigned +/*! + * @brief Initializes an already allocated OFNumber with the specified unsigned * long. * - * \param ulong An unsigned long which the OFNumber should contain - * \return An initialized OFNumber + * @param ulong An unsigned long which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUnsignedLong: (unsigned long)ulong; -/** - * \brief Initializes an already allocated OFNumber with the specified int8_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified int8_t. * - * \param int8 An int8_t which the OFNumber should contain - * \return An initialized OFNumber + * @param int8 An int8_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithInt8: (int8_t)int8; -/** - * \brief Initializes an already allocated OFNumber with the specified int16_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified int16_t. * - * \param int16 An int16_t which the OFNumber should contain - * \return An initialized OFNumber + * @param int16 An int16_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithInt16: (int16_t)int16; -/** - * \brief Initializes an already allocated OFNumber with the specified int32_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified int32_t. * - * \param int32 An int32_t which the OFNumber should contain - * \return An initialized OFNumber + * @param int32 An int32_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithInt32: (int32_t)int32; -/** - * \brief Initializes an already allocated OFNumber with the specified int64_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified int64_t. * - * \param int64 An int64_t which the OFNumber should contain - * \return An initialized OFNumber + * @param int64 An int64_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithInt64: (int64_t)int64; -/** - * \brief Initializes an already allocated OFNumber with the specified uint8_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified uint8_t. * - * \param uint8 A uint8_t which the OFNumber should contain - * \return An initialized OFNumber + * @param uint8 A uint8_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUInt8: (uint8_t)uint8; -/** - * \brief Initializes an already allocated OFNumber with the specified uint16_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified uint16_t. * - * \param uint16 A uint16_t which the OFNumber should contain - * \return An initialized OFNumber + * @param uint16 A uint16_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUInt16: (uint16_t)uint16; -/** - * \brief Initializes an already allocated OFNumber with the specified uint32_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified uint32_t. * - * \param uint32 A uint32_t which the OFNumber should contain - * \return An initialized OFNumber + * @param uint32 A uint32_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUInt32: (uint32_t)uint32; -/** - * \brief Initializes an already allocated OFNumber with the specified uint64_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified uint64_t. * - * \param uint64 A uint64_t which the OFNumber should contain - * \return An initialized OFNumber + * @param uint64 A uint64_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUInt64: (uint64_t)uint64; -/** - * \brief Initializes an already allocated OFNumber with the specified size_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified size_t. * - * \param size A size_t which the OFNumber should contain - * \return An initialized OFNumber + * @param size A size_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithSize: (size_t)size; -/** - * \brief Initializes an already allocated OFNumber with the specified ssize_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified ssize_t. * - * \param ssize An ssize_t which the OFNumber should contain - * \return An initialized OFNumber + * @param ssize An ssize_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithSSize: (ssize_t)ssize; -/** - * \brief Initializes an already allocated OFNumber with the specified intmax_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified intmax_t. * - * \param intmax An intmax_t which the OFNumber should contain - * \return An initialized OFNumber + * @param intmax An intmax_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithIntMax: (intmax_t)intmax; -/** - * \brief Initializes an already allocated OFNumber with the specified +/*! + * @brief Initializes an already allocated OFNumber with the specified * uintmax_t. * - * \param uintmax A uintmax_t which the OFNumber should contain - * \return An initialized OFNumber + * @param uintmax A uintmax_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUIntMax: (uintmax_t)uintmax; -/** - * \brief Initializes an already allocated OFNumber with the specified +/*! + * @brief Initializes an already allocated OFNumber with the specified * ptrdiff_t. * - * \param ptrdiff A ptrdiff_t which the OFNumber should contain - * \return An initialized OFNumber + * @param ptrdiff A ptrdiff_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithPtrDiff: (ptrdiff_t)ptrdiff; -/** - * \brief Initializes an already allocated OFNumber with the specified intptr_t. +/*! + * @brief Initializes an already allocated OFNumber with the specified intptr_t. * - * \param intptr An intptr_t which the OFNumber should contain - * \return An initialized OFNumber + * @param intptr An intptr_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithIntPtr: (intptr_t)intptr; -/** - * \brief Initializes an already allocated OFNumber with the specified +/*! + * @brief Initializes an already allocated OFNumber with the specified * uintptr_t. * - * \param uintptr A uintptr_t which the OFNumber should contain - * \return An initialized OFNumber + * @param uintptr A uintptr_t which the OFNumber should contain + * @return An initialized OFNumber */ - initWithUIntPtr: (uintptr_t)uintptr; -/** - * \brief Initializes an already allocated OFNumber with the specified float. +/*! + * @brief Initializes an already allocated OFNumber with the specified float. * - * \param float_ A float which the OFNumber should contain - * \return An initialized OFNumber + * @param float_ A float which the OFNumber should contain + * @return An initialized OFNumber */ - initWithFloat: (float)float_; -/** - * \brief Initializes an already allocated OFNumber with the specified double. +/*! + * @brief Initializes an already allocated OFNumber with the specified double. * - * \param double_ A double which the OFNumber should contain - * \return An initialized OFNumber + * @param double_ A double which the OFNumber should contain + * @return An initialized OFNumber */ - initWithDouble: (double)double_; -/** - * \brief Returns the type of the number. +/*! + * @brief Returns the type of the number. * - * \return An of_number_type_t indicating the type of the number + * @return An of_number_type_t indicating the type of the number */ - (of_number_type_t)type; -/** - * \brief Returns the OFNumber as a BOOL. +/*! + * @brief Returns the OFNumber as a BOOL. * - * \return The OFNumber as a BOOL + * @return The OFNumber as a BOOL */ - (BOOL)boolValue; -/** - * \brief Returns the OFNumber as a signed char. +/*! + * @brief Returns the OFNumber as a signed char. * - * \return The OFNumber as a signed char + * @return The OFNumber as a signed char */ - (signed char)charValue; -/** - * \brief Returns the OFNumber as a signed short. +/*! + * @brief Returns the OFNumber as a signed short. * - * \return The OFNumber as a short + * @return The OFNumber as a short */ - (signed short)shortValue; -/** - * \brief Returns the OFNumber as a signed int. +/*! + * @brief Returns the OFNumber as a signed int. * - * \return The OFNumber as an int + * @return The OFNumber as an int */ - (signed int)intValue; -/** - * \brief Returns the OFNumber as a signed long. +/*! + * @brief Returns the OFNumber as a signed long. * - * \return The OFNumber as a long + * @return The OFNumber as a long */ - (signed long)longValue; -/** - * \brief Returns the OFNumber as an unsigned char. +/*! + * @brief Returns the OFNumber as an unsigned char. * - * \return The OFNumber as an unsigned char + * @return The OFNumber as an unsigned char */ - (unsigned char)unsignedCharValue; -/** - * \brief Returns the OFNumber as an unsigned short. +/*! + * @brief Returns the OFNumber as an unsigned short. * - * \return The OFNumber as an unsigned short + * @return The OFNumber as an unsigned short */ - (unsigned short)unsignedShortValue; -/** - * \brief Returns the OFNumber as an unsigned int. +/*! + * @brief Returns the OFNumber as an unsigned int. * - * \return The OFNumber as an unsigned int + * @return The OFNumber as an unsigned int */ - (unsigned int)unsignedIntValue; -/** - * \brief Returns the OFNumber as an unsigned long. +/*! + * @brief Returns the OFNumber as an unsigned long. * - * \return The OFNumber as an unsigned long + * @return The OFNumber as an unsigned long */ - (unsigned long)unsignedLongValue; -/** - * \brief Returns the OFNumber as an int8_t. +/*! + * @brief Returns the OFNumber as an int8_t. * - * \return The OFNumber as an int8_t + * @return The OFNumber as an int8_t */ - (int8_t)int8Value; -/** - * \brief Returns the OFNumber as an int16_t. +/*! + * @brief Returns the OFNumber as an int16_t. * - * \return The OFNumber as an int16_t + * @return The OFNumber as an int16_t */ - (int16_t)int16Value; -/** - * \brief Returns the OFNumber as an int32_t. +/*! + * @brief Returns the OFNumber as an int32_t. * - * \return The OFNumber as an int32_t + * @return The OFNumber as an int32_t */ - (int32_t)int32Value; -/** - * \brief Returns the OFNumber as an int64_t. +/*! + * @brief Returns the OFNumber as an int64_t. * - * \return The OFNumber as an int64_t + * @return The OFNumber as an int64_t */ - (int64_t)int64Value; -/** - * \brief Returns the OFNumber as a uint8_t. +/*! + * @brief Returns the OFNumber as a uint8_t. * - * \return The OFNumber as a uint8_t + * @return The OFNumber as a uint8_t */ - (uint8_t)uInt8Value; -/** - * \brief Returns the OFNumber as a uint16_t. +/*! + * @brief Returns the OFNumber as a uint16_t. * - * \return The OFNumber as a uint16_t + * @return The OFNumber as a uint16_t */ - (uint16_t)uInt16Value; -/** - * \brief Returns the OFNumber as a uint32_t. +/*! + * @brief Returns the OFNumber as a uint32_t. * - * \return The OFNumber as a uint32_t + * @return The OFNumber as a uint32_t */ - (uint32_t)uInt32Value; -/** - * \brief Returns the OFNumber as a uint64_t. +/*! + * @brief Returns the OFNumber as a uint64_t. * - * \return The OFNumber as a uint64_t + * @return The OFNumber as a uint64_t */ - (uint64_t)uInt64Value; -/** - * \brief Returns the OFNumber as a size_t. +/*! + * @brief Returns the OFNumber as a size_t. * - * \return The OFNumber as a size_t + * @return The OFNumber as a size_t */ - (size_t)sizeValue; -/** - * \brief Returns the OFNumber as an ssize_t. +/*! + * @brief Returns the OFNumber as an ssize_t. * - * \return The OFNumber as an ssize_t + * @return The OFNumber as an ssize_t */ - (ssize_t)sSizeValue; -/** - * \brief Returns the OFNumber as an intmax_t. +/*! + * @brief Returns the OFNumber as an intmax_t. * - * \return The OFNumber as an intmax_t + * @return The OFNumber as an intmax_t */ - (intmax_t)intMaxValue; -/** - * \brief Returns the OFNumber as a uintmax_t. +/*! + * @brief Returns the OFNumber as a uintmax_t. * - * \return The OFNumber as a uintmax_t + * @return The OFNumber as a uintmax_t */ - (uintmax_t)uIntMaxValue; -/** - * \brief Returns the OFNumber as a ptrdiff_t. +/*! + * @brief Returns the OFNumber as a ptrdiff_t. * - * \return The OFNumber as a ptrdiff_t + * @return The OFNumber as a ptrdiff_t */ - (ptrdiff_t)ptrDiffValue; -/** - * \brief Returns the OFNumber as an intptr_t. +/*! + * @brief Returns the OFNumber as an intptr_t. * - * \return The OFNumber as an intptr_t + * @return The OFNumber as an intptr_t */ - (intptr_t)intPtrValue; -/** - * \brief Returns the OFNumber as a uintptr_t. +/*! + * @brief Returns the OFNumber as a uintptr_t. * - * \return The OFNumber as a uintptr_t + * @return The OFNumber as a uintptr_t */ - (uintptr_t)uIntPtrValue; -/** - * \brief Returns the OFNumber as a float. +/*! + * @brief Returns the OFNumber as a float. * - * \return The OFNumber as a float + * @return The OFNumber as a float */ - (float)floatValue; -/** - * \brief Returns the OFNumber as a double. +/*! + * @brief Returns the OFNumber as a double. * - * \return The OFNumber as a double + * @return The OFNumber as a double */ - (double)doubleValue; -/** - * \brief Creates a new OFNumber by adding the specified number. +/*! + * @brief Creates a new OFNumber by adding the specified number. * - * \param num The OFNumber to add - * \return A new autoreleased OFNumber added with the specified OFNumber + * @param num The OFNumber to add + * @return A new autoreleased OFNumber added with the specified OFNumber */ - (OFNumber*)numberByAddingNumber: (OFNumber*)num; -/** - * \brief Creates a new OFNumber by subtracting the specified number. +/*! + * @brief Creates a new OFNumber by subtracting the specified number. * - * \param num The OFNumber to substract - * \return A new autoreleased OFNumber subtracted by the specified OFNumber + * @param num The OFNumber to substract + * @return A new autoreleased OFNumber subtracted by the specified OFNumber */ - (OFNumber*)numberBySubtractingNumber: (OFNumber*)num; -/** - * \brief Creates a new OFNumber by multiplying with the specified number. +/*! + * @brief Creates a new OFNumber by multiplying with the specified number. * - * \param num The OFNumber to multiply with - * \return A new autoreleased OFNumber multiplied with the specified OFNumber + * @param num The OFNumber to multiply with + * @return A new autoreleased OFNumber multiplied with the specified OFNumber */ - (OFNumber*)numberByMultiplyingWithNumber: (OFNumber*)num; -/** - * \brief Creates a new OFNumber by dividing with with the specified number. +/*! + * @brief Creates a new OFNumber by dividing with with the specified number. * - * \param num The OFNumber to divide by - * \return A new autoreleased OFNumber devided by the specified OFNumber + * @param num The OFNumber to divide by + * @return A new autoreleased OFNumber devided by the specified OFNumber */ - (OFNumber*)numberByDividingWithNumber: (OFNumber*)num; -/** - * \brief Creates a new OFNumber by ANDing with the specified number. +/*! + * @brief Creates a new OFNumber by ANDing with the specified number. * * Does not work with floating point types! * - * \param num The number to AND with. - * \return A new autoreleased OFNumber ANDed with the specified OFNumber + * @param num The number to AND with. + * @return A new autoreleased OFNumber ANDed with the specified OFNumber */ - (OFNumber*)numberByANDingWithNumber: (OFNumber*)num; -/** - * \brief Creates a new OFNumber by ORing with the specified number. - * - * Does not work with floating point types! - * - * \param num The number to OR with. - * \return A new autoreleased OFNumber ORed with the specified OFNumber - */ -- (OFNumber*)numberByORingWithNumber: (OFNumber*)num; - -/** - * \brief Creates a new OFNumber by XORing with the specified number. - * - * Does not work with floating point types! - * - * \param num The number to XOR with. - * \return A new autoreleased OFNumber XORed with the specified OFNumber - */ -- (OFNumber*)numberByXORingWithNumber: (OFNumber*)num; - -/** - * \brief Creates a new OFNumber by shifting to the left by the specified number +/*! + * @brief Creates a new OFNumber by ORing with the specified number. + * + * Does not work with floating point types! + * + * @param num The number to OR with. + * @return A new autoreleased OFNumber ORed with the specified OFNumber + */ +- (OFNumber*)numberByORingWithNumber: (OFNumber*)num; + +/*! + * @brief Creates a new OFNumber by XORing with the specified number. + * + * Does not work with floating point types! + * + * @param num The number to XOR with. + * @return A new autoreleased OFNumber XORed with the specified OFNumber + */ +- (OFNumber*)numberByXORingWithNumber: (OFNumber*)num; + +/*! + * @brief Creates a new OFNumber by shifting to the left by the specified number * of bits. * * Does not work with floating point types! * - * \param num The number of bits to shift to the left - * \return A new autoreleased OFNumber bitshifted to the left with the + * @param num The number of bits to shift to the left + * @return A new autoreleased OFNumber bitshifted to the left with the * specified OFNumber */ - (OFNumber*)numberByShiftingLeftWithNumber: (OFNumber*)num; -/** - * \brief Creates a new OFNumber by shifting to the right by the specified +/*! + * @brief Creates a new OFNumber by shifting to the right by the specified * number of bits. * * Does not work with floating point types! * - * \param num The number of bits to shift to the right - * \return A new autoreleased OFNumber bitshifted to the right with the + * @param num The number of bits to shift to the right + * @return A new autoreleased OFNumber bitshifted to the right with the * specified OFNumber */ - (OFNumber*)numberByShiftingRightWithNumber: (OFNumber*)num; -/** - * \brief Creates a new OFNumber by with the same value increased by one. +/*! + * @brief Creates a new OFNumber by with the same value increased by one. * - * \return A new autoreleased OFNumber with the value increased by one. + * @return A new autoreleased OFNumber with the value increased by one. */ - (OFNumber*)numberByIncreasing; -/** - * \brief Creates a new OFNumber by with the same value decreased by one. +/*! + * @brief Creates a new OFNumber by with the same value decreased by one. * - * \return A new autoreleased OFNumber with the value decreased by one. + * @return A new autoreleased OFNumber with the value decreased by one. */ - (OFNumber*)numberByDecreasing; -/** - * \brief Creates a new OFNumber with the remainder of a division with the +/*! + * @brief Creates a new OFNumber with the remainder of a division with the * specified number. * - * \param num The number to divide by - * \return The remainder of a division by the specified number + * @param num The number to divide by + * @return The remainder of a division by the specified number */ - (OFNumber*)remainderOfDivisionWithNumber: (OFNumber*)num; @end #ifndef NSINTEGER_DEFINED /* Required for number literals to work */ @compatibility_alias NSNumber OFNumber; #endif Index: src/OFObject+Serialization.h ================================================================== --- src/OFObject+Serialization.h +++ src/OFObject+Serialization.h @@ -24,16 +24,16 @@ extern int _OFObject_Serialization_reference; #ifdef __cplusplus } #endif -/** - * \brief A category that provides methods for serializing objects. +/*! + * @brief A category that provides methods for serializing objects. */ @interface OFObject (OFSerialization) -/** - * \brief Creates a string by serializing the receiver. +/*! + * @brief Creates a string by serializing the receiver. * - * \return The object serialized as a string + * @return The object serialized as a string */ - (OFString*)stringBySerializing; @end Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -102,12 +102,12 @@ #endif #define OF_RETAIN_COUNT_MAX UINT_MAX #define OF_NOT_FOUND SIZE_MAX -/** - * \brief A result of a comparison. +/*! + * @brief A result of a comparison. */ typedef enum of_comparison_result_t { /// The left object is smaller than the right OF_ORDERED_ASCENDING = -1, /// Both objects are equal @@ -114,46 +114,46 @@ OF_ORDERED_SAME = 0, /// The left object is bigger than the right OF_ORDERED_DESCENDING = 1 } of_comparison_result_t; -/** - * \brief An enum for storing endianess. +/*! + * @brief An enum for storing endianess. */ typedef enum of_byte_order_t { OF_BYTE_ORDER_BIG_ENDIAN, OF_BYTE_ORDER_LITTLE_ENDIAN } of_byte_order_t; -/** - * \brief A range. +/*! + * @brief A range. */ typedef struct of_range_t { /// The start of the range size_t location; /// The length of the range size_t length; } of_range_t; -/** - * \brief A point. +/*! + * @brief A point. */ typedef struct of_point_t { float x; float y; } of_point_t; -/** - * \brief A dimension. +/*! + * @brief A dimension. */ typedef struct of_dimension_t { float width; float height; } of_dimension_t; -/** - * \brief A rectangle. +/*! + * @brief A rectangle. */ typedef struct of_rectangle_t { of_point_t origin; of_dimension_t size; @@ -160,348 +160,348 @@ } of_rectangle_t; @class OFString; @class OFThread; -/** - * \brief The protocol which all root classes implement. +/*! + * @brief The protocol which all root classes implement. */ @protocol OFObject -/** - * \brief Returns the class of the object. +/*! + * @brief Returns the class of the object. * - * \return The class of the object + * @return The class of the object */ - (Class)class; -/** - * \brief Returns a boolean whether the object of the specified kind. +/*! + * @brief Returns a boolean whether the object of the specified kind. * - * \param class_ The class whose kind is checked - * \return A boolean whether the object is of the specified kind + * @param class_ The class whose kind is checked + * @return A boolean whether the object is of the specified kind */ - (BOOL)isKindOfClass: (Class)class_; -/** - * \brief Returns a boolean whether the object is a member of the specified +/*! + * @brief Returns a boolean whether the object is a member of the specified * class. * - * \param class_ The class for which the receiver is checked - * \return A boolean whether the object is a member of the specified class + * @param class_ The class for which the receiver is checked + * @return A boolean whether the object is a member of the specified class */ - (BOOL)isMemberOfClass: (Class)class_; -/** - * \brief Returns a boolean whether the object responds to the specified +/*! + * @brief Returns a boolean whether the object responds to the specified * selector. * - * \param selector The selector which should be checked for respondance - * \return A boolean whether the objects responds to the specified selector + * @param selector The selector which should be checked for respondance + * @return A boolean whether the objects responds to the specified selector */ - (BOOL)respondsToSelector: (SEL)selector; -/** - * \brief Checks whether the object conforms to the specified protocol. +/*! + * @brief Checks whether the object conforms to the specified protocol. * - * \param protocol The protocol which should be checked for conformance - * \return A boolean whether the object conforms to the specified protocol + * @param protocol The protocol which should be checked for conformance + * @return A boolean whether the object conforms to the specified protocol */ - (BOOL)conformsToProtocol: (Protocol*)protocol; -/** - * \brief Returns the implementation for the specified selector. +/*! + * @brief Returns the implementation for the specified selector. * - * \param selector The selector for which the method should be returned - * \return The implementation for the specified selector + * @param selector The selector for which the method should be returned + * @return The implementation for the specified selector */ - (IMP)methodForSelector: (SEL)selector; -/** - * \brief Returns the type encoding for the specified selector. +/*! + * @brief Returns the type encoding for the specified selector. * - * \param selector The selector for which the type encoding should be returned - * \return The type encoding for the specified selector + * @param selector The selector for which the type encoding should be returned + * @return The type encoding for the specified selector */ - (const char*)typeEncodingForSelector: (SEL)selector; -/** - * \brief Performs the specified selector. +/*! + * @brief Performs the specified selector. * - * \param selector The selector to perform - * \return The object returned by the method specified by the selector + * @param selector The selector to perform + * @return The object returned by the method specified by the selector */ - (id)performSelector: (SEL)selector; -/** - * \brief Performs the specified selector with the specified object. +/*! + * @brief Performs the specified selector with the specified object. * - * \param selector The selector to perform - * \param object The object that is passed to the method specified by the + * @param selector The selector to perform + * @param object The object that is passed to the method specified by the * selector - * \return The object returned by the method specified by the selector + * @return The object returned by the method specified by the selector */ - (id)performSelector: (SEL)selector withObject: (id)object; -/** - * \brief Performs the specified selector with the specified objects. +/*! + * @brief Performs the specified selector with the specified objects. * - * \param selector The selector to perform - * \param object1 The first object that is passed to the method specified by the + * @param selector The selector to perform + * @param object1 The first object that is passed to the method specified by the * selector - * \param object2 The second object that is passed to the method specified by + * @param object2 The second object that is passed to the method specified by * the selector - * \return The object returned by the method specified by the selector + * @return The object returned by the method specified by the selector */ - (id)performSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2; -/** - * \brief Checks two objects for equality. +/*! + * @brief Checks two objects for equality. * * Classes containing data (like strings, arrays, lists etc.) should reimplement * this! * - * \param object The object which should be tested for equality - * \return A boolean whether the object is equal to the specified object + * @param object The object which should be tested for equality + * @return A boolean whether the object is equal to the specified object */ - (BOOL)isEqual: (id)object; -/** - * \brief Calculates a hash for the object. +/*! + * @brief Calculates a hash for the object. * * Classes containing data (like strings, arrays, lists etc.) should reimplement * this! * - * \return A 32 bit hash for the object + * @return A 32 bit hash for the object */ - (uint32_t)hash; -/** - * \brief Increases the retain count. +/*! + * @brief Increases the retain count. * * Each time an object is released, the retain count gets decreased and the * object deallocated if it reaches 0. */ - retain; -/** - * \brief Returns the retain count. +/*! + * @brief Returns the retain count. * - * \return The retain count + * @return The retain count */ - (unsigned int)retainCount; -/** - * \brief Decreases the retain count. +/*! + * @brief Decreases the retain count. * * Each time an object is released, the retain count gets decreased and the * object deallocated if it reaches 0. */ - (void)release; -/** - * \brief Adds the object to the topmost OFAutoreleasePool of the thread's +/*! + * @brief Adds the object to the topmost OFAutoreleasePool of the thread's * autorelease pool stack. * - * \return The object + * @return The object */ - autorelease; -/** - * \brief Returns the receiver. +/*! + * @brief Returns the receiver. * - * \return The receiver + * @return The receiver */ - self; -/** - * \brief Returns whether the object is a proxy object. +/*! + * @brief Returns whether the object is a proxy object. * - * \return A boolean whether the object is a proxy object + * @return A boolean whether the object is a proxy object */ - (BOOL)isProxy; @end -/** - * \brief The root class for all other classes inside ObjFW. +/*! + * @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 +/*! + * @brief A method which is called once when the class is loaded into the * runtime. * * Derived classes can overide this to execute their own code when the class is * loaded. */ + (void)load; -/** - * \brief A method which is called the moment before the first call to the class +/*! + * @brief A method which is called the moment before the first call to the class * is being made. * * Derived classes can override this to execute their own code on * initialization. They should make sure to not execute any code if self is not * the class itself, as it might happen that the method was called for a * subclass which did not override this method. */ + (void)initialize; -/** - * \brief Allocates memory for an instance of the class and sets up the memory - * pool for the object. - * - * This method will never return nil, instead, it will throw an - * OFAllocFailedException. - * - * \return The allocated object - */ -+ alloc; - -/** - * \brief Allocates memory for a new instance and calls -[init] on it. - * \return An allocated and initialized object - */ -+ new; - -/** - * \brief Returns the class. - * - * \return The class - */ -+ (Class)class; - -/** - * \brief Returns the name of the class as a string. - * - * \return The name of the class as a string - */ -+ (OFString*)className; - -/** - * \brief Returns a boolean whether the class is a subclass of the specified - * class. - * - * \param class_ The class which is checked for being a superclass - * \return A boolean whether the class is a subclass of the specified class - */ -+ (BOOL)isSubclassOfClass: (Class)class_; - -/** - * \brief Returns the superclass of the class. - * - * \return The superclass of the class - */ -+ (Class)superclass; - -/** - * \brief Checks whether instances of the class respond to a given selector. - * - * \param selector The selector which should be checked for respondance - * \return A boolean whether instances of the class respond to the specified - * selector - */ -+ (BOOL)instancesRespondToSelector: (SEL)selector; - -/** - * \brief Checks whether the class conforms to a given protocol. - * - * \param protocol The protocol which should be checked for conformance - * \return A boolean whether the class conforms to the specified protocol - */ -+ (BOOL)conformsToProtocol: (Protocol*)protocol; - -/** - * \brief Returns the implementation of the instance method for the specified - * selector. - * - * \param selector The selector for which the method should be returned - * \return The implementation of the instance method for the specified selector - * or nil if it isn't implemented - */ -+ (IMP)instanceMethodForSelector: (SEL)selector; - -/** - * \brief Returns the type encoding of the instance method for the specified - * selector. - * - * \param selector The selector for which the type encoding should be returned - * \return The type encoding of the instance method for the specified selector - */ -+ (const char*)typeEncodingForInstanceSelector: (SEL)selector; - -/** - * \brief Returns a description for the class, which is usually the class name. - * - * This is mostly for debugging purposes. - * - * \return A description for the class, which is usually the class name - */ -+ (OFString*)description; - -/** - * \brief Replaces a class method with a class method from another class. - * - * \param selector The selector of the class method to replace - * \param class_ The class from which the new class method should be taken - * \return The old implementation - */ -+ (IMP)replaceClassMethod: (SEL)selector - withMethodFromClass: (Class)class_; - -/** - * \brief Replaces an instance method with an instance method from another - * class. - * - * \param selector The selector of the instance method to replace - * \param class_ The class from which the new instance method should be taken - * \return The old implementation - */ -+ (IMP)replaceInstanceMethod: (SEL)selector - withMethodFromClass: (Class)class_; - -/** - * \brief Replaces or adds a class method. - * - * If the method already exists, it is replaced and the old implementation - * returned. If the method does not exist, it is added with the specified type - * encoding. - * - * \param selector The selector for the new method - * \param implementation The implementation for the new method - * \param typeEncoding The type encoding for the new method - * \return The old implementation or nil if the method was added - */ -+ (IMP)replaceClassMethod: (SEL)selector - withImplementation: (IMP)implementation - typeEncoding: (const char*)typeEncoding; - -/** - * \brief Replaces or adds an instance method. - * - * If the method already exists, it is replaced and the old implementation - * returned. If the method does not exist, it is added with the specified type - * encoding. - * - * \param selector The selector for the new method - * \param implementation The implementation for the new method - * \param typeEncoding The type encoding for the new method - * \return The old implementation or nil if the method was added - */ -+ (IMP)replaceInstanceMethod: (SEL)selector - withImplementation: (IMP)implementation - typeEncoding: (const char*)typeEncoding; - -/** - * \brief Adds all methods from the specified class to the class that is the +/*! + * @brief Allocates memory for an instance of the class and sets up the memory + * pool for the object. + * + * This method will never return nil, instead, it will throw an + * OFAllocFailedException. + * + * @return The allocated object + */ ++ alloc; + +/*! + * @brief Allocates memory for a new instance and calls -[init] on it. + * @return An allocated and initialized object + */ ++ new; + +/*! + * @brief Returns the class. + * + * @return The class + */ ++ (Class)class; + +/*! + * @brief Returns the name of the class as a string. + * + * @return The name of the class as a string + */ ++ (OFString*)className; + +/*! + * @brief Returns a boolean whether the class is a subclass of the specified + * class. + * + * @param class_ The class which is checked for being a superclass + * @return A boolean whether the class is a subclass of the specified class + */ ++ (BOOL)isSubclassOfClass: (Class)class_; + +/*! + * @brief Returns the superclass of the class. + * + * @return The superclass of the class + */ ++ (Class)superclass; + +/*! + * @brief Checks whether instances of the class respond to a given selector. + * + * @param selector The selector which should be checked for respondance + * @return A boolean whether instances of the class respond to the specified + * selector + */ ++ (BOOL)instancesRespondToSelector: (SEL)selector; + +/*! + * @brief Checks whether the class conforms to a given protocol. + * + * @param protocol The protocol which should be checked for conformance + * @return A boolean whether the class conforms to the specified protocol + */ ++ (BOOL)conformsToProtocol: (Protocol*)protocol; + +/*! + * @brief Returns the implementation of the instance method for the specified + * selector. + * + * @param selector The selector for which the method should be returned + * @return The implementation of the instance method for the specified selector + * or nil if it isn't implemented + */ ++ (IMP)instanceMethodForSelector: (SEL)selector; + +/*! + * @brief Returns the type encoding of the instance method for the specified + * selector. + * + * @param selector The selector for which the type encoding should be returned + * @return The type encoding of the instance method for the specified selector + */ ++ (const char*)typeEncodingForInstanceSelector: (SEL)selector; + +/*! + * @brief Returns a description for the class, which is usually the class name. + * + * This is mostly for debugging purposes. + * + * @return A description for the class, which is usually the class name + */ ++ (OFString*)description; + +/*! + * @brief Replaces a class method with a class method from another class. + * + * @param selector The selector of the class method to replace + * @param class_ The class from which the new class method should be taken + * @return The old implementation + */ ++ (IMP)replaceClassMethod: (SEL)selector + withMethodFromClass: (Class)class_; + +/*! + * @brief Replaces an instance method with an instance method from another + * class. + * + * @param selector The selector of the instance method to replace + * @param class_ The class from which the new instance method should be taken + * @return The old implementation + */ ++ (IMP)replaceInstanceMethod: (SEL)selector + withMethodFromClass: (Class)class_; + +/*! + * @brief Replaces or adds a class method. + * + * If the method already exists, it is replaced and the old implementation + * returned. If the method does not exist, it is added with the specified type + * encoding. + * + * @param selector The selector for the new method + * @param implementation The implementation for the new method + * @param typeEncoding The type encoding for the new method + * @return The old implementation or nil if the method was added + */ ++ (IMP)replaceClassMethod: (SEL)selector + withImplementation: (IMP)implementation + typeEncoding: (const char*)typeEncoding; + +/*! + * @brief Replaces or adds an instance method. + * + * If the method already exists, it is replaced and the old implementation + * returned. If the method does not exist, it is added with the specified type + * encoding. + * + * @param selector The selector for the new method + * @param implementation The implementation for the new method + * @param typeEncoding The type encoding for the new method + * @return The old implementation or nil if the method was added + */ ++ (IMP)replaceInstanceMethod: (SEL)selector + withImplementation: (IMP)implementation + typeEncoding: (const char*)typeEncoding; + +/*! + * @brief Adds all methods from the specified class to the class that is the * receiver. * * Methods implemented by the receiving class itself will not be overridden, * however methods implemented by its superclass will. Therefore it behaves * similar as if the specified class is the superclass of the receiver. @@ -512,339 +512,339 @@ * 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. +/*! + * @brief Try to resolve the specified class method. * * This method is called if a class method was not found, so that an * implementation can be provided at runtime. * - * \return Whether the method has been added to the class + * @return Whether the method has been added to the class */ + (BOOL)resolveClassMethod: (SEL)selector; -/** - * \brief Try to resolve the specified instance method. +/*! + * @brief Try to resolve the specified instance method. * * This method is called if an instance method was not found, so that an * implementation can be provided at runtime. * - * \return Whether the method has been added to the class + * @return Whether the method has been added to the class */ + (BOOL)resolveInstanceMethod: (SEL)selector; -/** - * \brief Initializes an already allocated object. +/*! + * @brief Initializes an already allocated object. * * Derived classes may override this, but need to do self = [super init] before * they do any initialization themselves. init may never return nil, instead * an exception (for example OFInitializationFailed) should be thrown. * - * \return An initialized object + * @return An initialized object */ - init; -/** - * \brief Returns the name of the object's class. +/*! + * @brief Returns the name of the object's class. * - * \return The name of the object's class + * @return The name of the object's class */ - (OFString*)className; -/** - * \brief Returns a description for the object. +/*! + * @brief Returns a description for the object. * * This is mostly for debugging purposes. * - * \return A description for the object + * @return A description for the object */ - (OFString*)description; -/** - * \brief Allocates memory and stores it in the object's memory pool. +/*! + * @brief Allocates memory and stores it in the object's memory pool. * * It will be free'd automatically when the object is deallocated. * - * \param size The size of the memory to allocate - * \return A pointer to the allocated memory + * @param size The size of the memory to allocate + * @return A pointer to the allocated memory */ - (void*)allocMemoryWithSize: (size_t)size; -/** - * \brief Allocates memory for the specified number of items and stores it in +/*! + * @brief Allocates memory for the specified number of items and stores it in * the object's memory pool. * * It will be free'd automatically when the object is deallocated. * - * \param size The size of each item to allocate - * \param count The number of items to allocate - * \return A pointer to the allocated memory + * @param size The size of each item to allocate + * @param count The number of items to allocate + * @return A pointer to the allocated memory */ - (void*)allocMemoryWithSize: (size_t)size count: (size_t)count; -/** - * \brief Resizes memory in the object's memory pool to the specified size. +/*! + * @brief Resizes memory in the object's memory pool to the specified size. * * If the pointer is NULL, this is equivalent to allocating memory. * If the size is 0, this is equivalent to freeing memory. * - * \param pointer A pointer to the already allocated memory - * \param size The new size for the memory chunk - * \return A pointer to the resized memory chunk + * @param pointer A pointer to the already allocated memory + * @param size The new size for the memory chunk + * @return A pointer to the resized memory chunk */ - (void*)resizeMemory: (void*)pointer size: (size_t)size; -/** - * \brief Resizes memory in the object's memory pool to the specific number of +/*! + * @brief Resizes memory in the object's memory pool to the specific number of * items of the specified size. * * If the pointer is NULL, this is equivalent to allocating memory. * If the size or number of items is 0, this is equivalent to freeing memory. * - * \param pointer A pointer to the already allocated memory - * \param size The size of each item to resize to - * \param count The number of items to resize to - * \return A pointer to the resized memory chunk + * @param pointer A pointer to the already allocated memory + * @param size The size of each item to resize to + * @param count The number of items to resize to + * @return A pointer to the resized memory chunk */ - (void*)resizeMemory: (void*)pointer size: (size_t)size count: (size_t)count; -/** - * \brief Frees allocated memory and removes it from the object's memory pool. +/*! + * @brief Frees allocated memory and removes it from the object's memory pool. * * Does nothing if the pointer is NULL. * - * \param pointer A pointer to the allocated memory + * @param pointer A pointer to the allocated memory */ - (void)freeMemory: (void*)pointer; -/** - * \brief Deallocates the object. +/*! + * @brief Deallocates the object. * * It is automatically called when the retain count reaches zero. * * This also frees all memory in its memory pool. */ - (void)dealloc; -/** - * \brief Performs the specified selector after the specified delay. +/*! + * @brief Performs the specified selector after the specified delay. * - * \param selector The selector to perform - * \param delay The delay after which the selector will be performed + * @param selector The selector to perform + * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector afterDelay: (double)delay; -/** - * \brief Performs the specified selector with the specified object after the +/*! + * @brief Performs the specified selector with the specified object after the * specified delay. * - * \param selector The selector to perform - * \param object The object that is passed to the method specified by the + * @param selector The selector to perform + * @param object The object that is passed to the method specified by the * selector - * \param delay The delay after which the selector will be performed + * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector withObject: (id)object afterDelay: (double)delay; -/** - * \brief Performs the specified selector with the specified objects after the +/*! + * @brief Performs the specified selector with the specified objects after the * specified delay. * - * \param selector The selector to perform - * \param object1 The first object that is passed to the method specified by the + * @param selector The selector to perform + * @param object1 The first object that is passed to the method specified by the * selector - * \param object2 The second object that is passed to the method specified by + * @param object2 The second object that is passed to the method specified by * the selector - * \param delay The delay after which the selector will be performed + * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2 afterDelay: (double)delay; -/** - * \brief Performs the specified selector on the specified thread. +/*! + * @brief Performs the specified selector on the specified thread. * - * \param selector The selector to perform - * \param thread The thread on which to perform the selector - * \param waitUntilDone Whether to wait until the perform finished + * @param selector The selector to perform + * @param thread The thread on which to perform the selector + * @param waitUntilDone Whether to wait until the perform finished */ - (void)performSelector: (SEL)selector onThread: (OFThread*)thread waitUntilDone: (BOOL)waitUntilDone; -/** - * \brief Performs the specified selector on the specified thread with the +/*! + * @brief Performs the specified selector on the specified thread with the * specified object. * - * \param selector The selector to perform - * \param thread The thread on which to perform the selector - * \param object The object that is passed to the method specified by the + * @param selector The selector to perform + * @param thread The thread on which to perform the selector + * @param object The object that is passed to the method specified by the * selector - * \param waitUntilDone Whether to wait until the perform finished + * @param waitUntilDone Whether to wait until the perform finished */ - (void)performSelector: (SEL)selector onThread: (OFThread*)thread withObject: (id)object waitUntilDone: (BOOL)waitUntilDone; -/** - * \brief Performs the specified selector on the specified thread with the +/*! + * @brief Performs the specified selector on the specified thread with the * specified objects. * - * \param selector The selector to perform - * \param thread The thread on which to perform the selector - * \param object1 The first object that is passed to the method specified by the + * @param selector The selector to perform + * @param thread The thread on which to perform the selector + * @param object1 The first object that is passed to the method specified by the * selector - * \param object2 The second object that is passed to the method specified by + * @param object2 The second object that is passed to the method specified by * the selector - * \param waitUntilDone Whether to wait until the perform finished + * @param waitUntilDone Whether to wait until the perform finished */ - (void)performSelector: (SEL)selector onThread: (OFThread*)thread withObject: (id)object1 withObject: (id)object2 waitUntilDone: (BOOL)waitUntilDone; -/** - * \brief Performs the specified selector on the main thread. +/*! + * @brief Performs the specified selector on the main thread. * - * \param selector The selector to perform - * \param waitUntilDone Whether to wait until the perform finished + * @param selector The selector to perform + * @param waitUntilDone Whether to wait until the perform finished */ - (void)performSelectorOnMainThread: (SEL)selector waitUntilDone: (BOOL)waitUntilDone; -/** - * \brief Performs the specified selector on the main thread with the specified +/*! + * @brief Performs the specified selector on the main thread with the specified * object. * - * \param selector The selector to perform - * \param object The object that is passed to the method specified by the + * @param selector The selector to perform + * @param object The object that is passed to the method specified by the * selector - * \param waitUntilDone Whether to wait until the perform finished + * @param waitUntilDone Whether to wait until the perform finished */ - (void)performSelectorOnMainThread: (SEL)selector withObject: (id)object waitUntilDone: (BOOL)waitUntilDone; -/** - * \brief Performs the specified selector on the main thread with the specified +/*! + * @brief Performs the specified selector on the main thread with the specified * objects. * - * \param selector The selector to perform - * \param object1 The first object that is passed to the method specified by the + * @param selector The selector to perform + * @param object1 The first object that is passed to the method specified by the * selector - * \param object2 The second object that is passed to the method specified by + * @param object2 The second object that is passed to the method specified by * the selector - * \param waitUntilDone Whether to wait until the perform finished + * @param waitUntilDone Whether to wait until the perform finished */ - (void)performSelectorOnMainThread: (SEL)selector withObject: (id)object1 withObject: (id)object2 waitUntilDone: (BOOL)waitUntilDone; -/** - * \brief Performs the specified selector on the specified thread after the +/*! + * @brief Performs the specified selector on the specified thread after the * specified delay. * - * \param selector The selector to perform - * \param thread The thread on which to perform the selector - * \param delay The delay after which the selector will be performed + * @param selector The selector to perform + * @param thread The thread on which to perform the selector + * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector onThread: (OFThread*)thread afterDelay: (double)delay; -/** - * \brief Performs the specified selector on the specified thread with the +/*! + * @brief Performs the specified selector on the specified thread with the * specified object after the specified delay. * - * \param selector The selector to perform - * \param thread The thread on which to perform the selector - * \param object The object that is passed to the method specified by the + * @param selector The selector to perform + * @param thread The thread on which to perform the selector + * @param object The object that is passed to the method specified by the * selector - * \param delay The delay after which the selector will be performed + * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector onThread: (OFThread*)thread withObject: (id)object afterDelay: (double)delay; -/** - * \brief Performs the specified selector on the specified thread with the +/*! + * @brief Performs the specified selector on the specified thread with the * specified objects after the specified delay. * - * \param selector The selector to perform - * \param thread The thread on which to perform the selector - * \param object1 The first object that is passed to the method specified by the + * @param selector The selector to perform + * @param thread The thread on which to perform the selector + * @param object1 The first object that is passed to the method specified by the * selector - * \param object2 The second object that is passed to the method specified by + * @param object2 The second object that is passed to the method specified by * the selector - * \param delay The delay after which the selector will be performed + * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector onThread: (OFThread*)thread withObject: (id)object1 withObject: (id)object2 afterDelay: (double)delay; @end -/** - * \brief A protocol for the creation of copies. +/*! + * @brief A protocol for the creation of copies. */ @protocol OFCopying -/** - * \brief Copies the object. +/*! + * @brief Copies the object. * * For classes which can be immutable or mutable, this returns an immutable * copy. If only a mutable version of the class exists, it creates a mutable * copy. * - * \return A copy of the object + * @return A copy of the object */ - copy; @end -/** - * \brief A protocol for the creation of mutable copies. +/*! + * @brief A protocol for the creation of mutable copies. * * This protocol is implemented by objects that can be mutable and immutable * and allows returning a mutable copy. */ @protocol OFMutableCopying -/** - * \brief Creates a mutable copy of the object. +/*! + * @brief Creates a mutable copy of the object. * - * \return A mutable copy of the object + * @return A mutable copy of the object */ - mutableCopy; @end -/** - * \brief A protocol for comparing objects. +/*! + * @brief A protocol for comparing objects. * * This protocol is implemented by objects that can be compared. */ @protocol OFComparing -/** - * \brief Compares the object with another object. +/*! + * @brief Compares the object with another object. * - * \param object An object to compare the object to - * \return The result of the comparison + * @param object An object to compare the object to + * @return The result of the comparison */ - (of_comparison_result_t)compare: (id )object; @end #import "OFObject+Serialization.h" Index: src/OFPlugin.h ================================================================== --- src/OFPlugin.h +++ src/OFPlugin.h @@ -23,21 +23,21 @@ #else # include typedef HMODULE of_plugin_handle_t; #endif -/** - * \brief Provides a system for loading plugins at runtime. +/*! + * @brief Provides a system for loading plugins at runtime. */ @interface OFPlugin: OFObject { of_plugin_handle_t handle; } -/** - * \brief Loads a plugin from a file. +/*! + * @brief Loads a plugin from a file. * - * \param path Path to the plugin file. The suffix is appended automatically. - * \return The loaded plugin + * @param path Path to the plugin file. The suffix is appended automatically. + * @return The loaded plugin */ + (id)pluginFromFile: (OFString*)path; @end Index: src/OFProcess.h ================================================================== --- src/OFProcess.h +++ src/OFProcess.h @@ -27,12 +27,12 @@ #ifdef _WIN32 # include #endif -/** - * \brief A class for stream-like communication with a newly created process. +/*! + * @brief A class for stream-like communication with a newly created process. */ @interface OFProcess: OFStream { #ifndef _WIN32 pid_t pid; @@ -42,88 +42,88 @@ #endif int status; BOOL atEndOfStream; } -/** - * \brief Creates a new OFProcess with the specified program and invokes the - * program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \return A new, autoreleased OFProcess. - */ -+ (instancetype)processWithProgram: (OFString*)program; - -/** - * \brief Creates a new OFProcess with the specified program and arguments and - * invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param arguments The arguments to pass to the program, or nil - * \return A new, autoreleased OFProcess. - */ -+ (instancetype)processWithProgram: (OFString*)program - arguments: (OFArray*)arguments; - -/** - * \brief Creates a new OFProcess with the specified program, program name and - * arguments and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param programName The program name for the program to invoke (argv[0]). - * Usually, this is equal to program. - * \param arguments The arguments to pass to the program, or nil - * \return A new, autoreleased OFProcess. - */ -+ (instancetype)processWithProgram: (OFString*)program - programName: (OFString*)programName - arguments: (OFArray*)arguments; - -/** - * \brief Initializes an already allocated OFProcess with the specified program - * and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \return An initialized OFProcess. - */ -- initWithProgram: (OFString*)program; - -/** - * \brief Initializes an already allocated OFProcess with the specified program - * and arguments and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param arguments The arguments to pass to the program, or nil - * \return An initialized OFProcess. - */ -- initWithProgram: (OFString*)program - arguments: (OFArray*)arguments; - -/** - * \brief Initializes an already allocated OFProcess with the specified program, - * program name and arguments and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param programName The program name for the program to invoke (argv[0]). - * Usually, this is equal to program. - * \param arguments The arguments to pass to the program, or nil - * \return An initialized OFProcess. - */ -- initWithProgram: (OFString*)program - programName: (OFString*)programName - arguments: (OFArray*)arguments; - -/** - * \brief Closes the write direction of the process. +/*! + * @brief Creates a new OFProcess with the specified program and invokes the + * program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @return A new, autoreleased OFProcess. + */ ++ (instancetype)processWithProgram: (OFString*)program; + +/*! + * @brief Creates a new OFProcess with the specified program and arguments and + * invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param arguments The arguments to pass to the program, or nil + * @return A new, autoreleased OFProcess. + */ ++ (instancetype)processWithProgram: (OFString*)program + arguments: (OFArray*)arguments; + +/*! + * @brief Creates a new OFProcess with the specified program, program name and + * arguments and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param programName The program name for the program to invoke (argv[0]). + * Usually, this is equal to program. + * @param arguments The arguments to pass to the program, or nil + * @return A new, autoreleased OFProcess. + */ ++ (instancetype)processWithProgram: (OFString*)program + programName: (OFString*)programName + arguments: (OFArray*)arguments; + +/*! + * @brief Initializes an already allocated OFProcess with the specified program + * and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @return An initialized OFProcess. + */ +- initWithProgram: (OFString*)program; + +/*! + * @brief Initializes an already allocated OFProcess with the specified program + * and arguments and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param arguments The arguments to pass to the program, or nil + * @return An initialized OFProcess. + */ +- initWithProgram: (OFString*)program + arguments: (OFArray*)arguments; + +/*! + * @brief Initializes an already allocated OFProcess with the specified program, + * program name and arguments and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param programName The program name for the program to invoke (argv[0]). + * Usually, this is equal to program. + * @param arguments The arguments to pass to the program, or nil + * @return An initialized OFProcess. + */ +- initWithProgram: (OFString*)program + programName: (OFString*)programName + arguments: (OFArray*)arguments; + +/*! + * @brief Closes the write direction of the process. * * This method needs to be called for some programs before data can be read, * since some programs don't start processing before the write direction is * closed. */ - (void)closeForWriting; @end Index: src/OFRecursiveMutex.h ================================================================== --- src/OFRecursiveMutex.h +++ src/OFRecursiveMutex.h @@ -17,22 +17,22 @@ #import "OFObject.h" #import "OFLocking.h" #import "threading.h" -/** - * \brief A class for creating mutual exclusions which can be entered +/*! + * @brief A class for creating mutual exclusions which can be entered * recursively. */ @interface OFRecursiveMutex: OFObject { of_rmutex_t rmutex; BOOL initialized; } -/** - * \brief Creates a new recursive mutex. +/*! + * @brief Creates a new recursive mutex. * - * \return A new autoreleased recursive mutex. + * @return A new autoreleased recursive mutex. */ + (instancetype)mutex; @end Index: src/OFRunLoop.h ================================================================== --- src/OFRunLoop.h +++ src/OFRunLoop.h @@ -21,31 +21,31 @@ @class OFSortedList; @class OFTimer; @class OFMutableDictionary; -/** - * \brief A class providing a run loop for the application and its processes. +/*! + * @brief A class providing a run loop for the application and its processes. */ @interface OFRunLoop: OFObject { OFSortedList *timersQueue; OFStreamObserver *streamObserver; OFMutableDictionary *readQueues; } -/** - * \brief Returns the main run loop. +/*! + * @brief Returns the main run loop. * - * \return The main run loop + * @return The main run loop */ + (OFRunLoop*)mainRunLoop; -/** - * \brief Returns the run loop for the current thread. +/*! + * @brief Returns the run loop for the current thread. * - * \return The run loop for the current thread + * @return The run loop for the current thread */ + (OFRunLoop*)currentRunLoop; + (void)OF_setMainRunLoop; + (void)OF_addAsyncReadForStream: (OFStream*)stream @@ -79,17 +79,17 @@ block: (of_stream_async_read_line_block_t)block; + (void)OF_addAsyncAcceptForTCPSocket: (OFTCPSocket*)socket block: (of_tcpsocket_async_accept_block_t)block; #endif -/** - * \brief Adds an OFTimer to the run loop. +/*! + * @brief Adds an OFTimer to the run loop. * - * \param timer The timer to add + * @param timer The timer to add */ - (void)addTimer: (OFTimer*)timer; -/** - * \brief Starts the run loop. +/*! + * @brief Starts the run loop. */ - (void)run; @end Index: src/OFSHA1Hash.h ================================================================== --- src/OFSHA1Hash.h +++ src/OFSHA1Hash.h @@ -16,16 +16,16 @@ #import "OFHash.h" #define OF_SHA1_DIGEST_SIZE 20 -/** - * \brief A class which provides functions to create an SHA1 hash. +/*! + * @brief A class which provides functions to create an SHA1 hash. */ @interface OFSHA1Hash: OFHash { uint32_t state[5]; uint64_t count; char buffer[64]; uint8_t digest[OF_SHA1_DIGEST_SIZE]; } @end Index: src/OFSeekableStream.h ================================================================== --- src/OFSeekableStream.h +++ src/OFSeekableStream.h @@ -23,76 +23,76 @@ #include #import "OFStream.h" -/** - * \brief A stream that supports seeking. +/*! + * @brief A stream that supports seeking. * - * \note If you want to subclass this, override lowlevelSeekToOffset:, + * @note If you want to subclass this, override lowlevelSeekToOffset:, * lowlevelSeekForwardWithOffset: and lowlevelSeekToOffsetRelativeToEnd:, * but nothing else. Those are not defined in the headers, but do the * actual work. OFSeekableStream uses those and makes them work together * with the caching of OFStream. If you override these methods without * the lowlevel prefix, you will break caching, get broken results * and seek to the wrong position! */ @interface OFSeekableStream: OFStream -/** - * \brief Seeks to the specified absolute offset. - * - * \param offset The offset in bytes - */ -- (void)seekToOffset: (off_t)offset; - -/** - * \brief Seeks to the specified offset, relative to the current location. - * - * \param offset The offset relative to the current location - * \return The absolute offset - */ -- (off_t)seekForwardWithOffset: (off_t)offset; - -/** - * \brief Seeks to the specified offset, relative to the end of the stream. - * - * \param offset The offset relative to the end of the stream - * \return The absolute offset - */ -- (off_t)seekToOffsetRelativeToEnd: (off_t)offset; - -/** - * \brief Seek the stream on the lowlevel. - * - * \warning Do not call this directly! - * - * Override this with this method with your actual seek implementation when - * subclassing! - * - * \param offset The offset to seek to - */ -- (void)lowlevelSeekToOffset: (off_t)offset; - -/** - * \brief Seek the stream on the lowlevel. - * - * \warning Do not call this directly! - * - * Override this with this method with your actual seek implementation when - * subclassing! - * - * \param offset The offset to seek forward to - */ -- (off_t)lowlevelSeekForwardWithOffset: (off_t)offset; - -/** - * \brief Seek the stream on the lowlevel. - * - * \warning Do not call this directly! - * - * Override this with this method with your actual seek implementation when - * subclassing! - * - * \param offset The offset to seek to, relative to the end +/*! + * @brief Seeks to the specified absolute offset. + * + * @param offset The offset in bytes + */ +- (void)seekToOffset: (off_t)offset; + +/*! + * @brief Seeks to the specified offset, relative to the current location. + * + * @param offset The offset relative to the current location + * @return The absolute offset + */ +- (off_t)seekForwardWithOffset: (off_t)offset; + +/*! + * @brief Seeks to the specified offset, relative to the end of the stream. + * + * @param offset The offset relative to the end of the stream + * @return The absolute offset + */ +- (off_t)seekToOffsetRelativeToEnd: (off_t)offset; + +/*! + * @brief Seek the stream on the lowlevel. + * + * @warning Do not call this directly! + * + * Override this with this method with your actual seek implementation when + * subclassing! + * + * @param offset The offset to seek to + */ +- (void)lowlevelSeekToOffset: (off_t)offset; + +/*! + * @brief Seek the stream on the lowlevel. + * + * @warning Do not call this directly! + * + * Override this with this method with your actual seek implementation when + * subclassing! + * + * @param offset The offset to seek forward to + */ +- (off_t)lowlevelSeekForwardWithOffset: (off_t)offset; + +/*! + * @brief Seek the stream on the lowlevel. + * + * @warning Do not call this directly! + * + * Override this with this method with your actual seek implementation when + * subclassing! + * + * @param offset The offset to seek to, relative to the end */ - (off_t)lowlevelSeekToOffsetRelativeToEnd: (off_t)offset; @end Index: src/OFSerialization.h ================================================================== --- src/OFSerialization.h +++ src/OFSerialization.h @@ -18,24 +18,24 @@ #define OF_SERIALIZATION_NS @"https://webkeks.org/objfw/serialization" @class OFXMLElement; -/** - * \brief A protocol for serializing objects. +/*! + * @brief A protocol for serializing objects. */ @protocol OFSerialization -/** - * \brief Initializes the object with the specified XML element serialization. +/*! + * @brief Initializes the object with the specified XML element serialization. * - * \param element An OFXMLElement with the serialized object - * \return An initialized object + * @param element An OFXMLElement with the serialized object + * @return An initialized object */ - initWithSerialization: (OFXMLElement*)element; -/** - * \brief Serializes the object into an XML element. +/*! + * @brief Serializes the object into an XML element. * - * \return The object serialized into an XML element + * @return The object serialized into an XML element */ - (OFXMLElement*)XMLElementBySerializing; @end Index: src/OFSet.h ================================================================== --- src/OFSet.h +++ src/OFSet.h @@ -32,132 +32,132 @@ #ifdef OF_HAVE_BLOCKS typedef void (^of_set_enumeration_block_t)(id object, BOOL *stop); typedef BOOL (^of_set_filter_block_t)(id object); #endif -/** - * \brief An abstract class for an unordered set of unique objects. +/*! + * @brief An abstract class for an unordered set of unique objects. */ @interface OFSet: OFObject -/** - * \brief Creates a new set. +/*! + * @brief Creates a new set. * - * \return A new, autoreleased set + * @return A new, autoreleased set */ + (instancetype)set; -/** - * \brief Creates a new set with the specified set. +/*! + * @brief Creates a new set with the specified set. * - * \param set The set to initialize the set with - * \return A new, autoreleased set with the specified set + * @param set The set to initialize the set with + * @return A new, autoreleased set with the specified set */ + (instancetype)setWithSet: (OFSet*)set; -/** - * \brief Creates a new set with the specified array. +/*! + * @brief Creates a new set with the specified array. * - * \param array The array to initialize the set with - * \return A new, autoreleased set with the specified array + * @param array The array to initialize the set with + * @return A new, autoreleased set with the specified array */ + (instancetype)setWithArray: (OFArray*)array; -/** - * \brief Creates a new set with the specified objects. +/*! + * @brief Creates a new set with the specified objects. * - * \param firstObject The first object for the set - * \return A new, autoreleased set with the specified objects + * @param firstObject The first object for the set + * @return A new, autoreleased set with the specified objects */ + (instancetype)setWithObjects: (id)firstObject, ...; -/** - * \brief Creates a new set with the specified objects. +/*! + * @brief Creates a new set with the specified objects. * - * \param objects An array of objects for the set - * \param count The number of objects in the specified array - * \return A new, autoreleased set with the specified objects + * @param objects An array of objects for the set + * @param count The number of objects in the specified array + * @return A new, autoreleased set with the specified objects */ + (instancetype)setWithObjects: (id const*)objects count: (size_t)count; -/** - * \brief Initializes an already allocated set with the specified set. +/*! + * @brief Initializes an already allocated set with the specified set. * - * \param set The set to initialize the set with - * \return An initialized set with the specified set + * @param set The set to initialize the set with + * @return An initialized set with the specified set */ - initWithSet: (OFSet*)set; -/** - * \brief Initializes an already allocated set with the specified array. +/*! + * @brief Initializes an already allocated set with the specified array. * - * \param array The array to initialize the set with - * \return An initialized set with the specified array + * @param array The array to initialize the set with + * @return An initialized set with the specified array */ - initWithArray: (OFArray*)array; -/** - * \brief Initializes an already allocated set with the specified objects. +/*! + * @brief Initializes an already allocated set with the specified objects. * - * \param firstObject The first object for the set - * \return An initialized set with the specified objects + * @param firstObject The first object for the set + * @return An initialized set with the specified objects */ - initWithObjects: (id)firstObject, ...; -/** - * \brief Initializes an already allocated set with the specified objects. +/*! + * @brief Initializes an already allocated set with the specified objects. * - * \param objects An array of objects for the set - * \param count The number of objects in the specified array - * \return An initialized set with the specified objects + * @param objects An array of objects for the set + * @param count The number of objects in the specified array + * @return An initialized set with the specified objects */ - initWithObjects: (id const*)objects count: (size_t)count; -/** - * \brief Initializes an already allocated set with the specified object and +/*! + * @brief Initializes an already allocated set with the specified object and * va_list. * - * \param firstObject The first object for the set - * \param arguments A va_list with the other objects - * \return An initialized set with the specified object and va_list + * @param firstObject The first object for the set + * @param arguments A va_list with the other objects + * @return An initialized set with the specified object and va_list */ - initWithObject: (id)firstObject arguments: (va_list)arguments; -/** - * \brief Returns whether the receiver is a subset of the specified set. +/*! + * @brief Returns whether the receiver is a subset of the specified set. * - * \return Whether the receiver is a subset of the specified set + * @return Whether the receiver is a subset of the specified set */ - (BOOL)isSubsetOfSet: (OFSet*)set; -/** - * \brief Returns whether the receiver and the specified set have at least one +/*! + * @brief Returns whether the receiver and the specified set have at least one * object in common. * - * \return Whether the receiver and the specified set have at least one object + * @return Whether the receiver and the specified set have at least one object * in common */ - (BOOL)intersectsSet: (OFSet*)set; #ifdef OF_HAVE_BLOCKS -/** - * \brief Executes a block for each object in the set. +/*! + * @brief Executes a block for each object in the set. * - * \param block The block to execute for each object in the set + * @param block The block to execute for each object in the set */ - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block; -/** - * \brief Creates a new set, only containing the objects for which the block +/*! + * @brief Creates a new set, only containing the objects for which the block * returns YES. * - * \param block A block which determines if the object should be in the new set - * \return A new, autoreleased OFSet + * @param block A block which determines if the object should be in the new set + * @return A new, autoreleased OFSet */ - (OFSet*)filteredSetUsingBlock: (of_set_filter_block_t)block; #endif @end #import "OFMutableSet.h" Index: src/OFSortedList.h ================================================================== --- src/OFSortedList.h +++ src/OFSortedList.h @@ -14,20 +14,20 @@ * file. */ #import "OFList.h" -/** - * \brief A class which provides easy to use sorted double-linked lists. +/*! + * @brief A class which provides easy to use sorted double-linked lists. * - * \warning Because the list is sorted, all methods inserting an object at a + * @warning Because the list is sorted, all methods inserting an object at a * specific place are unavailable, even though they exist in OFList! */ @interface OFSortedList: OFList -/** - * \brief Adds the object to the list while keeping the list sorted. +/*! + * @brief Adds the object to the list while keeping the list sorted. * - * \param object The object to add - * \return The list object for the object just added + * @param object The object to add + * @return The list object for the object just added */ - (of_list_object_t*)addObject: (id )object; @end Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -35,21 +35,21 @@ OFException*); typedef BOOL (^of_stream_async_read_line_block_t)(OFStream*, OFString*, OFException*); #endif -/** - * \brief A base class for different types of streams. +/*! + * @brief A base class for different types of streams. * - * \warning Even though the OFCopying protocol is implemented, it does + * @warning Even though the OFCopying protocol is implemented, it does * not return an independent copy of the stream, but instead * retains it. This is so that the stream can be used as a key for a * dictionary, so context can be associated with a stream. Using a * stream in more than one thread at the same time is not thread-safe, * even if copy was called to create one "instance" for every thread! * - * \note If you want to subclass this, override lowlevelReadIntoBuffer:length:, + * @note If you want to subclass this, override lowlevelReadIntoBuffer:length:, * lowlevelWriteBuffer:length: and lowlevelIsAtEndOfStream, but nothing * else, as those are are the methods that do the actual work. OFStream * uses those for all other methods and does all the caching and other * stuff for you. If you override these methods without the lowlevel * prefix, you will break caching and get broken results! @@ -67,146 +67,146 @@ #ifdef OF_HAVE_PROPERTIES @property (getter=isBlocking) BOOL blocking; @property (readonly, getter=isAtEndOfStream) BOOL atEndOfStream; #endif -/** - * \brief Returns a boolean whether the end of the stream has been reached. +/*! + * @brief Returns a boolean whether the end of the stream has been reached. * - * \return A boolean whether the end of the stream has been reached + * @return A boolean whether the end of the stream has been reached */ - (BOOL)isAtEndOfStream; -/** - * \brief Reads at most size bytes from the stream into a buffer. +/*! + * @brief Reads at most size bytes from the stream into a buffer. * * On network streams, this might read less than the specified number of bytes. * If you want to read exactly the specified number of bytes, use * -readIntoBuffer:exactLength:. Note that a read can even return 0 bytes - * this does not necessarily mean that the stream ended, so you still need to * check isAtEndOfStream. * - * \param buffer The buffer into which the data is read - * \param length The length of the data that should be read at most. + * @param buffer The buffer into which the data is read + * @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 + * @return The number of bytes read */ - (size_t)readIntoBuffer: (void*)buffer length: (size_t)size; -/** - * \brief Reads exactly the specified length bytes from the stream into a +/*! + * @brief Reads exactly the specified length bytes from the stream into a * buffer. * * Unlike readIntoBuffer:length:, this method does not return when less than the * specified length has been read - instead, it waits until it got exactly the * specified length. * - * \warning Only call this when you know that specified amount of data is + * @warning Only call this when you know that specified amount of data is * available! Otherwise you will get an exception! * - * \param buffer The buffer into which the data is read - * \param length The length of the data that should be read. + * @param buffer The buffer into which the data is read + * @param length The length of the data that should be read. * The buffer must be exactly this big! */ - (void)readIntoBuffer: (void*)buffer exactLength: (size_t)length; -/** - * \brief Asyncronously reads at most size bytes from the stream into a +/*! + * @brief Asyncronously reads at most size bytes from the stream into a * buffer. * * On network streams, this might read less than the specified number of bytes. * If you want to read exactly the specified number of bytes, use * asyncReadIntoBuffer:exactLength:block:. Note that a read can even return 0 * bytes - this does not necessarily mean that the stream ended, so you still * need to check isAtEndOfStream. * - * \param buffer The buffer into which the data is read. + * @param buffer The buffer into which the data is read. * The buffer must not be free'd before the async read completed! - * \param length The length of the data that should be read at most. + * @param length The length of the data that should be read at most. * The buffer must be at least this big! - * \param target The target on which the selector should be called when the + * @param target The target on which the selector should be called when the * data has been received. If the method returns YES, it will be * called again with the same buffer and maximum length when more * data has been received. If you want the next method in the * queue to handle the data received next, you need to return NO * from the method. - * \param selector The selector to call on the target. The signature must be + * @param selector The selector to call on the target. The signature must be * BOOL (OFStream *stream, void *buffer, size_t size, * OFException *exception). */ - (void)asyncReadIntoBuffer: (void*)buffer length: (size_t)length target: (id)target selector: (SEL)selector; -/** - * \brief Asyncronously reads exactly the specified length bytes from the +/*! + * @brief Asyncronously reads exactly the specified length bytes from the * stream into a buffer. * * Unlike asyncReadIntoBuffer:length:block, this method does not call the * method when less than the specified length has been read - instead, it waits * until it got exactly the specified length, the stream has ended or an * exception occurred. * - * \param buffer The buffer into which the data is read - * \param length The length of the data that should be read. + * @param buffer The buffer into which the data is read + * @param length The length of the data that should be read. * The buffer must be exactly this big! - * \param target The target on which the selector should be called when the + * @param target The target on which the selector should be called when the * data has been received. If the method returns YES, it will be * called again with the same buffer and exact length when more * data has been received. If you want the next method in the * queue to handle the data received next, you need to return NO * from the method. - * \param selector The selector to call on the target. The signature must be + * @param selector The selector to call on the target. The signature must be * BOOL (OFStream *stream, void *buffer, size_t size, * OFException *exception). */ - (void)asyncReadIntoBuffer: (void*)buffer exactLength: (size_t)length target: (id)target selector: (SEL)selector; #ifdef OF_HAVE_BLOCKS -/** - * \brief Asyncronously reads at most size bytes from the stream into a +/*! + * @brief Asyncronously reads at most size bytes from the stream into a * buffer. * * On network streams, this might read less than the specified number of bytes. * If you want to read exactly the specified number of bytes, use * asyncReadIntoBuffer:exactLength:block:. Note that a read can even return 0 * bytes - this does not necessarily mean that the stream ended, so you still * need to check isAtEndOfStream. * - * \param buffer The buffer into which the data is read. + * @param buffer The buffer into which the data is read. * The buffer must not be free'd before the async read completed! - * \param length The length of the data that should be read at most. + * @param length The length of the data that should be read at most. * The buffer must be at least this big! - * \param block The block to call when the data has been received. + * @param block The block to call when the data has been received. * If the block returns YES, it will be called again with the same * buffer and maximum length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return NO from the block. */ - (void)asyncReadIntoBuffer: (void*)buffer length: (size_t)length block: (of_stream_async_read_block_t)block; -/** - * \brief Asyncronously reads exactly the specified length bytes from the +/*! + * @brief Asyncronously reads exactly the specified length bytes from the * stream into a buffer. * * Unlike asyncReadIntoBuffer:length:block, this method does not invoke the * block when less than the specified length has been read - instead, it waits * until it got exactly the specified length, the stream has ended or an * exception occurred. * - * \param buffer The buffer into which the data is read - * \param length The length of the data that should be read. + * @param buffer The buffer into which the data is read + * @param length The length of the data that should be read. * The buffer must be exactly this big! - * \param block The block to call when the data has been received. + * @param block The block to call when the data has been received. * If the block returns YES, it will be called again with the same * buffer and exact length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return NO from the block. */ @@ -213,834 +213,834 @@ - (void)asyncReadIntoBuffer: (void*)buffer exactLength: (size_t)length block: (of_stream_async_read_block_t)block; #endif -/** - * \brief Reads a uint8_t from the stream. +/*! + * @brief Reads a uint8_t from the stream. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A uint8_t from the stream + * @return A uint8_t from the stream */ - (uint8_t)readInt8; -/** - * \brief Reads a uint16_t from the stream which is encoded in big endian. +/*! + * @brief Reads a uint16_t from the stream which is encoded in big endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A uint16_t from the stream in native endianess + * @return A uint16_t from the stream in native endianess */ - (uint16_t)readBigEndianInt16; -/** - * \brief Reads a uint32_t from the stream which is encoded in big endian. +/*! + * @brief Reads a uint32_t from the stream which is encoded in big endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A uint32_t from the stream in the native endianess + * @return A uint32_t from the stream in the native endianess */ - (uint32_t)readBigEndianInt32; -/** - * \brief Reads a uint64_t from the stream which is encoded in big endian. +/*! + * @brief Reads a uint64_t from the stream which is encoded in big endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A uint64_t from the stream in the native endianess + * @return A uint64_t from the stream in the native endianess */ - (uint64_t)readBigEndianInt64; -/** - * \brief Reads a float from the stream which is encoded in big endian. +/*! + * @brief Reads a float from the stream which is encoded in big endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A float from the stream in the native endianess + * @return A float from the stream in the native endianess */ - (float)readBigEndianFloat; -/** - * \brief Reads a double from the stream which is encoded in big endian. +/*! + * @brief Reads a double from the stream which is encoded in big endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A double from the stream in the native endianess + * @return A double from the stream in the native endianess */ - (double)readBigEndianDouble; -/** - * \brief Reads the specified number of uint16_ts from the stream which are +/*! + * @brief Reads the specified number of uint16_ts from the stream which are * encoded in big endian. * - * \warning Only call this when you know that enough data is available! + * @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 + * @param nInt16s The number of uint16_ts to read + * @param buffer A buffer of sufficient size to store the specified number of * uint16_ts - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readBigEndianInt16sIntoBuffer: (uint16_t*)buffer count: (size_t)nInt16s; -/** - * \brief Reads the specified number of uint32_ts from the stream which are +/*! + * @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! + * @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 + * @param nInt32s The number of uint32_ts to read + * @param buffer A buffer of sufficient size to store the specified number of * uint32_ts - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readBigEndianInt32sIntoBuffer: (uint32_t*)buffer count: (size_t)nInt32s; -/** - * \brief Reads the specified number of uint64_ts from the stream which are +/*! + * @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! + * @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 + * @param nInt64s The number of uint64_ts to read + * @param buffer A buffer of sufficient size to store the specified number of * uint64_ts - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readBigEndianInt64sIntoBuffer: (uint64_t*)buffer count: (size_t)nInt64s; -/** - * \brief Reads the specified number of floats from the stream which are encoded +/*! + * @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! + * @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 + * @param nFloatss The number of floats to read + * @param buffer A buffer of sufficient size to store the specified number of * floats - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readBigEndianFloatsIntoBuffer: (float*)buffer count: (size_t)nFloats; -/** - * \brief Reads the specified number of doubles from the stream which are +/*! + * @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! + * @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 + * @param nDoubles The number of doubles to read + * @param buffer A buffer of sufficient size to store the specified number of * doubles - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readBigEndianDoublesIntoBuffer: (double*)buffer count: (size_t)nDoubles; -/** - * \brief Reads a uint16_t from the stream which is encoded in little endian. +/*! + * @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! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A uint16_t from the stream in native endianess + * @return A uint16_t from the stream in native endianess */ - (uint16_t)readLittleEndianInt16; -/** - * \brief Reads a uint32_t from the stream which is encoded in little endian. +/*! + * @brief Reads a uint32_t from the stream which is encoded in little endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A uint32_t from the stream in the native endianess + * @return A uint32_t from the stream in the native endianess */ - (uint32_t)readLittleEndianInt32; -/** - * \brief Reads a uint64_t from the stream which is encoded in little endian. +/*! + * @brief Reads a uint64_t from the stream which is encoded in little endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A uint64_t from the stream in the native endianess + * @return A uint64_t from the stream in the native endianess */ - (uint64_t)readLittleEndianInt64; -/** - * \brief Reads a float from the stream which is encoded in little endian. +/*! + * @brief Reads a float from the stream which is encoded in little endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A float from the stream in the native endianess + * @return A float from the stream in the native endianess */ - (float)readLittleEndianFloat; -/** - * \brief Reads a double from the stream which is encoded in little endian. +/*! + * @brief Reads a double from the stream which is encoded in little endian. * - * \warning Only call this when you know that enough data is available! + * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * - * \return A double from the stream in the native endianess + * @return A double from the stream in the native endianess */ - (double)readLittleEndianDouble; -/** - * \brief Reads the specified number of uint16_ts from the stream which are +/*! + * @brief Reads the specified number of uint16_ts from the stream which are * encoded in little endian. * - * \warning Only call this when you know that enough data is available! + * @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 + * @param nInt16s The number of uint16_ts to read + * @param buffer A buffer of sufficient size to store the specified number of * uint16_ts - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readLittleEndianInt16sIntoBuffer: (uint16_t*)buffer count: (size_t)nInt16s; -/** - * \brief Reads the specified number of uint32_ts from the stream which are +/*! + * @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! + * @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 + * @param nInt32s The number of uint32_ts to read + * @param buffer A buffer of sufficient size to store the specified number of * uint32_ts - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readLittleEndianInt32sIntoBuffer: (uint32_t*)buffer count: (size_t)nInt32s; -/** - * \brief Reads the specified number of uint64_ts from the stream which are +/*! + * @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! + * @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 + * @param nInt64s The number of uint64_ts to read + * @param buffer A buffer of sufficient size to store the specified number of * uint64_ts - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readLittleEndianInt64sIntoBuffer: (uint64_t*)buffer count: (size_t)nInt64s; -/** - * \brief Reads the specified number of floats from the stream which are +/*! + * @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! + * @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 + * @param nFloats The number of floats to read + * @param buffer A buffer of sufficient size to store the specified number of * floats - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readLittleEndianFloatsIntoBuffer: (float*)buffer count: (size_t)nFloats; -/** - * \brief Reads the specified number of doubles from the stream which are +/*! + * @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! + * @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 + * @param nDoubles The number of doubles to read + * @param buffer A buffer of sufficient size to store the specified number of * doubles - * \return The number of bytes read + * @return The number of bytes read */ - (size_t)readLittleEndianDoublesIntoBuffer: (double*)buffer count: (size_t)nDoubles; -/** - * \brief Reads the specified number of items with an item size of 1 from the +/*! + * @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! + * @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 nItems The number of items to read + * @return An OFDataArray with at nItems items. */ - (OFDataArray*)readDataArrayWithSize: (size_t)size; -/** - * \brief Reads the specified number of items with the specified item size from +/*! + * @brief Reads the specified number of items with the specified item size from * the stream and returns them in an OFDataArray. * - * \warning Only call this when you know that enough data is available! + * @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 itemSize The size of each item + * @param nItems The number of items to read + * @return An OFDataArray with at nItems items. */ - (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize count: (size_t)nItems; -/** - * \brief Returns an OFDataArray with all the remaining data of the stream. +/*! + * @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 + * @return An OFDataArray with an item size of 1 with all the data of the * stream until the end of the stream is reached. */ - (OFDataArray*)readDataArrayTillEndOfStream; -/** - * \brief Reads a string with the specified length from the stream. +/*! + * @brief Reads a string with the specified length from the stream. + * + * If a \\0 appears in the stream, the string will be truncated at the \\0 and + * the rest of the bytes of the string will be lost. This way, reading from the + * stream will not break because of a \\0 because the specified number of bytes + * is still being read and only the string gets truncated. + * + * @warning Only call this when you know that enough data is available! + * Otherwise you will get an exception! + * + * @param length The length (in bytes) of the string to read from the stream + * @return A string with the specified length + */ +- (OFString*)readStringWithLength: (size_t)length; + +/*! + * @brief Reads a string with the specified encoding and length from the stream. * * If a \\0 appears in the stream, the string will be truncated at the \\0 and * the rest of the bytes of the string will be lost. This way, reading from the * stream will not break because of a \\0 because the specified number of bytes * is still being read and only the string gets truncated. * - * \warning Only call this when you know that enough data is available! - * Otherwise you will get an exception! - * - * \param length The length (in bytes) of the string to read from the stream - * \return A string with the specified length - */ -- (OFString*)readStringWithLength: (size_t)length; - -/** - * \brief Reads a string with the specified encoding and length from the stream. - * - * If a \\0 appears in the stream, the string will be truncated at the \\0 and - * the rest of the bytes of the string will be lost. This way, reading from the - * stream will not break because of a \\0 because the specified number of bytes - * is still being read and only the string gets truncated. - * - * \warning Only call this when you know that enough data is available! - * Otherwise you will get an exception! - * - * \param encoding The encoding of the string to read from the stream - * \param length The length (in bytes) of the string to read from the stream - * \return A string with the specified length + * @warning Only call this when you know that enough data is available! + * Otherwise you will get an exception! + * + * @param encoding The encoding of the string to read from the stream + * @param length The length (in bytes) of the string to read from the stream + * @return A string with the specified length */ - (OFString*)readStringWithLength: (size_t)length encoding: (of_string_encoding_t)encoding; -/** - * \brief Reads until a newline, \\0 or end of stream occurs. +/*! + * @brief Reads until a newline, \\0 or end of stream occurs. * - * \return The line that was read, autoreleased, or nil if the end of the + * @return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)readLine; -/** - * \brief Reads with the specified encoding until a newline, \\0 or end of +/*! + * @brief Reads with the specified encoding until a newline, \\0 or end of * stream occurs. * - * \param encoding The encoding used by the stream - * \return The line that was read, autoreleased, or nil if the end of the + * @param encoding The encoding used by the stream + * @return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)readLineWithEncoding: (of_string_encoding_t)encoding; -/** - * \brief Asyncronously reads until a newline, \\0, end of stream or an +/*! + * @brief Asyncronously reads until a newline, \\0, end of stream or an * exception occurs. * - * \param target The target on which to call the selector when the data has + * @param target The target on which to call the selector when the data has * been received. If the method returns YES, it will be called * again when the next line has been received. If you want the * next method in the queue to handle the next line, you need to * return NO from the method - * \param selector The selector to call on the target. The signature must be + * @param selector The selector to call on the target. The signature must be * BOOL (OFStream *stream, OFString *line, * OFException *exception). */ - (void)asyncReadLineWithTarget: (id)target selector: (SEL)selector; -/** - * \brief Asyncronously reads with the specified encoding until a newline, \\0, +/*! + * @brief Asyncronously reads with the specified encoding until a newline, \\0, * end of stream or an exception occurs. * - * \param encoding The encoding used by the stream - * \param target The target on which to call the selector when the data has + * @param encoding The encoding used by the stream + * @param target The target on which to call the selector when the data has * been received. If the method returns YES, it will be called * again when the next line has been received. If you want the * next method in the queue to handle the next line, you need to * return NO from the method - * \param selector The selector to call on the target. The signature must be + * @param selector The selector to call on the target. The signature must be * BOOL (OFStream *stream, OFString *line, * OFException *exception). */ - (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding target: (id)target selector: (SEL)selector; #ifdef OF_HAVE_BLOCKS -/** - * \brief Asyncronously reads until a newline, \\0, end of stream or an +/*! + * @brief Asyncronously reads until a newline, \\0, end of stream or an * exception occurs. * - * \param block The block to call when the data has been received. + * @param block The block to call when the data has been received. * If the block returns YES, it will be called again when the next * line has been received. If you want the next block in the queue * to handle the next line, you need to return NO from the block. */ - (void)asyncReadLineWithBlock: (of_stream_async_read_line_block_t)block; -/** - * \brief Asyncronously reads with the specified encoding until a newline, \\0, +/*! + * @brief Asyncronously reads with the specified encoding until a newline, \\0, * end of stream or an exception occurs. * - * \param encoding The encoding used by the stream - * \param block The block to call when the data has been received. + * @param encoding The encoding used by the stream + * @param block The block to call when the data has been received. * If the block returns YES, it will be called again when the next * line has been received. If you want the next block in the queue * to handle the next line, you need to return NO from the block. */ - (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding block: (of_stream_async_read_line_block_t)block; #endif -/** - * \brief Tries to read a line from the stream (see readLine) and returns nil if +/*! + * @brief Tries to read a line from the stream (see readLine) and returns nil if * no complete line has been received yet. * - * \return The line that was read, autoreleased, or nil if the line is not + * @return The line that was read, autoreleased, or nil if the line is not * complete yet */ - (OFString*)tryReadLine; -/** - * \brief Tries to read a line from the stream with the specified encoding (see +/*! + * @brief Tries to read a line from the stream with the specified encoding (see * readLineWithEncoding:) and returns nil if no complete line has been * received yet. * - * \param encoding The encoding used by the stream - * \return The line that was read, autoreleased, or nil if the line is not + * @param encoding The encoding used by the stream + * @return The line that was read, autoreleased, or nil if the line is not * complete yet */ - (OFString*)tryReadLineWithEncoding: (of_string_encoding_t)encoding; -/** - * \brief Reads until the specified string or \\0 is found or the end of stream +/*! + * @brief Reads until the specified string or \\0 is found or the end of stream * occurs. * - * \param delimiter The delimiter - * \return The line that was read, autoreleased, or nil if the end of the + * @param delimiter The delimiter + * @return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)readTillDelimiter: (OFString*)delimiter; -/** - * \brief Reads until the specified string or \\0 is found or the end of stream +/*! + * @brief Reads until the specified string or \\0 is found or the end of stream * occurs. * - * \param delimiter The delimiter - * \param encoding The encoding used by the stream - * \return The line that was read, autoreleased, or nil if the end of the + * @param delimiter The delimiter + * @param encoding The encoding used by the stream + * @return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)readTillDelimiter: (OFString*)delimiter encoding: (of_string_encoding_t)encoding; -/** - * \brief Tries to reads until the specified string or \\0 is found or the end +/*! + * @brief Tries to reads until the specified string or \\0 is found or the end * of stream (see readTillDelimiter:) and returns nil if not enough data * has been received yet. * - * \param delimiter The delimiter - * \return The line that was read, autoreleased, or nil if the end of the + * @param delimiter The delimiter + * @return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)tryReadTillDelimiter: (OFString*)delimiter; -/** - * \brief Tries to read until the specified string or \\0 is found or the end +/*! + * @brief Tries to read until the specified string or \\0 is found or the end * of stream occurs (see readTIllDelimiterWithEncoding:) and returns nil * if not enough data has been received yet. * - * \param delimiter The delimiter - * \param encoding The encoding used by the stream - * \return The line that was read, autoreleased, or nil if the end of the + * @param delimiter The delimiter + * @param encoding The encoding used by the stream + * @return The line that was read, autoreleased, or nil if the end of the * stream has been reached. */ - (OFString*)tryReadTillDelimiter: (OFString*)delimiter encoding: (of_string_encoding_t)encoding; -/** - * \brief Returns a boolen whether writes are buffered. +/*! + * @brief Returns a boolen whether writes are buffered. * - * \return A boolean whether writes are buffered + * @return A boolean whether writes are buffered */ - (BOOL)writeBufferEnabled; -/** - * \brief Enables or disables the write buffer. +/*! + * @brief Enables or disables the write buffer. * - * \param enable Whether the write buffer should be enabled or disabled + * @param enable Whether the write buffer should be enabled or disabled */ - (void)setWriteBufferEnabled: (BOOL)enable; -/** - * \brief Writes everythig in the write buffer to the stream. +/*! + * @brief Writes everythig in the write buffer to the stream. */ - (void)flushWriteBuffer; -/** - * \brief Writes from a buffer into the stream. +/*! + * @brief Writes from a buffer into the stream. * - * \param buffer The buffer from which the data is written to the stream - * \param length The length of the data that should be written + * @param buffer The buffer from which the data is written to the stream + * @param length The length of the data that should be written */ - (void)writeBuffer: (const void*)buffer length: (size_t)length; -/** - * \brief Writes a uint8_t into the stream. +/*! + * @brief Writes a uint8_t into the stream. * - * \param int8 A uint8_t + * @param int8 A uint8_t */ - (void)writeInt8: (uint8_t)int8; -/** - * \brief Writes a uint16_t into the stream, encoded in big endian. +/*! + * @brief Writes a uint16_t into the stream, encoded in big endian. * - * \param int16 A uint16_t + * @param int16 A uint16_t */ - (void)writeBigEndianInt16: (uint16_t)int16; -/** - * \brief Writes a uint32_t into the stream, encoded in big endian. +/*! + * @brief Writes a uint32_t into the stream, encoded in big endian. * - * \param int32 A uint32_t + * @param int32 A uint32_t */ - (void)writeBigEndianInt32: (uint32_t)int32; -/** - * \brief Writes a uint64_t into the stream, encoded in big endian. +/*! + * @brief Writes a uint64_t into the stream, encoded in big endian. * - * \param int64 A uint64_t + * @param int64 A uint64_t */ - (void)writeBigEndianInt64: (uint64_t)int64; -/** - * \brief Writes a float into the stream, encoded in big endian. +/*! + * @brief Writes a float into the stream, encoded in big endian. * - * \param float_ A float + * @param float_ A float */ - (void)writeBigEndianFloat: (float)float_; -/** - * \brief Writes a double into the stream, encoded in big endian. +/*! + * @brief Writes a double into the stream, encoded in big endian. * - * \param double_ A double + * @param double_ A double */ - (void)writeBigEndianDouble: (double)double_; -/** - * \brief Writes the specified number of uint16_ts into the stream, encoded in +/*! + * @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 + * @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 - * \return The number of bytes written to the stream + * @return The number of bytes written to the stream */ - (size_t)writeBigEndianInt16s: (const uint16_t*)buffer count: (size_t)nInt16s; -/** - * \brief Writes the specified number of uint32_ts into the stream, encoded in +/*! + * @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 + * @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 - * \return The number of bytes written to the stream + * @return The number of bytes written to the stream */ - (size_t)writeBigEndianInt32s: (const uint32_t*)buffer count: (size_t)nInt32s; -/** - * \brief Writes the specified number of uint64_ts into the stream, encoded in +/*! + * @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 + * @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 - * \return The number of bytes written to the stream + * @return The number of bytes written to the stream */ - (size_t)writeBigEndianInt64s: (const uint64_t*)buffer count: (size_t)nInt64s; -/** - * \brief Writes the specified number of floats into the stream, encoded in big +/*! + * @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 + * @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 - * \return The number of bytes written to the stream + * @return The number of bytes written to the stream */ - (size_t)writeBigEndianFloats: (const float*)buffer count: (size_t)nFloats; -/** - * \brief Writes the specified number of doubles into the stream, encoded in +/*! + * @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 + * @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 - * \return The number of bytes written to the stream + * @return The number of bytes written to the stream */ - (size_t)writeBigEndianDoubles: (const double*)buffer count: (size_t)nDoubles; -/** - * \brief Writes a uint16_t into the stream, encoded in little endian. +/*! + * @brief Writes a uint16_t into the stream, encoded in little endian. * - * \param int16 A uint16_t + * @param int16 A uint16_t */ - (void)writeLittleEndianInt16: (uint16_t)int16; -/** - * \brief Writes a uint32_t into the stream, encoded in little endian. +/*! + * @brief Writes a uint32_t into the stream, encoded in little endian. * - * \param int32 A uint32_t + * @param int32 A uint32_t */ - (void)writeLittleEndianInt32: (uint32_t)int32; -/** - * \brief Writes a uint64_t into the stream, encoded in little endian. +/*! + * @brief Writes a uint64_t into the stream, encoded in little endian. * - * \param int64 A uint64_t + * @param int64 A uint64_t */ - (void)writeLittleEndianInt64: (uint64_t)int64; -/** - * \brief Writes a float into the stream, encoded in little endian. +/*! + * @brief Writes a float into the stream, encoded in little endian. * - * \param float_ A float + * @param float_ A float */ - (void)writeLittleEndianFloat: (float)float_; -/** - * \brief Writes a double into the stream, encoded in little endian. +/*! + * @brief Writes a double into the stream, encoded in little endian. * - * \param double_ A double + * @param double_ A double */ - (void)writeLittleEndianDouble: (double)double_; -/** - * \brief Writes the specified number of uint16_ts into the stream, encoded in +/*! + * @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 + * @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 - * \return The number of bytes written to the stream + * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianInt16s: (const uint16_t*)buffer count: (size_t)nInt16s; -/** - * \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 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; - -/** - * \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 - * \return The number of bytes written to the stream - */ -- (size_t)writeLittleEndianInt64s: (const uint64_t*)buffer - count: (size_t)nInt64s; - -/** - * \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 - * \return The number of bytes written to the stream - */ -- (size_t)writeLittleEndianFloats: (const float*)buffer - count: (size_t)nFloats; - -/** - * \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 - * \return The number of bytes written to the stream - */ -- (size_t)writeLittleEndianDoubles: (const double*)buffer - count: (size_t)nDoubles; - -/** - * \brief Writes from an OFDataArray into the stream. - * - * \param dataArray The OFDataArray to write into the stream - * \return The number of bytes written - */ -- (size_t)writeDataArray: (OFDataArray*)dataArray; - -/** - * \brief Writes a string into the stream, without the trailing zero. - * - * \param string The string from which the data is written to the stream - * \return The number of bytes written - */ -- (size_t)writeString: (OFString*)string; - -/** - * \brief Writes a string into the stream with a trailing newline. - * - * \param string The string from which the data is written to the stream - * \return The number of bytes written - */ -- (size_t)writeLine: (OFString*)string; - -/** - * \brief Writes a formatted string into the stream. - * - * See printf for the format syntax. As an addition, %@ is available as format - * specifier for objects. - * - * \param format A string used as format - * \return The number of bytes written - */ -- (size_t)writeFormat: (OFConstantString*)format, ...; - -/** - * \brief Writes a formatted string into the stream. - * - * See printf for the format syntax. As an addition, %@ is available as format - * specifier for objects. - * - * \param format A string used as format - * \param arguments The arguments used in the format string - * \return The number of bytes written - */ -- (size_t)writeFormat: (OFConstantString*)format - arguments: (va_list)arguments; - -/** - * \brief Returns the number of bytes still present in the internal read cache. - * - * \return The number of bytes still present in the internal read cache. - */ -- (size_t)pendingBytes; - -/** - * \brief Returns whether the stream is in blocking mode. - * - * \return Whether the stream is in blocking mode - */ -- (BOOL)isBlocking; - -/** - * \brief Enables or disables non-blocking I/O. - * - * By default, a stream is in blocking mode. - * On Win32, this currently only works for sockets! - * - * \param enable Whether the stream should be blocking - */ -- (void)setBlocking: (BOOL)enable; - -/** - * \brief Returns the file descriptor for the read end of the stream. - * - * \return The file descriptor for the read end of the stream - */ -- (int)fileDescriptorForReading; - -/** - * \brief Returns the file descriptor for the write end of the stream. - * - * \return The file descriptor for the write end of the stream - */ -- (int)fileDescriptorForWriting; - -/** - * \brief Closes the stream. - */ -- (void)close; - -/** - * \brief Performs a lowlevel read. - * - * \warning Do not call this directly! - * - * Override this method with your actual read implementation when subclassing! - * - * \param buffer The buffer for the data to read - * \param length The length of the buffer - * \return The number of bytes read - */ -- (size_t)lowlevelReadIntoBuffer: (void*)buffer - length: (size_t)length; - -/** - * \brief Performs a lowlevel write. - * - * \warning Do not call this directly! - * - * Override this method with your actual write implementation when subclassing! - * - * \param buffer The buffer with the data to write - * \param length The length of the data to write - */ -- (void)lowlevelWriteBuffer: (const void*)buffer - length: (size_t)length; - -/** - * \brief Returns whether the lowlevel is at the end of the stream. - * - * \warning Do not call this directly! - * - * Override this method with your actual end of stream checking implementation - * when subclassing! - * - * \return Whether the lowlevel is at the end of the stream +/*! + * @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 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; + +/*! + * @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 + * @return The number of bytes written to the stream + */ +- (size_t)writeLittleEndianInt64s: (const uint64_t*)buffer + count: (size_t)nInt64s; + +/*! + * @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 + * @return The number of bytes written to the stream + */ +- (size_t)writeLittleEndianFloats: (const float*)buffer + count: (size_t)nFloats; + +/*! + * @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 + * @return The number of bytes written to the stream + */ +- (size_t)writeLittleEndianDoubles: (const double*)buffer + count: (size_t)nDoubles; + +/*! + * @brief Writes from an OFDataArray into the stream. + * + * @param dataArray The OFDataArray to write into the stream + * @return The number of bytes written + */ +- (size_t)writeDataArray: (OFDataArray*)dataArray; + +/*! + * @brief Writes a string into the stream, without the trailing zero. + * + * @param string The string from which the data is written to the stream + * @return The number of bytes written + */ +- (size_t)writeString: (OFString*)string; + +/*! + * @brief Writes a string into the stream with a trailing newline. + * + * @param string The string from which the data is written to the stream + * @return The number of bytes written + */ +- (size_t)writeLine: (OFString*)string; + +/*! + * @brief Writes a formatted string into the stream. + * + * See printf for the format syntax. As an addition, %@ is available as format + * specifier for objects. + * + * @param format A string used as format + * @return The number of bytes written + */ +- (size_t)writeFormat: (OFConstantString*)format, ...; + +/*! + * @brief Writes a formatted string into the stream. + * + * See printf for the format syntax. As an addition, %@ is available as format + * specifier for objects. + * + * @param format A string used as format + * @param arguments The arguments used in the format string + * @return The number of bytes written + */ +- (size_t)writeFormat: (OFConstantString*)format + arguments: (va_list)arguments; + +/*! + * @brief Returns the number of bytes still present in the internal read cache. + * + * @return The number of bytes still present in the internal read cache. + */ +- (size_t)pendingBytes; + +/*! + * @brief Returns whether the stream is in blocking mode. + * + * @return Whether the stream is in blocking mode + */ +- (BOOL)isBlocking; + +/*! + * @brief Enables or disables non-blocking I/O. + * + * By default, a stream is in blocking mode. + * On Win32, this currently only works for sockets! + * + * @param enable Whether the stream should be blocking + */ +- (void)setBlocking: (BOOL)enable; + +/*! + * @brief Returns the file descriptor for the read end of the stream. + * + * @return The file descriptor for the read end of the stream + */ +- (int)fileDescriptorForReading; + +/*! + * @brief Returns the file descriptor for the write end of the stream. + * + * @return The file descriptor for the write end of the stream + */ +- (int)fileDescriptorForWriting; + +/*! + * @brief Closes the stream. + */ +- (void)close; + +/*! + * @brief Performs a lowlevel read. + * + * @warning Do not call this directly! + * + * Override this method with your actual read implementation when subclassing! + * + * @param buffer The buffer for the data to read + * @param length The length of the buffer + * @return The number of bytes read + */ +- (size_t)lowlevelReadIntoBuffer: (void*)buffer + length: (size_t)length; + +/*! + * @brief Performs a lowlevel write. + * + * @warning Do not call this directly! + * + * Override this method with your actual write implementation when subclassing! + * + * @param buffer The buffer with the data to write + * @param length The length of the data to write + */ +- (void)lowlevelWriteBuffer: (const void*)buffer + length: (size_t)length; + +/*! + * @brief Returns whether the lowlevel is at the end of the stream. + * + * @warning Do not call this directly! + * + * Override this method with your actual end of stream checking implementation + * when subclassing! + * + * @return Whether the lowlevel is at the end of the stream */ - (BOOL)lowlevelIsAtEndOfStream; - (BOOL)OF_isWaitingForDelimiter; @end Index: src/OFStreamObserver.h ================================================================== --- src/OFStreamObserver.h +++ src/OFStreamObserver.h @@ -28,12 +28,12 @@ @class OFMutableArray; @class OFMutableDictionary; @class OFDataArray; @class OFMutex; -/** - * \brief A protocol that needs to be implemented by delegates for +/*! + * @brief A protocol that needs to be implemented by delegates for * OFStreamObserver. */ #ifndef OF_STREAM_OBSERVER_M @protocol OFStreamObserverDelegate #else @@ -40,41 +40,41 @@ @protocol OFStreamObserverDelegate #endif #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional #endif -/** - * \brief This callback is called when a stream did get ready for reading. +/*! + * @brief This callback is called when a stream did get ready for reading. * * NOTE: When -[tryReadLine] or -[tryReadTillDelimiter:] has been called on the * the stream, this callback will not be called again until new data has * been received, even though there is still data in the cache. The reason * for this is to prevent spinning in a loop when there is an incomplete * string in the cache. Once the string is complete, the callback will be * called again if there is data in the cache. * - * \param stream The stream which did become ready for reading + * @param stream The stream which did become ready for reading */ - (void)streamIsReadyForReading: (OFStream*)stream; -/** - * \brief This callback is called when a stream did get ready for writing. +/*! + * @brief This callback is called when a stream did get ready for writing. * - * \param stream The stream which did become ready for writing + * @param stream The stream which did become ready for writing */ - (void)streamIsReadyForWriting: (OFStream*)stream; -/** - * \brief This callback is called when an exception occurred on the stream. +/*! + * @brief This callback is called when an exception occurred on the stream. * - * \param stream The stream on which an exception occurred + * @param stream The stream on which an exception occurred */ - (void)streamDidReceiveException: (OFStream*)stream; @end -/** - * \brief A class that can observe multiple streams at once. +/*! + * @brief A class that can observe multiple streams at once. * * Note: Currently, Win32 can only observe sockets and not files! */ @interface OFStreamObserver: OFObject { @@ -94,94 +94,94 @@ #ifdef OF_HAVE_PROPERTIES @property (assign) id delegate; #endif -/** - * \brief Creates a new OFStreamObserver. +/*! + * @brief Creates a new OFStreamObserver. * - * \return A new, autoreleased OFStreamObserver + * @return A new, autoreleased OFStreamObserver */ + (instancetype)observer; -/** - * \brief Returns the delegate for the OFStreamObserver. +/*! + * @brief Returns the delegate for the OFStreamObserver. * - * \return The delegate for the OFStreamObserver + * @return The delegate for the OFStreamObserver */ - (id )delegate; -/** - * \brief Sets the delegate for the OFStreamObserver. +/*! + * @brief Sets the delegate for the OFStreamObserver. * - * \param delegate The delegate for the OFStreamObserver + * @param delegate The delegate for the OFStreamObserver */ - (void)setDelegate: (id )delegate; -/** - * \brief Adds a stream to observe for reading. +/*! + * @brief Adds a stream to observe for reading. * * This is also used to observe a listening socket for incoming connections, * which then triggers a read event for the observed stream. * * It is recommended that the stream you add is set to non-blocking mode. * * If there is an -[observe] call blocking, it will be canceled. The reason for * this is to prevent blocking even though the new added stream is ready. * - * \param stream The stream to observe for reading + * @param stream The stream to observe for reading */ - (void)addStreamForReading: (OFStream*)stream; -/** - * \brief Adds a stream to observe for writing. +/*! + * @brief Adds a stream to observe for writing. * * It is recommended that the stream you add is set to non-blocking mode. * * If there is an -[observe] call blocking, it will be canceled. The reason for * this is to prevent blocking even though the new added stream is ready. * - * \param stream The stream to observe for writing - */ -- (void)addStreamForWriting: (OFStream*)stream; - -/** - * \brief Removes a stream to observe for reading. - * - * If there is an -[observe] call blocking, it will be canceled. The reason for - * this is to prevent the removed stream from still being observed. - * - * \param stream The stream to remove from observing for reading - */ -- (void)removeStreamForReading: (OFStream*)stream; - -/** - * \brief Removes a stream to observe for writing. - * - * If there is an -[observe] call blocking, it will be canceled. The reason for - * this is to prevent the removed stream from still being observed. - * - * \param stream The stream to remove from observing for writing - */ -- (void)removeStreamForWriting: (OFStream*)stream; - -/** - * \brief Observes all streams and blocks until an event happens on a stream. - */ -- (void)observe; - -/** - * \brief Observes all streams until an event happens on a stream or the - * timeout is reached. - * - * \param timeout The time to wait for an event, in seconds - * \return A boolean whether events occurred during the timeinterval - */ -- (BOOL)observeWithTimeout: (double)timeout; - -/** - * \brief Cancels the currently blocking observe call. + * @param stream The stream to observe for writing + */ +- (void)addStreamForWriting: (OFStream*)stream; + +/*! + * @brief Removes a stream to observe for reading. + * + * If there is an -[observe] call blocking, it will be canceled. The reason for + * this is to prevent the removed stream from still being observed. + * + * @param stream The stream to remove from observing for reading + */ +- (void)removeStreamForReading: (OFStream*)stream; + +/*! + * @brief Removes a stream to observe for writing. + * + * If there is an -[observe] call blocking, it will be canceled. The reason for + * this is to prevent the removed stream from still being observed. + * + * @param stream The stream to remove from observing for writing + */ +- (void)removeStreamForWriting: (OFStream*)stream; + +/*! + * @brief Observes all streams and blocks until an event happens on a stream. + */ +- (void)observe; + +/*! + * @brief Observes all streams until an event happens on a stream or the + * timeout is reached. + * + * @param timeout The time to wait for an event, in seconds + * @return A boolean whether events occurred during the timeinterval + */ +- (BOOL)observeWithTimeout: (double)timeout; + +/*! + * @brief Cancels the currently blocking observe call. * * This is automatically done when a new stream is added or removed by another * thread, but in some circumstances, it might be desirable for a thread to * manually stop the observe running in another thread. */ Index: src/OFStreamSocket.h ================================================================== --- src/OFStreamSocket.h +++ src/OFStreamSocket.h @@ -21,21 +21,21 @@ # define _WIN32_WINNT 0x0501 # endif # include #endif -/** - * \brief A class which provides functions to create and use stream sockets. +/*! + * @brief A class which provides functions to create and use stream sockets. */ @interface OFStreamSocket: OFStream { int sock; BOOL atEndOfStream; } -/** - * \brief Returns a new, autoreleased OFTCPSocket. +/*! + * @brief Returns a new, autoreleased OFTCPSocket. * - * \return A new, autoreleased OFTCPSocket + * @return A new, autoreleased OFTCPSocket */ + (instancetype)socket; @end Index: src/OFString+Hashing.h ================================================================== --- src/OFString+Hashing.h +++ src/OFString+Hashing.h @@ -22,24 +22,24 @@ extern int _OFString_Hashing_reference; #ifdef __cplusplus } #endif -/** - * \brief The OFString (Hashing) category provides methods to calculate hashes +/*! + * @brief The OFString (Hashing) category provides methods to calculate hashes * for strings. */ @interface OFString (Hashing) -/** - * \brief Returns the MD5 hash of the string as an autoreleased OFString. +/*! + * @brief Returns the MD5 hash of the string as an autoreleased OFString. * - * \return The MD5 hash of the string as an autoreleased OFString + * @return The MD5 hash of the string as an autoreleased OFString */ - (OFString*)MD5Hash; -/** - * \brief Returns the SHA1 hash of the string as an autoreleased OFString. +/*! + * @brief Returns the SHA1 hash of the string as an autoreleased OFString. * - * \return The SHA1 hash of the string as an autoreleased OFString + * @return The SHA1 hash of the string as an autoreleased OFString */ - (OFString*)SHA1Hash; @end Index: src/OFString+JSONValue.h ================================================================== --- src/OFString+JSONValue.h +++ src/OFString+JSONValue.h @@ -23,24 +23,24 @@ #ifdef __cplusplus } #endif @interface OFString (JSONValue) -/** - * \brief Creates an object from the JSON value of the string. +/*! + * @brief Creates an object from the JSON value of the string. * - * \note This also allows parsing JSON5, an extension of JSON. See + * @note This also allows parsing JSON5, an extension of JSON. See * http://json5.org/ for more details. * - * \warning Although not specified by the JSON specification, this can also + * @warning Although not specified by the JSON specification, this can also * return primitives like strings and numbers. The rationale behind * this is that most JSON parsers allow JSON data just consisting of a * single primitive, leading to realworld JSON files sometimes only * consisting of a single primitive. Therefore, you should not make any * assumptions about the object returned by this method if you don't * want your program to terminate due to a message not understood, but * instead check the returned object using -[isKindOfClass:]. * - * \return An object + * @return An object */ - (id)JSONValue; @end Index: src/OFString+Serialization.h ================================================================== --- src/OFString+Serialization.h +++ src/OFString+Serialization.h @@ -22,16 +22,16 @@ extern int _OFString_Serialization_reference; #ifdef __cplusplus } #endif -/** - * \brief A category that provides methods for deserializing objects. +/*! + * @brief A category that provides methods for deserializing objects. */ @interface OFString (OFSerialization) -/** - * \brief Deserializes the receiver into an object. +/*! + * @brief Deserializes the receiver into an object. * - * \return The deserialized object + * @return The deserialized object */ - (id)objectByDeserializing; @end Index: src/OFString+URLEncoding.h ================================================================== --- src/OFString+URLEncoding.h +++ src/OFString+URLEncoding.h @@ -22,23 +22,23 @@ extern int _OFString_URLEncoding_reference; #ifdef __cplusplus } #endif -/** - * \brief A category which provides URL encoding and decoding. +/*! + * @brief A category which provides URL encoding and decoding. */ @interface OFString (URLEncoding) -/** - * \brief Encodes a string for use in a URL. +/*! + * @brief Encodes a string for use in a URL. * - * \return A new autoreleased string + * @return A new autoreleased string */ - (OFString*)stringByURLEncoding; -/** - * \brief Decodes a string used in a URL. +/*! + * @brief Decodes a string used in a URL. * - * \return A new autoreleased string + * @return A new autoreleased string */ - (OFString*)stringByURLDecoding; @end Index: src/OFString+XMLEscaping.h ================================================================== --- src/OFString+XMLEscaping.h +++ src/OFString+XMLEscaping.h @@ -22,16 +22,16 @@ extern int _OFString_XMLEscaping_reference; #ifdef __cplusplus } #endif -/** - * \brief A category to escape strings for use in an XML document. +/*! + * @brief A category to escape strings for use in an XML document. */ @interface OFString (XMLEscaping) -/** - * \brief Escapes a string for use in an XML document. +/*! + * @brief Escapes a string for use in an XML document. * - * \return A new autoreleased string + * @return A new autoreleased string */ - (OFString*)stringByXMLEscaping; @end Index: src/OFString+XMLUnescaping.h ================================================================== --- src/OFString+XMLUnescaping.h +++ src/OFString+XMLUnescaping.h @@ -27,55 +27,55 @@ #ifdef OF_HAVE_BLOCKS typedef OFString* (^of_string_xml_unescaping_block_t)(OFString *str, OFString *entity); #endif -/** - * \brief A protocol that needs to be implemented by delegates for +/*! + * @brief A protocol that needs to be implemented by delegates for * -[stringByXMLUnescapingWithHandler:]. */ @protocol OFStringXMLUnescapingDelegate -/** - * \brief This callback is called when an unknown entity was found while trying +/*! + * @brief This callback is called when an unknown entity was found while trying * to unescape XML. * * The callback is supposed to return a substitution for the entity or nil if * it is unknown to the callback as well, in which case an exception will be * thrown. * - * \param str The string which contains the unknown entity - * \param entity The name of the entity that is unknown - * \return A substitution for the entity or nil + * @param str The string which contains the unknown entity + * @param entity The name of the entity that is unknown + * @return A substitution for the entity or nil */ - (OFString*)string: (OFString*)str containsUnknownEntityNamed: (OFString*)entity; @end -/** - * \brief A category for unescaping XML in strings. +/*! + * @brief A category for unescaping XML in strings. */ @interface OFString (XMLUnescaping) -/** - * \brief Unescapes XML in the string. +/*! + * @brief Unescapes XML in the string. */ - (OFString*)stringByXMLUnescaping; -/** - * \brief Unescapes XML in the string and uses the specified delegate for +/*! + * @brief Unescapes XML in the string and uses the specified delegate for * unknown entities. * - * \param delegate An OFXMLUnescapingDelegate as a handler for unknown entities + * @param delegate An OFXMLUnescapingDelegate as a handler for unknown entities */ - (OFString*)stringByXMLUnescapingWithDelegate: (id )delegate; #ifdef OF_HAVE_BLOCKS -/** - * \brief Unescapes XML in the string and uses the specified block for unknown +/*! + * @brief Unescapes XML in the string and uses the specified block for unknown * entities. * - * \param block A block which handles unknown entities + * @param block A block which handles unknown entities */ - (OFString*)stringByXMLUnescapingWithBlock: (of_string_xml_unescaping_block_t)block; #endif @end Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -30,12 +30,12 @@ @class OFConstantString; typedef uint32_t of_unichar_t; -/** - * \brief The encoding of a string. +/*! + * @brief The encoding of a string. */ typedef enum of_string_encoding_t { OF_STRING_ENCODING_UTF_8, OF_STRING_ENCODING_ASCII, OF_STRING_ENCODING_ISO_8859_1, @@ -71,12 +71,12 @@ #endif @class OFArray; @class OFURL; -/** - * \brief A class for handling strings. +/*! + * @brief A class for handling strings. * * Warning: If you add methods to OFString using a category, you are not * allowed to access the ivars directly, as these might be still uninitialized * for a constant string and get initialized on the first message! Therefore, * you should use the corresponding methods to get the ivars, which ensures the @@ -86,825 +86,825 @@ OFSerialization, OFJSONRepresentation> #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t length; #endif -/** - * \brief Creates a new OFString. - * - * \return A new, autoreleased OFString - */ -+ (instancetype)string; - -/** - * \brief Creates a new OFString from a UTF-8 encoded C string. - * - * \param UTF8String A UTF-8 encoded C string to initialize the OFString with - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUTF8String: (const char*)UTF8String; - -/** - * \brief Creates a new OFString from a UTF-8 encoded C string with the - * specified length. - * - * \param UTF8String A UTF-8 encoded C string to initialize the OFString with - * \param UTF8StringLength The length of the UTF-8 encoded C string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUTF8String: (const char*)UTF8String - 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 encoding The encoding of the C string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithCString: (const char*)cString - encoding: (of_string_encoding_t)encoding; - -/** - * \brief Creates a new OFString from a C string with the specified encoding - * and length. - * - * \param cString A C string to initialize the OFString with - * \param encoding The encoding of the C string - * \param cStringLength The length of the C string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithCString: (const char*)cString - encoding: (of_string_encoding_t)encoding - length: (size_t)cStringLength; - -/** - * \brief Creates a new OFString from another string. - * - * \param string A string to initialize the OFString with - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithString: (OFString*)string; - -/** - * \brief Creates a new OFString from a unicode string. - * - * \param string The unicode string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string; - -/** - * \brief Creates a new OFString from a unicode string, assuming the specified - * byte order if no BOM is found. - * - * \param string The unicode string - * \param byteOrder The byte order to assume if there is no BOM - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_byte_order_t)byteOrder; - -/** - * \brief Creates a new OFString from a unicode string with the specified - * length. - * - * \param string The unicode string - * \param length The length of the unicode string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string - length: (size_t)length; - -/** - * \brief Creates a new OFString from a unicode string with the specified - * length, assuming the specified byte order if no BOM is found. - * - * \param string The unicode string - * \param byteOrder The byte order to assume if there is no BOM - * \param length The length of the unicode string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_byte_order_t)byteOrder - length: (size_t)length; - -/** - * \brief Creates a new OFString from a UTF-16 encoded string. - * - * \param string The UTF-16 string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUTF16String: (const uint16_t*)string; - -/** - * \brief Creates a new OFString from a UTF-16 encoded string, assuming the - * specified byte order if no BOM is found. - * - * \param string The UTF-16 string - * \param byteOrder The byte order to assume if there is no BOM - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUTF16String: (const uint16_t*)string - byteOrder: (of_byte_order_t)byteOrder; - -/** - * \brief Creates a new OFString from a UTF-16 encoded string with the specified - * length. - * - * \param string The UTF-16 string - * \param length The length of the unicode string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUTF16String: (const uint16_t*)string - length: (size_t)length; - -/** - * \brief Creates a new OFString from a UTF-16 encoded string with the - * specified length, assuming the specified byte order if no BOM is - * found. - * - * \param string The UTF-16 string - * \param byteOrder The byte order to assume if there is no BOM - * \param length The length of the unicode string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithUTF16String: (const uint16_t*)string - byteOrder: (of_byte_order_t)byteOrder - length: (size_t)length; - -/** - * \brief Creates a new OFString from a format string. - * - * See printf for the format syntax. As an addition, %@ is available as format - * specifier for objects. - * - * \param format A string used as format to initialize the OFString - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithFormat: (OFConstantString*)format, ...; - -/** - * \brief Creates a new OFString containing the constructed specified path. - * - * \param firstComponent The first component of the path - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithPath: (OFString*)firstComponent, ...; - -/** - * \brief Creates a new OFString with the contents of the specified UTF-8 - * encoded file. - * - * \param path The path to the file - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithContentsOfFile: (OFString*)path; - -/** - * \brief Creates a new OFString with the contents of the specified file in the - * specified encoding. - * - * \param path The path to the file - * \param encoding The encoding of the file - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithContentsOfFile: (OFString*)path - encoding: (of_string_encoding_t)encoding; - -/** - * \brief Creates a new OFString with the contents of the specified URL. +/*! + * @brief Creates a new OFString. + * + * @return A new, autoreleased OFString + */ ++ (instancetype)string; + +/*! + * @brief Creates a new OFString from a UTF-8 encoded C string. + * + * @param UTF8String A UTF-8 encoded C string to initialize the OFString with + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF8String: (const char*)UTF8String; + +/*! + * @brief Creates a new OFString from a UTF-8 encoded C string with the + * specified length. + * + * @param UTF8String A UTF-8 encoded C string to initialize the OFString with + * @param UTF8StringLength The length of the UTF-8 encoded C string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF8String: (const char*)UTF8String + 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 encoding The encoding of the C string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding; + +/*! + * @brief Creates a new OFString from a C string with the specified encoding + * and length. + * + * @param cString A C string to initialize the OFString with + * @param encoding The encoding of the C string + * @param cStringLength The length of the C string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding + length: (size_t)cStringLength; + +/*! + * @brief Creates a new OFString from another string. + * + * @param string A string to initialize the OFString with + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithString: (OFString*)string; + +/*! + * @brief Creates a new OFString from a unicode string. + * + * @param string The unicode string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string; + +/*! + * @brief Creates a new OFString from a unicode string, assuming the specified + * byte order if no BOM is found. + * + * @param string The unicode string + * @param byteOrder The byte order to assume if there is no BOM + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string + byteOrder: (of_byte_order_t)byteOrder; + +/*! + * @brief Creates a new OFString from a unicode string with the specified + * length. + * + * @param string The unicode string + * @param length The length of the unicode string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string + length: (size_t)length; + +/*! + * @brief Creates a new OFString from a unicode string with the specified + * length, assuming the specified byte order if no BOM is found. + * + * @param string The unicode string + * @param byteOrder The byte order to assume if there is no BOM + * @param length The length of the unicode string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string + byteOrder: (of_byte_order_t)byteOrder + length: (size_t)length; + +/*! + * @brief Creates a new OFString from a UTF-16 encoded string. + * + * @param string The UTF-16 string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF16String: (const uint16_t*)string; + +/*! + * @brief Creates a new OFString from a UTF-16 encoded string, assuming the + * specified byte order if no BOM is found. + * + * @param string The UTF-16 string + * @param byteOrder The byte order to assume if there is no BOM + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF16String: (const uint16_t*)string + byteOrder: (of_byte_order_t)byteOrder; + +/*! + * @brief Creates a new OFString from a UTF-16 encoded string with the specified + * length. + * + * @param string The UTF-16 string + * @param length The length of the unicode string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF16String: (const uint16_t*)string + length: (size_t)length; + +/*! + * @brief Creates a new OFString from a UTF-16 encoded string with the + * specified length, assuming the specified byte order if no BOM is + * found. + * + * @param string The UTF-16 string + * @param byteOrder The byte order to assume if there is no BOM + * @param length The length of the unicode string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF16String: (const uint16_t*)string + byteOrder: (of_byte_order_t)byteOrder + length: (size_t)length; + +/*! + * @brief Creates a new OFString from a format string. + * + * See printf for the format syntax. As an addition, %@ is available as format + * specifier for objects. + * + * @param format A string used as format to initialize the OFString + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithFormat: (OFConstantString*)format, ...; + +/*! + * @brief Creates a new OFString containing the constructed specified path. + * + * @param firstComponent The first component of the path + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithPath: (OFString*)firstComponent, ...; + +/*! + * @brief Creates a new OFString with the contents of the specified UTF-8 + * encoded file. + * + * @param path The path to the file + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithContentsOfFile: (OFString*)path; + +/*! + * @brief Creates a new OFString with the contents of the specified file in the + * specified encoding. + * + * @param path The path to the file + * @param encoding The encoding of the file + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithContentsOfFile: (OFString*)path + encoding: (of_string_encoding_t)encoding; + +/*! + * @brief Creates a new OFString with the contents of the specified URL. * * If the URL's scheme is file, it tries UTF-8 encoding. * * If the URL's scheme is http(s), it tries to detect the encoding from the HTTP * headers. If it could not detect the encoding using the HTTP headers, it tries * UTF-8. * - * \param URL The URL to the contents for the string - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithContentsOfURL: (OFURL*)URL; - -/** - * \brief Creates a new OFString with the contents of the specified URL in the - * specified encoding. - * - * \param URL The URL to the contents for the string - * \param encoding The encoding to assume - * \return A new autoreleased OFString - */ -+ (instancetype)stringWithContentsOfURL: (OFURL*)URL - encoding: (of_string_encoding_t)encoding; - -/** - * \brief Initializes an already allocated OFString from a UTF-8 encoded C - * string. - * - * \param UTF8String A UTF-8 encoded C string to initialize the OFString with - * \return An initialized OFString - */ -- initWithUTF8String: (const char*)UTF8String; - -/** - * \brief Initializes an already allocated OFString from a UTF-8 encoded C - * string with the specified length. - * - * \param UTF8String A UTF-8 encoded C string to initialize the OFString with - * \param UTF8StringLength The length of the UTF-8 encoded C string - * \return An initialized OFString - */ -- initWithUTF8String: (const char*)UTF8String - length: (size_t)UTF8StringLength; - -/** - * \brief Initializes an already allocated OFString from an UTF-8 encoded C - * string without copying it, if possible. - * - * \note Mutable versions always create a copy! - * - * \param UTF8String A UTF-8 encoded C string to initialize the OFString with - * \param freeWhenDone Whether to free the C string when it is not needed - * anymore - * \return An initialized OFString - */ -- initWithUTF8StringNoCopy: (const char*)UTF8String - freeWhenDone: (BOOL)freeWhenDone; - -/** - * \brief Initializes an already allocated OFString from a C string with the - * specified encoding. - * - * \param cString A C string to initialize the OFString with - * \param encoding The encoding of the C string - * \return An initialized OFString - */ -- initWithCString: (const char*)cString - encoding: (of_string_encoding_t)encoding; - -/** - * \brief Initializes an already allocated OFString from a C string with the - * specified encoding and length. - * - * \param cString A C string to initialize the OFString with - * \param encoding The encoding of the C string - * \param cStringLength The length of the C string - * \return An initialized OFString - */ -- initWithCString: (const char*)cString - encoding: (of_string_encoding_t)encoding - length: (size_t)cStringLength; - -/** - * \brief Initializes an already allocated OFString with another string. - * - * \param string A string to initialize the OFString with - * \return An initialized OFString - */ -- initWithString: (OFString*)string; - -/** - * \brief Initializes an already allocated OFString with a unicode string. - * - * \param string The unicode string - * \return An initialized OFString - */ -- initWithUnicodeString: (const of_unichar_t*)string; - -/** - * \brief Initializes an already allocated OFString with a unicode string, - * assuming the specified byte order if no BOM is found. - * - * \param string The unicode string - * \param byteOrder The byte order to assume if there is no BOM - * \return An initialized OFString - */ -- initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_byte_order_t)byteOrder; - -/** - * \brief Initializes an already allocated OFString with a unicode string with - * the specified length. - * - * \param string The unicode string - * \param length The length of the unicode string - * \return An initialized OFString - */ -- initWithUnicodeString: (const of_unichar_t*)string - length: (size_t)length; - -/** - * \brief Initializes an already allocated OFString with a unicode string with - * the specified length, assuming the specified byte order if no BOM is - * found. - * - * \param string The unicode string - * \param byteOrder The byte order to assume if there is no BOM - * \param length The length of the unicode string - * \return An initialized OFString - */ -- initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_byte_order_t)byteOrder - length: (size_t)length; - -/** - * \brief Initializes an already allocated OFString with a UTF-16 string. - * - * \param string The UTF-16 string - * \return An initialized OFString - */ -- initWithUTF16String: (const uint16_t*)string; - -/** - * \brief Initializes an already allocated OFString with a UTF-16 string, - * assuming the specified byte order if no BOM is found. - * - * \param string The UTF-16 string - * \param byteOrder The byte order to assume if there is no BOM - * \return An initialized OFString - */ -- initWithUTF16String: (const uint16_t*)string - byteOrder: (of_byte_order_t)byteOrder; - -/** - * \brief Initializes an already allocated OFString with a UTF-16 string with - * the specified length. - * - * \param string The UTF-16 string - * \param length The length of the UTF-16 string - * \return An initialized OFString - */ -- initWithUTF16String: (const uint16_t*)string - length: (size_t)length; - -/** - * \brief Initializes an already allocated OFString with a UTF-16 string with - * the specified length, assuming the specified byte order if no BOM is - * found. - * - * \param string The UTF-16 string - * \param byteOrder The byte order to assume if there is no BOM - * \param length The length of the UTF-16 string - * \return An initialized OFString - */ -- initWithUTF16String: (const uint16_t*)string - byteOrder: (of_byte_order_t)byteOrder - length: (size_t)length; - -/** - * \brief Initializes an already allocated OFString with a format string. - * - * See printf for the format syntax. As an addition, %@ is available as format - * specifier for objects. - * - * \param format A string used as format to initialize the OFString - * \return An initialized OFString - */ -- initWithFormat: (OFConstantString*)format, ...; - -/** - * \brief Initializes an already allocated OFString with a format string. - * - * See printf for the format syntax. As an addition, %@ is available as format - * specifier for objects. - * - * \param format A string used as format to initialize the OFString - * \param arguments The arguments used in the format string - * \return An initialized OFString - */ -- initWithFormat: (OFConstantString*)format - arguments: (va_list)arguments; - -/** - * \brief Initializes an already allocated OFString with the constructed - * specified path. - * - * \param firstComponent The first component of the path - * \return A new autoreleased OFString - */ -- initWithPath: (OFString*)firstComponent, ...; - -/** - * \brief Initializes an already allocated OFString with the constructed - * specified path. - * - * \param firstComponent The first component of the path - * \param arguments A va_list with the other components of the path - * \return A new autoreleased OFString - */ -- initWithPath: (OFString*)firstComponent - arguments: (va_list)arguments; - -/** - * \brief Initializes an already allocated OFString with the contents of the - * specified file in the specified encoding. - * - * \param path The path to the file - * \return An initialized OFString - */ -- initWithContentsOfFile: (OFString*)path; - -/** - * \brief Initializes an already allocated OFString with the contents of the - * specified file in the specified encoding. - * - * \param path The path to the file - * \param encoding The encoding of the file - * \return An initialized OFString - */ -- initWithContentsOfFile: (OFString*)path - encoding: (of_string_encoding_t)encoding; - -/** - * \brief Initializes an already allocated OFString with the contents of the + * @param URL The URL to the contents for the string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithContentsOfURL: (OFURL*)URL; + +/*! + * @brief Creates a new OFString with the contents of the specified URL in the + * specified encoding. + * + * @param URL The URL to the contents for the string + * @param encoding The encoding to assume + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithContentsOfURL: (OFURL*)URL + encoding: (of_string_encoding_t)encoding; + +/*! + * @brief Initializes an already allocated OFString from a UTF-8 encoded C + * string. + * + * @param UTF8String A UTF-8 encoded C string to initialize the OFString with + * @return An initialized OFString + */ +- initWithUTF8String: (const char*)UTF8String; + +/*! + * @brief Initializes an already allocated OFString from a UTF-8 encoded C + * string with the specified length. + * + * @param UTF8String A UTF-8 encoded C string to initialize the OFString with + * @param UTF8StringLength The length of the UTF-8 encoded C string + * @return An initialized OFString + */ +- initWithUTF8String: (const char*)UTF8String + length: (size_t)UTF8StringLength; + +/*! + * @brief Initializes an already allocated OFString from an UTF-8 encoded C + * string without copying it, if possible. + * + * @note Mutable versions always create a copy! + * + * @param UTF8String A UTF-8 encoded C string to initialize the OFString with + * @param freeWhenDone Whether to free the C string when it is not needed + * anymore + * @return An initialized OFString + */ +- initWithUTF8StringNoCopy: (const char*)UTF8String + freeWhenDone: (BOOL)freeWhenDone; + +/*! + * @brief Initializes an already allocated OFString from a C string with the + * specified encoding. + * + * @param cString A C string to initialize the OFString with + * @param encoding The encoding of the C string + * @return An initialized OFString + */ +- initWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding; + +/*! + * @brief Initializes an already allocated OFString from a C string with the + * specified encoding and length. + * + * @param cString A C string to initialize the OFString with + * @param encoding The encoding of the C string + * @param cStringLength The length of the C string + * @return An initialized OFString + */ +- initWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding + length: (size_t)cStringLength; + +/*! + * @brief Initializes an already allocated OFString with another string. + * + * @param string A string to initialize the OFString with + * @return An initialized OFString + */ +- initWithString: (OFString*)string; + +/*! + * @brief Initializes an already allocated OFString with a unicode string. + * + * @param string The unicode string + * @return An initialized OFString + */ +- initWithUnicodeString: (const of_unichar_t*)string; + +/*! + * @brief Initializes an already allocated OFString with a unicode string, + * assuming the specified byte order if no BOM is found. + * + * @param string The unicode string + * @param byteOrder The byte order to assume if there is no BOM + * @return An initialized OFString + */ +- initWithUnicodeString: (const of_unichar_t*)string + byteOrder: (of_byte_order_t)byteOrder; + +/*! + * @brief Initializes an already allocated OFString with a unicode string with + * the specified length. + * + * @param string The unicode string + * @param length The length of the unicode string + * @return An initialized OFString + */ +- initWithUnicodeString: (const of_unichar_t*)string + length: (size_t)length; + +/*! + * @brief Initializes an already allocated OFString with a unicode string with + * the specified length, assuming the specified byte order if no BOM is + * found. + * + * @param string The unicode string + * @param byteOrder The byte order to assume if there is no BOM + * @param length The length of the unicode string + * @return An initialized OFString + */ +- initWithUnicodeString: (const of_unichar_t*)string + byteOrder: (of_byte_order_t)byteOrder + length: (size_t)length; + +/*! + * @brief Initializes an already allocated OFString with a UTF-16 string. + * + * @param string The UTF-16 string + * @return An initialized OFString + */ +- initWithUTF16String: (const uint16_t*)string; + +/*! + * @brief Initializes an already allocated OFString with a UTF-16 string, + * assuming the specified byte order if no BOM is found. + * + * @param string The UTF-16 string + * @param byteOrder The byte order to assume if there is no BOM + * @return An initialized OFString + */ +- initWithUTF16String: (const uint16_t*)string + byteOrder: (of_byte_order_t)byteOrder; + +/*! + * @brief Initializes an already allocated OFString with a UTF-16 string with + * the specified length. + * + * @param string The UTF-16 string + * @param length The length of the UTF-16 string + * @return An initialized OFString + */ +- initWithUTF16String: (const uint16_t*)string + length: (size_t)length; + +/*! + * @brief Initializes an already allocated OFString with a UTF-16 string with + * the specified length, assuming the specified byte order if no BOM is + * found. + * + * @param string The UTF-16 string + * @param byteOrder The byte order to assume if there is no BOM + * @param length The length of the UTF-16 string + * @return An initialized OFString + */ +- initWithUTF16String: (const uint16_t*)string + byteOrder: (of_byte_order_t)byteOrder + length: (size_t)length; + +/*! + * @brief Initializes an already allocated OFString with a format string. + * + * See printf for the format syntax. As an addition, %@ is available as format + * specifier for objects. + * + * @param format A string used as format to initialize the OFString + * @return An initialized OFString + */ +- initWithFormat: (OFConstantString*)format, ...; + +/*! + * @brief Initializes an already allocated OFString with a format string. + * + * See printf for the format syntax. As an addition, %@ is available as format + * specifier for objects. + * + * @param format A string used as format to initialize the OFString + * @param arguments The arguments used in the format string + * @return An initialized OFString + */ +- initWithFormat: (OFConstantString*)format + arguments: (va_list)arguments; + +/*! + * @brief Initializes an already allocated OFString with the constructed + * specified path. + * + * @param firstComponent The first component of the path + * @return A new autoreleased OFString + */ +- initWithPath: (OFString*)firstComponent, ...; + +/*! + * @brief Initializes an already allocated OFString with the constructed + * specified path. + * + * @param firstComponent The first component of the path + * @param arguments A va_list with the other components of the path + * @return A new autoreleased OFString + */ +- initWithPath: (OFString*)firstComponent + arguments: (va_list)arguments; + +/*! + * @brief Initializes an already allocated OFString with the contents of the + * specified file in the specified encoding. + * + * @param path The path to the file + * @return An initialized OFString + */ +- initWithContentsOfFile: (OFString*)path; + +/*! + * @brief Initializes an already allocated OFString with the contents of the + * specified file in the specified encoding. + * + * @param path The path to the file + * @param encoding The encoding of the file + * @return An initialized OFString + */ +- initWithContentsOfFile: (OFString*)path + encoding: (of_string_encoding_t)encoding; + +/*! + * @brief Initializes an already allocated OFString with the contents of the * specified URL. * * If the URL's scheme is file, it tries UTF-8 encoding. * * If the URL's scheme is http(s), it tries to detect the encoding from the HTTP * headers. If it could not detect the encoding using the HTTP headers, it tries * UTF-8. * - * \param URL The URL to the contents for the string - * \return An initialized OFString - */ -- initWithContentsOfURL: (OFURL*)URL; - -/** - * \brief Initializes an already allocated OFString with the contents of the - * specified URL in the specified encoding. - * - * \param URL The URL to the contents for the string - * \param encoding The encoding to assume - * \return An initialized OFString - */ -- initWithContentsOfURL: (OFURL*)URL - encoding: (of_string_encoding_t)encoding; - -/** - * \brief Returns the OFString as a UTF-8 encoded C string. - * - * The result is valid until the autorelease pool is released. If you want to - * use the result outside the scope of the current autorelease pool, you have to - * copy it. - * - * \return The OFString as a UTF-8 encoded C string - */ -- (const char*)UTF8String OF_RETURNS_INNER_POINTER; - -/** - * \brief Returns the OFString as a C string in the specified encoding. - * - * The result is valid until the autorelease pool is released. If you want to - * use the result outside the scope of the current autorelease pool, you have to - * copy it. - * - * \param encoding The encoding for the C string - * \return The OFString as a C string in the specified encoding - */ -- (const char*)cStringWithEncoding: (of_string_encoding_t)encoding - OF_RETURNS_INNER_POINTER; - -/** - * \brief Returns the length of the string in Unicode characters. - * - * \return The length of the string in Unicode characters - */ -- (size_t)length; - -/** - * \brief Returns the number of bytes the string needs in UTF-8 encoding. - * - * \return The number of bytes the string needs in UTF-8 encoding. - */ -- (size_t)UTF8StringLength; - -/** - * \brief Returns the number of bytes the string needs in the specified - * encoding. - * - * \param encoding The encoding for the string - * \return The number of bytes the string needs in the specified encoding. - */ -- (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding; - -/** - * \brief Compares the OFString to another OFString without caring about the - * case. - * - * \param otherString A string to compare with - * \return An of_comparison_result_t - */ -- (of_comparison_result_t)caseInsensitiveCompare: (OFString*)otherString; - -/** - * \brief Returns the Unicode character at the specified index. - * - * \param index The index of the Unicode character to return - * \return The Unicode character at the specified index - */ -- (of_unichar_t)characterAtIndex: (size_t)index; - -/** - * \brief Copies the Unicode characters in the specified range to the specified - * buffer. - * - * \param buffer The buffer to store the Unicode characters - * \param range The range of the Unicode characters to copy - */ -- (void)getCharacters: (of_unichar_t*)buffer - inRange: (of_range_t)range; - -/** - * \brief Returns the range of the first occurrence of the string. - * - * \param string The string to search - * \return The range of the first occurrence of the string or a range with - * OF_NOT_FOUND as start position if it was not found - */ -- (of_range_t)rangeOfString: (OFString*)string; - -/** - * \brief Returns the range of the string. - * - * \param string The string to search - * \param options Options modifying search behaviour. - * Possible values: OF_STRING_SEARCH_BACKWARDS - * \return The range of the first occurrence of the string or a range with - * OF_NOT_FOUND as start position if it was not found - */ -- (of_range_t)rangeOfString: (OFString*)string - options: (int)options; - -/** - * \brief Returns the range of the string in the specified range. - * - * \param string The string to search - * \param options Options modifying search behaviour. - * Possible values: OF_STRING_SEARCH_BACKWARDS - * \param range The range in which to search - * \return The range of the first occurrence of the string or a range with + * @param URL The URL to the contents for the string + * @return An initialized OFString + */ +- initWithContentsOfURL: (OFURL*)URL; + +/*! + * @brief Initializes an already allocated OFString with the contents of the + * specified URL in the specified encoding. + * + * @param URL The URL to the contents for the string + * @param encoding The encoding to assume + * @return An initialized OFString + */ +- initWithContentsOfURL: (OFURL*)URL + encoding: (of_string_encoding_t)encoding; + +/*! + * @brief Returns the OFString as a UTF-8 encoded C string. + * + * The result is valid until the autorelease pool is released. If you want to + * use the result outside the scope of the current autorelease pool, you have to + * copy it. + * + * @return The OFString as a UTF-8 encoded C string + */ +- (const char*)UTF8String OF_RETURNS_INNER_POINTER; + +/*! + * @brief Returns the OFString as a C string in the specified encoding. + * + * The result is valid until the autorelease pool is released. If you want to + * use the result outside the scope of the current autorelease pool, you have to + * copy it. + * + * @param encoding The encoding for the C string + * @return The OFString as a C string in the specified encoding + */ +- (const char*)cStringWithEncoding: (of_string_encoding_t)encoding + OF_RETURNS_INNER_POINTER; + +/*! + * @brief Returns the length of the string in Unicode characters. + * + * @return The length of the string in Unicode characters + */ +- (size_t)length; + +/*! + * @brief Returns the number of bytes the string needs in UTF-8 encoding. + * + * @return The number of bytes the string needs in UTF-8 encoding. + */ +- (size_t)UTF8StringLength; + +/*! + * @brief Returns the number of bytes the string needs in the specified + * encoding. + * + * @param encoding The encoding for the string + * @return The number of bytes the string needs in the specified encoding. + */ +- (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding; + +/*! + * @brief Compares the OFString to another OFString without caring about the + * case. + * + * @param otherString A string to compare with + * @return An of_comparison_result_t + */ +- (of_comparison_result_t)caseInsensitiveCompare: (OFString*)otherString; + +/*! + * @brief Returns the Unicode character at the specified index. + * + * @param index The index of the Unicode character to return + * @return The Unicode character at the specified index + */ +- (of_unichar_t)characterAtIndex: (size_t)index; + +/*! + * @brief Copies the Unicode characters in the specified range to the specified + * buffer. + * + * @param buffer The buffer to store the Unicode characters + * @param range The range of the Unicode characters to copy + */ +- (void)getCharacters: (of_unichar_t*)buffer + inRange: (of_range_t)range; + +/*! + * @brief Returns the range of the first occurrence of the string. + * + * @param string The string to search + * @return The range of the first occurrence of the string or a range with + * OF_NOT_FOUND as start position if it was not found + */ +- (of_range_t)rangeOfString: (OFString*)string; + +/*! + * @brief Returns the range of the string. + * + * @param string The string to search + * @param options Options modifying search behaviour. + * Possible values: OF_STRING_SEARCH_BACKWARDS + * @return The range of the first occurrence of the string or a range with + * OF_NOT_FOUND as start position if it was not found + */ +- (of_range_t)rangeOfString: (OFString*)string + options: (int)options; + +/*! + * @brief Returns the range of the string in the specified range. + * + * @param string The string to search + * @param options Options modifying search behaviour. + * Possible values: OF_STRING_SEARCH_BACKWARDS + * @param range The range in which to search + * @return The range of the first occurrence of the string or a range with * OF_NOT_FOUND as start position if it was not found */ - (of_range_t)rangeOfString: (OFString*)string options: (int)options range: (of_range_t)range; -/** - * \brief Returns whether the string contains the specified string. +/*! + * @brief Returns whether the string contains the specified string. * - * \param string The string to search - * \return Whether the string contains the specified string + * @param string The string to search + * @return Whether the string contains the specified string */ - (BOOL)containsString: (OFString*)string; -/** - * \brief Creates a substring with the specified range. +/*! + * @brief Creates a substring with the specified range. * - * \param range The range of the substring - * \return The substring as a new autoreleased OFString + * @param range The range of the substring + * @return The substring as a new autoreleased OFString */ - (OFString*)substringWithRange: (of_range_t)range; -/** - * \brief Creates a new string by appending another string. +/*! + * @brief Creates a new string by appending another string. * - * \param string The string to append - * \return A new, autoreleased OFString with the specified string appended + * @param string The string to append + * @return A new, autoreleased OFString with the specified string appended */ - (OFString*)stringByAppendingString: (OFString*)string; -/** - * \brief Creates a new string by appending a path component. +/*! + * @brief Creates a new string by appending a path component. * - * \param component The path component to append - * \return A new, autoreleased OFString with the path component appended + * @param component The path component to append + * @return A new, autoreleased OFString with the path component appended */ - (OFString*)stringByAppendingPathComponent: (OFString*)component; -/** - * \brief Creates a new string by prepending another string. +/*! + * @brief Creates a new string by prepending another string. * - * \param string The string to prepend - * \return A new autoreleased OFString with the specified string prepended + * @param string The string to prepend + * @return A new autoreleased OFString with the specified string prepended */ - (OFString*)stringByPrependingString: (OFString*)string; -/** - * \brief Creates a new string by replacing the occurrences of the specified +/*! + * @brief Creates a new string by replacing the occurrences of the specified * string with the specified replacement. * - * \param string The string to replace - * \param replacement The string with which it should be replaced - * \return A new string with the occurrences of the specified string replaced + * @param string The string to replace + * @param replacement The string with which it should be replaced + * @return A new string with the occurrences of the specified string replaced */ - (OFString*)stringByReplacingOccurrencesOfString: (OFString*)string withString: (OFString*)replacement; -/** - * \brief Creates a new string by replacing the occurrences of the specified +/*! + * @brief Creates a new string by replacing the occurrences of the specified * string in the specified range with the specified replacement. * - * \param string The string to replace - * \param replacement The string with which it should be replaced - * \param options Options modifying search behaviour. + * @param string The string to replace + * @param replacement The string with which it should be replaced + * @param options Options modifying search behaviour. * Possible values: None yet - * \param range The range in which to replace the string - * \return A new string with the occurrences of the specified string replaced + * @param range The range in which to replace the string + * @return A new string with the occurrences of the specified string replaced */ - (OFString*)stringByReplacingOccurrencesOfString: (OFString*)string withString: (OFString*)replacement options: (int)options range: (of_range_t)range; -/** - * \brief Returns the string in uppercase. +/*! + * @brief Returns the string in uppercase. * - * \return The string in uppercase + * @return The string in uppercase */ - (OFString*)uppercaseString; -/** - * \brief Returns the string in lowercase. +/*! + * @brief Returns the string in lowercase. * - * \return The string in lowercase + * @return The string in lowercase */ - (OFString*)lowercaseString; -/** - * \brief Returns the string capitalized. +/*! + * @brief Returns the string capitalized. * - * \note This only considers spaces, tab and newlines to be word delimiters! + * @note This only considers spaces, tab and newlines to be word delimiters! * Also note that this might change in the future to all word delimiters * specified by Unicode! * - * \return The capitalized string + * @return The capitalized string */ - (OFString*)capitalizedString; -/** - * \brief Creates a new string by deleting leading whitespaces. +/*! + * @brief Creates a new string by deleting leading whitespaces. * - * \return A new autoreleased OFString with leading whitespaces deleted + * @return A new autoreleased OFString with leading whitespaces deleted */ - (OFString*)stringByDeletingLeadingWhitespaces; -/** - * \brief Creates a new string by deleting trailing whitespaces. +/*! + * @brief Creates a new string by deleting trailing whitespaces. * - * \return A new autoreleased OFString with trailing whitespaces deleted + * @return A new autoreleased OFString with trailing whitespaces deleted */ - (OFString*)stringByDeletingTrailingWhitespaces; -/** - * \brief Creates a new string by deleting leading and trailing whitespaces. +/*! + * @brief Creates a new string by deleting leading and trailing whitespaces. * - * \return A new autoreleased OFString with leading and trailing whitespaces + * @return A new autoreleased OFString with leading and trailing whitespaces * deleted */ - (OFString*)stringByDeletingEnclosingWhitespaces; -/** - * \brief Checks whether the string has the specified prefix. +/*! + * @brief Checks whether the string has the specified prefix. * - * \param prefix The prefix to check for - * \return A boolean whether the string has the specified prefix + * @param prefix The prefix to check for + * @return A boolean whether the string has the specified prefix */ - (BOOL)hasPrefix: (OFString*)prefix; -/** - * \brief Checks whether the string has the specified suffix. +/*! + * @brief Checks whether the string has the specified suffix. * - * \param suffix The suffix to check for - * \return A boolean whether the string has the specified suffix + * @param suffix The suffix to check for + * @return A boolean whether the string has the specified suffix */ - (BOOL)hasSuffix: (OFString*)suffix; -/** - * \brief Separates an OFString into an OFArray of OFStrings. +/*! + * @brief Separates an OFString into an OFArray of OFStrings. * - * \param delimiter The delimiter for separating - * \return An autoreleased OFArray with the separated string + * @param delimiter The delimiter for separating + * @return An autoreleased OFArray with the separated string */ - (OFArray*)componentsSeparatedByString: (OFString*)delimiter; -/** - * \brief Separates an OFString into an OFArray of OFStrings. +/*! + * @brief Separates an OFString into an OFArray of OFStrings. * - * \param delimiter The delimiter for separating - * \param options Options according to which the string should be separated + * @param delimiter The delimiter for separating + * @param options Options according to which the string should be separated * Possible values: OF_STRING_SKIP_EMPTY - * \return An autoreleased OFArray with the separated string + * @return An autoreleased OFArray with the separated string */ - (OFArray*)componentsSeparatedByString: (OFString*)delimiter options: (int)options; -/** - * \brief Returns the components of the path. +/*! + * @brief Returns the components of the path. * - * \return The components of the path + * @return The components of the path */ - (OFArray*)pathComponents; -/** - * \brief Returns the last component of the path. +/*! + * @brief Returns the last component of the path. * - * \return The last component of the path + * @return The last component of the path */ - (OFString*)lastPathComponent; -/** - * \brief Returns the directory name of the path. +/*! + * @brief Returns the directory name of the path. * - * \return The directory name of the path + * @return The directory name of the path */ - (OFString*)stringByDeletingLastPathComponent; -/** - * \brief Returns the decimal value of the string as an intmax_t. +/*! + * @brief Returns the decimal value of the string as an intmax_t. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * OFInvalidEncodingException is thrown. * * If the number is too big to fit into an intmax_t, an OFOutOfRangeException * is thrown. * - * \return An intmax_t with the value of the string + * @return An intmax_t with the value of the string */ - (intmax_t)decimalValue; -/** - * \brief Returns the hexadecimal value of the string as an uintmax_t. +/*! + * @brief Returns the hexadecimal value of the string as an uintmax_t. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * OFInvalidEncodingException is thrown. * * If the number is too big to fit into an uintmax_t, an OFOutOfRangeException * is thrown. * - * \return A uintmax_t with the value of the string - */ -- (uintmax_t)hexadecimalValue; - -/** - * \brief Returns the float value of the string as a float. - * - * If the string contains any non-number characters, an - * OFInvalidEncodingException is thrown. - * - * \return A float with the value of the string - */ -- (float)floatValue; - -/** - * \brief Returns the double value of the string as a double. - * - * If the string contains any non-number characters, an - * OFInvalidEncodingException is thrown. - * - * \return A double with the value of the string - */ -- (double)doubleValue; - -/** - * \brief Returns the string as an array of Unicode characters. - * - * The result is valid until the autorelease pool is released. If you want to - * use the result outside the scope of the current autorelease pool, you have to - * copy it. - * - * \return The string as an array of Unicode characters - */ -- (const of_unichar_t*)unicodeString OF_RETURNS_INNER_POINTER; - -/** - * \brief Returns the string in big endian UTF-16 encoding. - * - * The result is valid until the autorelease pool is released. If you want to - * use the result outside the scope of the current autorelease pool, you have to - * copy it. - * - * \return The string in big endian UTF-16 encoding - */ -- (const uint16_t*)UTF16String OF_RETURNS_INNER_POINTER; - -/** - * \brief Writes the string into the specified file using UTF-8 encoding. - * - * \param path The path of the file to write to - */ -- (void)writeToFile: (OFString*)path; - -#ifdef OF_HAVE_BLOCKS -/** - * Enumerates all lines in the receiver using the specified block. - * - * \brief block The block to call for each line + * @return A uintmax_t with the value of the string + */ +- (uintmax_t)hexadecimalValue; + +/*! + * @brief Returns the float value of the string as a float. + * + * If the string contains any non-number characters, an + * OFInvalidEncodingException is thrown. + * + * @return A float with the value of the string + */ +- (float)floatValue; + +/*! + * @brief Returns the double value of the string as a double. + * + * If the string contains any non-number characters, an + * OFInvalidEncodingException is thrown. + * + * @return A double with the value of the string + */ +- (double)doubleValue; + +/*! + * @brief Returns the string as an array of Unicode characters. + * + * The result is valid until the autorelease pool is released. If you want to + * use the result outside the scope of the current autorelease pool, you have to + * copy it. + * + * @return The string as an array of Unicode characters + */ +- (const of_unichar_t*)unicodeString OF_RETURNS_INNER_POINTER; + +/*! + * @brief Returns the string in big endian UTF-16 encoding. + * + * The result is valid until the autorelease pool is released. If you want to + * use the result outside the scope of the current autorelease pool, you have to + * copy it. + * + * @return The string in big endian UTF-16 encoding + */ +- (const uint16_t*)UTF16String OF_RETURNS_INNER_POINTER; + +/*! + * @brief Writes the string into the specified file using UTF-8 encoding. + * + * @param path The path of the file to write to + */ +- (void)writeToFile: (OFString*)path; + +#ifdef OF_HAVE_BLOCKS +/*! + * Enumerates all lines in the receiver using the specified block. + * + * @brief block The block to call for each line */ - (void)enumerateLinesUsingBlock: (of_string_line_enumeration_block_t)block; #endif @end Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -40,12 +40,12 @@ typedef void (^of_tcpsocket_async_connect_block_t)(OFTCPSocket*, OFException*); typedef BOOL (^of_tcpsocket_async_accept_block_t)(OFTCPSocket*, OFTCPSocket*, OFException*); #endif -/** - * \brief A class which provides functions to create and use TCP sockets. +/*! + * @brief A class which provides functions to create and use TCP sockets. * * To connect to a server, create a socket and connect it. * To create a server, create a socket, bind it and listen on it. */ @interface OFTCPSocket: OFStreamSocket @@ -61,179 +61,179 @@ @property (readonly, getter=isListening) BOOL listening; @property (copy) OFString *SOCKS5Host; @property uint16_t SOCKS5Port; #endif -/** - * \brief Sets the global SOCKS5 proxy host to use when creating a new socket +/*! + * @brief Sets the global SOCKS5 proxy host to use when creating a new socket * - * \param host The host to use as a SOCKS5 proxy when creating a new socket + * @param host The host to use as a SOCKS5 proxy when creating a new socket */ + (void)setSOCKS5Host: (OFString*)host; -/** - * \brief Returns the host to use as a SOCKS5 proxy when creating a new socket +/*! + * @brief Returns the host to use as a SOCKS5 proxy when creating a new socket * - * \return The host to use as a SOCKS5 proxy when creating a new socket + * @return The host to use as a SOCKS5 proxy when creating a new socket */ + (OFString*)SOCKS5Host; -/** - * \brief Sets the global SOCKS5 proxy port to use when creating a new socket +/*! + * @brief Sets the global SOCKS5 proxy port to use when creating a new socket * - * \param port The port to use as a SOCKS5 proxy when creating a new socket + * @param port The port to use as a SOCKS5 proxy when creating a new socket */ + (void)setSOCKS5Port: (uint16_t)port; -/** - * \brief Returns the port to use as a SOCKS5 proxy when creating a new socket +/*! + * @brief Returns the port to use as a SOCKS5 proxy when creating a new socket * - * \return The port to use as a SOCKS5 proxy when creating a new socket + * @return The port to use as a SOCKS5 proxy when creating a new socket */ + (uint16_t)SOCKS5Port; -/** - * \brief Sets the host to use as a SOCKS5 proxy. +/*! + * @brief Sets the host to use as a SOCKS5 proxy. * - * \param host The host to use as a SOCKS5 proxy + * @param host The host to use as a SOCKS5 proxy */ - (void)setSOCKS5Host: (OFString*)host; -/** - * \brief Returns the host to use as a SOCKS5 proxy. +/*! + * @brief Returns the host to use as a SOCKS5 proxy. * - * \return The host to use as a SOCKS5 proxy + * @return The host to use as a SOCKS5 proxy */ - (OFString*)SOCKS5Host; -/** - * \brief Sets the port to use on the SOCKS5 proxy. +/*! + * @brief Sets the port to use on the SOCKS5 proxy. * * The default port is 1080. * - * \param port The port to use on the SOCKS5 proxy + * @param port The port to use on the SOCKS5 proxy */ - (void)setSOCKS5Port: (uint16_t)port; -/** - * \brief Returns the port to use on the SOCKS5 proxy. +/*! + * @brief Returns the port to use on the SOCKS5 proxy. * - * \return The port to use on the SOCKS5 proxy + * @return The port to use on the SOCKS5 proxy */ - (uint16_t)SOCKS5Port; -/** - * \brief Connect the OFTCPSocket to the specified destination. +/*! + * @brief Connect the OFTCPSocket to the specified destination. * - * \param host The host to connect to - * \param port The port on the host to connect to + * @param host The host to connect to + * @param port The port on the host to connect to */ - (void)connectToHost: (OFString*)host port: (uint16_t)port; -/** - * \brief Asyncronously connect the OFTCPSocket to the specified destination. +/*! + * @brief Asyncronously connect the OFTCPSocket to the specified destination. * - * \param host The host to connect to - * \param port The port on the host to connect to - * \param target The target on which to call the selector once the connection + * @param host The host to connect to + * @param port The port on the host to connect to + * @param target The target on which to call the selector once the connection * has been established - * \param selector The selector to call on the target. The signature must be + * @param selector The selector to call on the target. The signature must be * void (OFTCPSocket *socket, OFException *exception). */ - (void)asyncConnectToHost: (OFString*)host port: (uint16_t)port target: (id)target selector: (SEL)selector; #ifdef OF_HAVE_BLOCKS -/** - * \brief Asyncronously connect the OFTCPSocket to the specified destination. +/*! + * @brief Asyncronously connect the OFTCPSocket to the specified destination. * - * \param host The host to connect to - * \param port The port on the host to connect to - * \param block The block to execute once the connection has been established + * @param host The host to connect to + * @param port The port on the host to connect to + * @param block The block to execute once the connection has been established */ - (void)asyncConnectToHost: (OFString*)host port: (uint16_t)port block: (of_tcpsocket_async_connect_block_t)block; #endif -/** - * \brief Bind the socket on the specified port and host. +/*! + * @brief Bind the socket on the specified port and host. * - * \param host The host to bind to. Use @"0.0.0.0" for IPv4 or @"::" for IPv6 + * @param host The host to bind to. Use @"0.0.0.0" for IPv4 or @"::" for IPv6 * to bind to all. - * \param port The port to bind to. If the port is 0, an unused port will be + * @param port The port to bind to. If the port is 0, an unused port will be * chosen, which can be obtained using the return value. - * \return The port the socket was bound to + * @return The port the socket was bound to */ - (uint16_t)bindToHost: (OFString*)host port: (uint16_t)port; -/** - * \brief Listen on the socket. +/*! + * @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. +/*! + * @brief Listen on the socket. */ - (void)listen; -/** - * \brief Accept an incoming connection. +/*! + * @brief Accept an incoming connection. * - * \return An autoreleased OFTCPSocket for the accepted connection. + * @return An autoreleased OFTCPSocket for the accepted connection. */ - (OFTCPSocket*)accept; -/** - * \brief Asyncronously ccept an incoming connection. +/*! + * @brief Asyncronously ccept an incoming connection. * - * \param target The target on which to execute the selector when a new + * @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. - * \param selector The selector to call on the target. The signature must be + * @param selector The selector to call on the target. The signature must be * BOOL (OFTCPSocket *socket, OFTCPSocket *acceptedSocket, * OFException *exception). */ - (void)asyncAcceptWithTarget: (id)target selector: (SEL)selector; #ifdef OF_HAVE_BLOCKS -/** - * \brief Asyncronously ccept an incoming connection. +/*! + * @brief Asyncronously ccept an incoming connection. * - * \param block The block to execute when a new connection has been accepted. + * @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. */ - (void)asyncAcceptWithBlock: (of_tcpsocket_async_accept_block_t)block; #endif -/** - * \brief Enable or disable keep alives for the connection. +/*! + * @brief Enable or disable keep alives for the connection. * - * \param enable Whether to enable or disable keep alives for the connection + * @param enable Whether to enable or disable keep alives for the connection */ - (void)setKeepAlivesEnabled: (BOOL)enable; -/** - * \brief Returns the remote address of the socket. +/*! + * @brief Returns the remote address of the socket. * * Only works with accepted sockets! * - * \return The remote address as a string + * @return The remote address as a string */ - (OFString*)remoteAddress; -/** - * \brief Returns whether the socket is a listening socket. +/*! + * @brief Returns whether the socket is a listening socket. * - * \return Whether the socket is a listening socket + * @return Whether the socket is a listening socket */ - (BOOL)isListening; @end Index: src/OFTLSKey.h ================================================================== --- src/OFTLSKey.h +++ src/OFTLSKey.h @@ -17,12 +17,12 @@ #import "OFObject.h" #import "OFList.h" #import "threading.h" -/** - * \brief A class for Thread Local Storage keys. +/*! + * @brief A class for Thread Local Storage keys. */ @interface OFTLSKey: OFObject { @public of_tlskey_t key; @@ -30,31 +30,31 @@ void (*destructor)(id); of_list_object_t *listObject; BOOL initialized; } -/** - * \brief Creates a new Thread Local Storage key +/*! + * @brief Creates a new Thread Local Storage key * - * \return A new, autoreleased Thread Local Storage key + * @return A new, autoreleased Thread Local Storage key */ + (instancetype)TLSKey; -/** - * \brief Creates a new Thread Local Storage key with the specified destructor. +/*! + * @brief Creates a new Thread Local Storage key with the specified destructor. * - * \param destructor A destructor that is called when the thread is terminated - * \return A new autoreleased Thread Local Storage key + * @param destructor A destructor that is called when the thread is terminated + * @return A new autoreleased Thread Local Storage key */ + (instancetype)TLSKeyWithDestructor: (void(*)(id))destructor; + (void)OF_callAllDestructors; -/** - * \brief Initializes an already allocated Thread Local Storage Key with the +/*! + * @brief Initializes an already allocated Thread Local Storage Key with the * specified destructor. * - * \param destructor A destructor that is called when the thread is terminated - * \return An initialized Thread Local Storage key + * @param destructor A destructor that is called when the thread is terminated + * @return An initialized Thread Local Storage key */ - initWithDestructor: (void(*)(id))destructor; @end Index: src/OFTLSSocket.h ================================================================== --- src/OFTLSSocket.h +++ src/OFTLSSocket.h @@ -18,95 +18,95 @@ @class OFString; @class OFArray; @protocol OFTLSSocket; -/** - * \brief A delegate for classes implementing the OFTLSSocket protocol. +/*! + * @brief A delegate for classes implementing the OFTLSSocket protocol. */ @protocol OFTLSSocketDelegate -/** - * \brief This callback is called when the TLS socket wants to know if it +/*! + * @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 + * @param certificate An array of objects implementing the OFX509Certificate * protocol - * \return Whether the TLS socket should accept the received keychain + * @return Whether the TLS socket should accept the received keychain */ - (BOOL)socket: (id )socket shouldAcceptKeychain: (OFArray*)keychain; @end -/** - * \brief A protocol that should be implemented by 3rd party libraries +/*! + * @brief A protocol that should be implemented by 3rd party libraries * implementing TLS. */ @protocol OFTLSSocket #ifdef OF_HAVE_PROPERTIES @property (assign) id delegate; @property (copy) OFString *certificateFile, *privateKeyFile; @property const char *privateKeyPassphrase; #endif -/** - * \brief Sets a delegate for the TLS socket. +/*! + * @brief Sets a delegate for the TLS socket. * - * \param delegate The delegate to use + * @param delegate The delegate to use */ - (void)setDelegate: (id )delegate; -/** - * \brief Returns the delegate used by the TLS socket. +/*! + * @brief Returns the delegate used by the TLS socket. * - * \return The delegate used by the TLS socket + * @return The delegate used by the TLS socket */ - (id )delegate; -/** - * \brief Sets the path to the X.509 certificate file to use. +/*! + * @brief Sets the path to the X.509 certificate file to use. * - * \param certificateFile The path to the X.509 certificate file + * @param certificateFile The path to the X.509 certificate file */ - (void)setCertificateFile: (OFString*)certificateFile; -/** - * \brief Returns the path of the X.509 certificate file used by the TLS socket. +/*! + * @brief Returns the path of the X.509 certificate file used by the TLS socket. * - * \return The path of the X.509 certificate file used by the TLS socket + * @return The path of the X.509 certificate file used by the TLS socket */ - (OFString*)certificateFile; -/** - * \brief Sets the path to the PKCS#8 private key file to use. +/*! + * @brief Sets the path to the PKCS#8 private key file to use. * - * \param privateKeyFile The path to the PKCS#8 private key file + * @param privateKeyFile The path to the PKCS#8 private key file */ - (void)setPrivateKeyFile: (OFString*)privateKeyFile; -/** - * \brief Returns the path of the PKCS#8 private key file used by the TLS +/*! + * @brief Returns the path of the PKCS#8 private key file used by the TLS * socket. * - * \return The path of the PKCS#8 private key file used by the TLS socket + * @return The path of the PKCS#8 private key file used by the TLS socket */ - (OFString*)privateKeyFile; -/** - * \brief Sets the passphrase to decrypt the PKCS#8 private key file. +/*! + * @brief Sets the passphrase to decrypt the PKCS#8 private key file. * - * \warning You have to ensure that this is in secure memory protected from + * @warning You have to ensure that this is in secure memory protected from * swapping! This is also the reason why this is not an OFString. * - * \param privateKeyPassphrase The passphrase to decrypt the PKCS#8 private + * @param privateKeyPassphrase The passphrase to decrypt the PKCS#8 private * key file */ - (void)setPrivateKeyPassphrase: (const char*)privateKeyPassphrase; -/** - * \brief Returns the passphrase to decrypt the PKCS#8 private key file. +/*! + * @brief Returns the passphrase to decrypt the PKCS#8 private key file. * - * \warning You should not copy this to insecure memory which is swappable! + * @warning You should not copy this to insecure memory which is swappable! * - * \return The passphrase to decrypt the PKCS#8 private key file + * @return The passphrase to decrypt the PKCS#8 private key file */ - (const char*)privateKeyPassphrase; @end Index: src/OFThread.h ================================================================== --- src/OFThread.h +++ src/OFThread.h @@ -25,17 +25,17 @@ #ifdef OF_HAVE_BLOCKS typedef id (^of_thread_block_t)(id object); #endif -/** - * \brief A class which provides portable threads. +/*! + * @brief A class which provides portable threads. * * To use it, you should create a new class derived from it and reimplement * main. * - * \warning Even though the OFCopying protocol is implemented, it does + * @warning Even though the OFCopying protocol is implemented, it does * not return an independent copy of the thread, but instead * retains it. This is so that the thread can be used as a key for a * dictionary, so context can be associated with a thread. */ @interface OFThread: OFObject @@ -62,157 +62,157 @@ #if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS) @property (copy) of_thread_block_t block; #endif -/** - * \brief Creates a new thread. +/*! + * @brief Creates a new thread. * - * \return A new, autoreleased thread + * @return A new, autoreleased thread */ + (instancetype)thread; -/** - * \brief Creates a new thread with the specified object. +/*! + * @brief Creates a new thread with the specified object. * - * \param object An object which is passed for use in the main method or nil - * \return A new, autoreleased thread + * @param object An object which is passed for use in the main method or nil + * @return A new, autoreleased thread */ + (instancetype)threadWithObject: (id)object; #ifdef OF_HAVE_BLOCKS -/** - * \brief Creates a new thread with the specified block. +/*! + * @brief Creates a new thread with the specified block. * - * \param block A block which is executed by the thread - * \return A new, autoreleased thread + * @param block A block which is executed by the thread + * @return A new, autoreleased thread */ + (instancetype)threadWithBlock: (of_thread_block_t)block; #endif -/** - * \brief Sets the Thread Local Storage for the specified key. +/*! + * @brief Sets the Thread Local Storage for the specified key. * * The specified object is first retained and then the object stored before is * released. You can specify nil as object if you want the old object to be * released and don't want any new object for the TLS key. * - * \param key The Thread Local Storage key - * \param object The object the Thread Local Storage key will be set to + * @param key The Thread Local Storage key + * @param object The object the Thread Local Storage key will be set to */ + (void)setObject: (id)object forTLSKey: (OFTLSKey*)key; -/** - * \brief Returns the object for the specified Thread Local Storage key. +/*! + * @brief Returns the object for the specified Thread Local Storage key. * * The returned object is not retained and autoreleased for performance * reasons! * - * \param key The Thread Local Storage key + * @param key The Thread Local Storage key */ + (id)objectForTLSKey: (OFTLSKey*)key; -/** - * \brief Returns the current thread. +/*! + * @brief Returns the current thread. * - * \return The current thread + * @return The current thread */ + (OFThread*)currentThread; -/** - * \brief Returns the main thread. +/*! + * @brief Returns the main thread. * - * \return The main thread + * @return The main thread */ + (OFThread*)mainThread; -/** - * \brief Suspends execution of the current thread for the specified time +/*! + * @brief Suspends execution of the current thread for the specified time * interval. * - * \param seconds The number of seconds to sleep + * @param seconds The number of seconds to sleep */ + (void)sleepForTimeInterval: (double)seconds; -/** - * \brief Suspends execution of the current thread until the specified date. +/*! + * @brief Suspends execution of the current thread until the specified date. * - * \param date The date to wait for + * @param date The date to wait for */ + (void)sleepUntilDate: (OFDate*)date; -/** - * \brief Yields a processor voluntarily and moves the thread at the end of the +/*! + * @brief Yields a processor voluntarily and moves the thread at the end of the * queue for its priority. */ + (void)yield; -/** - * \brief Terminates the current thread, letting it return nil. +/*! + * @brief Terminates the current thread, letting it return nil. */ + (void)terminate; -/** - * \brief Terminates the current thread, letting it return the specified object. +/*! + * @brief Terminates the current thread, letting it return the specified object. * - * \param object The object which the terminated thread will return + * @param object The object which the terminated thread will return */ + (void)terminateWithObject: (id)object; + (void)OF_createMainThread; -/** - * \brief Initializes an already allocated thread with the specified object. +/*! + * @brief Initializes an already allocated thread with the specified object. * - * \param object An object which is passed for use in the main method or nil - * \return An initialized OFThread. + * @param object An object which is passed for use in the main method or nil + * @return An initialized OFThread. */ - initWithObject: (id)object; #ifdef OF_HAVE_BLOCKS -/** - * \brief Initializes an already allocated thread with the specified block. +/*! + * @brief Initializes an already allocated thread with the specified block. * - * \param block A block which is executed by the thread - * \return An initialized OFThread. + * @param block A block which is executed by the thread + * @return An initialized OFThread. */ - initWithBlock: (of_thread_block_t)block; #endif -/** - * \brief The main routine of the thread. You need to reimplement this! +/*! + * @brief The main routine of the thread. You need to reimplement this! * * It can access the object passed to the threadWithObject or initWithObject * method using the instance variable named object. * - * \return The object the join method should return when called for this thread + * @return The object the join method should return when called for this thread */ - (id)main; -/** - * \brief This routine is exectued when the thread's main method has finished +/*! + * @brief This routine is exectued when the thread's main method has finished * executing or terminate has been called. * - * \note Be sure to call [super handleTermination]! + * @note Be sure to call [super handleTermination]! */ - (void)handleTermination; -/** - * \brief Starts the thread. +/*! + * @brief Starts the thread. */ - (void)start; -/** - * \brief Joins a thread. +/*! + * @brief Joins a thread. * - * \return The object returned by the main method of the thread. + * @return The object returned by the main method of the thread. */ - (id)join; -/** - * \brief Returns the run loop for the thread. +/*! + * @brief Returns the run loop for the thread. * - * \return The run loop for the thread + * @return The run loop for the thread */ - (OFRunLoop*)runLoop; @end Index: src/OFThreadPool.h ================================================================== --- src/OFThreadPool.h +++ src/OFThreadPool.h @@ -23,14 +23,14 @@ @class OFMutableArray; @class OFList; @class OFCondition; @class OFThreadPoolJob; -/** - * \brief A class providing a pool of reusable threads. +/*! + * @brief A class providing a pool of reusable threads. * - * \note When the thread pool is released, all threads will terminate after + * @note When the thread pool is released, all threads will terminate after * they finish the job they are currently processing. */ @interface OFThreadPool: OFObject { size_t size; @@ -41,83 +41,83 @@ OFCondition *queueCondition; volatile int doneCount; OFCondition *countCondition; } -/** - * \brief Returns a new thread pool with one thread for each core in the system. +/*! + * @brief Returns a new thread pool with one thread for each core in the system. * - * \warning If for some reason the number of cores in the system could not be + * @warning If for some reason the number of cores in the system could not be * determined, the pool will only have one thread! * - * \return A new thread pool with one thread for each core in the system + * @return A new thread pool with one thread for each core in the system */ + (instancetype)threadPool; -/** - * \brief Returns a new thread pool with the specified number of threads. +/*! + * @brief Returns a new thread pool with the specified number of threads. * - * \warning If for some reason the number of cores in the system could not be + * @warning If for some reason the number of cores in the system could not be * determined, the pool will only have one thread! * - * \param size The number of threads for the pool - * \return A new thread pool with the specified number of threads + * @param size The number of threads for the pool + * @return A new thread pool with the specified number of threads */ + (instancetype)threadPoolWithSize: (size_t)size; -/** - * \brief Initializes an already allocated OFThreadPool with one thread for +/*! + * @brief Initializes an already allocated OFThreadPool with one thread for * each core in the system. * - * \warning If for some reason the number of cores in the system could not be + * @warning If for some reason the number of cores in the system could not be * determined, the pool will only have one thread! * - * \return An initialized OFThreadPool with one thread for each core in the + * @return An initialized OFThreadPool with one thread for each core in the * system */ - init; -/** - * \brief Initializes an already allocated OFThreadPool with the specified +/*! + * @brief Initializes an already allocated OFThreadPool with the specified * number of threads. * - * \warning If for some reason the number of cores in the system could not be + * @warning If for some reason the number of cores in the system could not be * determined, the pool will only have one thread! * - * \param size The number of threads for the pool - * \return An initialized OFThreadPool with the specified number of threads + * @param size The number of threads for the pool + * @return An initialized OFThreadPool with the specified number of threads */ - initWithSize: (size_t)size; -/** - * \brief Execute the specified selector on the specified target with the +/*! + * @brief Execute the specified selector on the specified target with the * specified object as soon as a thread is ready. * - * \param target The target on which to perform the selector - * \param selector The selector to perform on the target - * \param object THe object with which the selector is performed on the target + * @param target The target on which to perform the selector + * @param selector The selector to perform on the target + * @param object THe object with which the selector is performed on the target */ - (void)dispatchWithTarget: (id)target selector: (SEL)selector object: (id)object; #ifdef OF_HAVE_BLOCKS -/** - * \brief Executes the specified block as soon as a thread is ready. +/*! + * @brief Executes the specified block as soon as a thread is ready. * - * \param block The block to execute + * @param block The block to execute */ - (void)dispatchWithBlock: (of_thread_pool_block_t)block; #endif -/** - * \brief Waits until all jobs are done. +/*! + * @brief Waits until all jobs are done. */ - (void)waitUntilDone; -/** - * \brief Returns the size of the thread pool. +/*! + * @brief Returns the size of the thread pool. * - * \return The size of the thread pool + * @return The size of the thread pool */ - (size_t)size; @end Index: src/OFTimer.h ================================================================== --- src/OFTimer.h +++ src/OFTimer.h @@ -22,12 +22,12 @@ #ifdef OF_HAVE_BLOCKS typedef void (^of_timer_block_t)(OFTimer*); #endif -/** - * \brief A class for creating and firing timers. +/*! + * @brief A class for creating and firing timers. */ @interface OFTimer: OFObject { OFDate *fireDate; double interval; @@ -44,195 +44,195 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain) OFDate *fireDate; #endif -/** - * \brief Creates and schedules a new timer with the specified time interval. +/*! + * @brief Creates and schedules a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector repeats: (BOOL)repeats; -/** - * \brief Creates and schedules a new timer with the specified time interval. +/*! + * @brief Creates and schedules a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param object An object to pass when calling the selector on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object An object to pass when calling the selector on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object repeats: (BOOL)repeats; -/** - * \brief Creates and schedules a new timer with the specified time interval. - * - * \param interval The time interval after which the timer should be executed - * when fired - * \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 A new, autoreleased timer +/*! + * @brief Creates and schedules a new timer with the specified time interval. + * + * @param interval The time interval after which the timer should be executed + * when fired + * @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 A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 repeats: (BOOL)repeats; #ifdef OF_HAVE_BLOCKS -/** - * \brief Creates and schedules a new timer with the specified time interval. +/*! + * @brief Creates and schedules a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param repeats Whether the timer repeats after it has been executed - * \param block The block to invoke when the timer fires - * \return A new, autoreleased timer + * @param repeats Whether the timer repeats after it has been executed + * @param block The block to invoke when the timer fires + * @return A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval repeats: (BOOL)repeats block: (of_timer_block_t)block; #endif -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector repeats: (BOOL)repeats; -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param object An object to pass when calling the selector on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object An object to pass when calling the selector on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object repeats: (BOOL)repeats; -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \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 A new, autoreleased 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 A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 repeats: (BOOL)repeats; #ifdef OF_HAVE_BLOCKS -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param repeats Whether the timer repeats after it has been executed - * \param block The block to invoke when the timer fires - * \return A new, autoreleased timer + * @param repeats Whether the timer repeats after it has been executed + * @param block The block to invoke when the timer fires + * @return A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval repeats: (BOOL)repeats block: (of_timer_block_t)block; #endif -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @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 repeats Whether the timer repeats after it has been executed - * \return An initialized timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval target: (id)target selector: (SEL)selector repeats: (BOOL)repeats; -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @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 object An 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 + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object An 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 target: (id)target selector: (SEL)selector object: (id)object1 repeats: (BOOL)repeats; -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @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 repeats Whether the timer repeats after it has been executed - * \return An initialized timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval target: (id)target selector: (SEL)selector @@ -239,61 +239,61 @@ object: (id)object1 object: (id)object2 repeats: (BOOL)repeats; #ifdef OF_HAVE_BLOCKS -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @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 repeats Whether the timer repeats after it has been executed - * \param block The block to invoke when the timer fires - * \return An initialized timer + * @param repeats Whether the timer repeats after it has been executed + * @param block The block to invoke when the timer fires + * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval repeats: (BOOL)repeats block: (of_timer_block_t)block; #endif -/** - * \brief Fires the timer, meaning it will execute the specified selector on the +/*! + * @brief Fires the timer, meaning it will execute the specified selector on the * target. */ - (void)fire; -/** - * \brief Returns the next date at which the timer will fire. +/*! + * @brief Returns the next date at which the timer will fire. * - * \return The next date at which the timer will fire + * @return The next date at which the timer will fire */ - (OFDate*)fireDate; -/** - * \brief Invalidates the timer, preventing it from firing. +/*! + * @brief Invalidates the timer, preventing it from firing. */ - (void)invalidate; -/** - * \brief Returns whether the timer is valid. +/*! + * @brief Returns whether the timer is valid. * - * \return Whether the timer is valid + * @return Whether the timer is valid */ - (BOOL)isValid; -/** - * \brief Returns the time interval in which the timer will repeat, if it is a +/*! + * @brief Returns the time interval in which the timer will repeat, if it is a * repeating timer. * - * \return The time interval in which the timer will repeat, if it is a + * @return The time interval in which the timer will repeat, if it is a * repeating timer */ - (double)timeInterval; -/** - * \brief Waits until the timer fired. +/*! + * @brief Waits until the timer fired. */ - (void)waitUntilDone; @end Index: src/OFURL.h ================================================================== --- src/OFURL.h +++ src/OFURL.h @@ -17,12 +17,12 @@ #import "OFObject.h" #import "OFSerialization.h" @class OFString; -/** - * \brief A class for parsing URLs and accessing parts of it. +/*! + * @brief A class for parsing URLs and accessing parts of it. */ @interface OFURL: OFObject { OFString *scheme; OFString *host; @@ -45,175 +45,175 @@ @property (copy) OFString *parameters; @property (copy) OFString *query; @property (copy) OFString *fragment; #endif -/** +/*! * Creates a new URL with the specified string. * - * \param string A string describing a URL - * \return A new, autoreleased OFURL + * @param string A string describing a URL + * @return A new, autoreleased OFURL */ + (instancetype)URLWithString: (OFString*)string; -/** +/*! * Creates a new URL with the specified string relative to the specified URL. * - * \param string A string describing a URL - * \param URL An URL to which the string is relative - * \return A new, autoreleased OFURL + * @param string A string describing a URL + * @param URL An URL to which the string is relative + * @return A new, autoreleased OFURL */ + (instancetype)URLWithString: (OFString*)string relativeToURL: (OFURL*)URL; -/** - * \brief Initializes an already allocated OFURL with the specified string. +/*! + * @brief Initializes an already allocated OFURL with the specified string. * - * \param string A string describing a URL - * \return An initialized OFURL + * @param string A string describing a URL + * @return An initialized OFURL */ - initWithString: (OFString*)string; -/** - * \brief Initializes an already allocated OFURL with the specified string and +/*! + * @brief Initializes an already allocated OFURL with the specified string and * relative URL. * - * \param string A string describing a URL - * \param URL A URL to which the string is relative - * \return An initialized OFURL + * @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; -/** - * \brief Returns the scheme part of the URL. +/*! + * @brief Returns the scheme part of the URL. * - * \return The scheme part of the URL + * @return The scheme part of the URL */ - (OFString*)scheme; -/** - * \brief Set the scheme part of the URL. +/*! + * @brief Set the scheme part of the URL. * - * \param scheme The scheme part of the URL to set + * @param scheme The scheme part of the URL to set */ - (void)setScheme: (OFString*)scheme; -/** - * \brief Returns the host part of the URL. +/*! + * @brief Returns the host part of the URL. * - * \return The host part of the URL + * @return The host part of the URL */ - (OFString*)host; -/** - * \brief Set the host part of the URL. +/*! + * @brief Set the host part of the URL. * - * \param host The host part of the URL to set + * @param host The host part of the URL to set */ - (void)setHost: (OFString*)host; -/** - * \brief Returns the port part of the URL. +/*! + * @brief Returns the port part of the URL. * - * \return The port part of the URL + * @return The port part of the URL */ - (uint16_t)port; -/** - * \brief Set the port part of the URL. +/*! + * @brief Set the port part of the URL. * - * \param port The port part of the URL to set + * @param port The port part of the URL to set */ - (void)setPort: (uint16_t)port; -/** - * \brief Returns the user part of the URL. +/*! + * @brief Returns the user part of the URL. * - * \return The user part of the URL + * @return The user part of the URL */ - (OFString*)user; -/** - * \brief Set the user part of the URL. +/*! + * @brief Set the user part of the URL. * - * \param user The user part of the URL to set + * @param user The user part of the URL to set */ - (void)setUser: (OFString*)user; -/** - * \brief Returns the password part of the URL. +/*! + * @brief Returns the password part of the URL. * - * \return The password part of the URL + * @return The password part of the URL */ - (OFString*)password; -/** - * \brief Set the password part of the URL. +/*! + * @brief Set the password part of the URL. * - * \param password The password part of the URL to set + * @param password The password part of the URL to set */ - (void)setPassword: (OFString*)password; -/** - * \brief Returns the path part of the URL. +/*! + * @brief Returns the path part of the URL. * - * \return The path part of the URL + * @return The path part of the URL */ - (OFString*)path; -/** - * \brief Set the path part of the URL. +/*! + * @brief Set the path part of the URL. * - * \param path The path part of the URL to set + * @param path The path part of the URL to set */ - (void)setPath: (OFString*)path; -/** - * \brief Returns the parameters part of the URL. +/*! + * @brief Returns the parameters part of the URL. * - * \return The parameters part of the URL + * @return The parameters part of the URL */ - (OFString*)parameters; -/** - * \brief Set the parameters part of the URL. +/*! + * @brief Set the parameters part of the URL. * - * \param parameters The parameters part of the URL to set + * @param parameters The parameters part of the URL to set */ - (void)setParameters: (OFString*)parameters; -/** - * \brief Returns the query part of the URL. +/*! + * @brief Returns the query part of the URL. * - * \return The query part of the URL + * @return The query part of the URL */ - (OFString*)query; -/** - * \brief Set the query part of the URL. +/*! + * @brief Set the query part of the URL. * - * \param query The query part of the URL to set + * @param query The query part of the URL to set */ - (void)setQuery: (OFString*)query; -/** - * \brief Returns the fragment part of the URL. +/*! + * @brief Returns the fragment part of the URL. * - * \return The fragment part of the URL + * @return The fragment part of the URL */ - (OFString*)fragment; -/** - * \brief Set the fragment part of the URL. +/*! + * @brief Set the fragment part of the URL. * - * \param fragment The fragment part of the URL to set + * @param fragment The fragment part of the URL to set */ - (void)setFragment: (OFString*)fragment; -/** - * \brief Returns the URL as a string. +/*! + * @brief Returns the URL as a string. * - * \return The URL as a string + * @return The URL as a string */ - (OFString*)string; @end Index: src/OFXMLAttribute.h ================================================================== --- src/OFXMLAttribute.h +++ src/OFXMLAttribute.h @@ -16,12 +16,12 @@ #import "OFXMLNode.h" @class OFString; -/** - * \brief A representation of an attribute of an XML element as an object. +/*! + * @brief A representation of an attribute of an XML element as an object. */ @interface OFXMLAttribute: OFXMLNode { @public OFString *name; @@ -33,43 +33,43 @@ @property (readonly, copy) OFString *name; @property (readonly, copy, getter=namespace) OFString *ns; @property (readonly, copy) OFString *stringValue; #endif -/** - * \brief Creates a new XML attribute. +/*! + * @brief Creates a new XML attribute. * - * \param name The name of the attribute - * \param ns The namespace of the attribute - * \param value The string value of the attribute - * \return A new autoreleased OFXMLAttribute with the specified parameters + * @param name The name of the attribute + * @param ns The namespace of the attribute + * @param value The string value of the attribute + * @return A new autoreleased OFXMLAttribute with the specified parameters */ + (instancetype)attributeWithName: (OFString*)name namespace: (OFString*)ns stringValue: (OFString*)value; -/** - * \brief Initializes an already allocated OFXMLAttribute. +/*! + * @brief Initializes an already allocated OFXMLAttribute. * - * \param name The name of the attribute - * \param ns The namespace of the attribute - * \param value The string value of the attribute - * \return An initialized OFXMLAttribute with the specified parameters + * @param name The name of the attribute + * @param ns The namespace of the attribute + * @param value The string value of the attribute + * @return An initialized OFXMLAttribute with the specified parameters */ - initWithName: (OFString*)name namespace: (OFString*)ns stringValue: (OFString*)value; -/** - * \brief Returns the name of the attribute as an autoreleased OFString. +/*! + * @brief Returns the name of the attribute as an autoreleased OFString. * - * \return The name of the attribute as an autoreleased OFString + * @return The name of the attribute as an autoreleased OFString */ - (OFString*)name; -/** - * \brief Returns the namespace of the attribute as an autoreleased OFString. +/*! + * @brief Returns the namespace of the attribute as an autoreleased OFString. * - * \return The namespace of the attribute as an autoreleased OFString + * @return The namespace of the attribute as an autoreleased OFString */ - (OFString*)namespace; @end Index: src/OFXMLCDATA.h ================================================================== --- src/OFXMLCDATA.h +++ src/OFXMLCDATA.h @@ -14,29 +14,29 @@ * file. */ #import "OFXMLNode.h" -/** - * \brief A class representing XML CDATA. +/*! + * @brief A class representing XML CDATA. */ @interface OFXMLCDATA: OFXMLNode { OFString *CDATA; } -/** - * \brief Creates a new OFXMLCDATA with the specified string. +/*! + * @brief Creates a new OFXMLCDATA with the specified string. * - * \param string The string value for the CDATA - * \return A new OFXMLCDATA + * @param string The string value for the CDATA + * @return A new OFXMLCDATA */ + (instancetype)CDATAWithString: (OFString*)string; -/** - * \brief Initializes an alredy allocated OFXMLCDATA with the specified string. +/*! + * @brief Initializes an alredy allocated OFXMLCDATA with the specified string. * - * \param string The string value for the CDATA - * \return An initialized OFXMLCDATA + * @param string The string value for the CDATA + * @return An initialized OFXMLCDATA */ - initWithString: (OFString*)string; @end Index: src/OFXMLCharacters.h ================================================================== --- src/OFXMLCharacters.h +++ src/OFXMLCharacters.h @@ -14,30 +14,30 @@ * file. */ #import "OFXMLNode.h" -/** - * \brief A class representing XML characters. +/*! + * @brief A class representing XML characters. */ @interface OFXMLCharacters: OFXMLNode { OFString *characters; } -/** - * \brief Creates a new OFXMLCharacters with the specified string. +/*! + * @brief Creates a new OFXMLCharacters with the specified string. * - * \param string The string value for the characters - * \return A new OFXMLCharacters + * @param string The string value for the characters + * @return A new OFXMLCharacters */ + (instancetype)charactersWithString: (OFString*)string; -/** - * \brief Initializes an already allocated OFXMLCharacters with the specified +/*! + * @brief Initializes an already allocated OFXMLCharacters with the specified * string. * - * \param string The string value for the characters - * \return An initialized OFXMLCharacters + * @param string The string value for the characters + * @return An initialized OFXMLCharacters */ - initWithString: (OFString*)string; @end Index: src/OFXMLComment.h ================================================================== --- src/OFXMLComment.h +++ src/OFXMLComment.h @@ -14,30 +14,30 @@ * file. */ #import "OFXMLNode.h" -/** - * \brief A class for representing XML comments. +/*! + * @brief A class for representing XML comments. */ @interface OFXMLComment: OFXMLNode { OFString *comment; } -/** - * \brief Creates a new OFXMLComment with the specified string. +/*! + * @brief Creates a new OFXMLComment with the specified string. * - * \param string The string for the comment - * \return A new OFXMLComment + * @param string The string for the comment + * @return A new OFXMLComment */ + (instancetype)commentWithString: (OFString*)string; -/** - * \brief Initializes an already allocated OFXMLComment with the specified +/*! + * @brief Initializes an already allocated OFXMLComment with the specified * string. * - * \param string The string for the comment - * \return An initialized OFXMLComment + * @param string The string for the comment + * @return An initialized OFXMLComment */ - initWithString: (OFString*)string; @end Index: src/OFXMLElement+Serialization.h ================================================================== --- src/OFXMLElement+Serialization.h +++ src/OFXMLElement+Serialization.h @@ -22,16 +22,16 @@ extern int _OFXMLElement_Serialization_reference; #ifdef __cplusplus } #endif -/** - * \brief A category that provides methods for deserializing objects. +/*! + * @brief A category that provides methods for deserializing objects. */ @interface OFXMLElement (OFSerialization) -/** - * \brief Deserializes the receiver into an object. +/*! + * @brief Deserializes the receiver into an object. * - * \return The deserialized object + * @return The deserialized object */ - (id)objectByDeserializing; @end Index: src/OFXMLElement.h ================================================================== --- src/OFXMLElement.h +++ src/OFXMLElement.h @@ -21,12 +21,12 @@ @class OFMutableString; @class OFMutableArray; @class OFMutableDictionary; @class OFXMLAttribute; -/** - * \brief A class which stores an XML element. +/*! + * @brief A class which stores an XML element. */ @interface OFXMLElement: OFXMLNode { OFString *name; OFString *ns; @@ -42,369 +42,369 @@ @property (copy) OFString *defaultNamespace; @property (readonly, copy) OFArray *attributes; @property (readonly, copy) OFArray *children; #endif -/** - * \brief Creates a new XML element with the specified name. +/*! + * @brief Creates a new XML element with the specified name. * - * \param name The name for the element - * \return A new autoreleased OFXMLElement with the specified element name + * @param name The name for the element + * @return A new autoreleased OFXMLElement with the specified element name */ + (instancetype)elementWithName: (OFString*)name; -/** - * \brief Creates a new XML element with the specified name and string value. +/*! + * @brief Creates a new XML element with the specified name and string value. * - * \param name The name for the element - * \param stringValue The value for the element - * \return A new autoreleased OFXMLElement with the specified element name and + * @param name The name for the element + * @param stringValue The value for the element + * @return A new autoreleased OFXMLElement with the specified element name and * value */ + (instancetype)elementWithName: (OFString*)name stringValue: (OFString*)stringValue; -/** - * \brief Creates a new XML element with the specified name and namespace. +/*! + * @brief Creates a new XML element with the specified name and namespace. * - * \param name The name for the element - * \param ns The namespace for the element - * \return A new autoreleased OFXMLElement with the specified element name and + * @param name The name for the element + * @param ns The namespace for the element + * @return A new autoreleased OFXMLElement with the specified element name and * namespace */ + (instancetype)elementWithName: (OFString*)name namespace: (OFString*)ns; -/** - * \brief Creates a new XML element with the specified name, namespace and +/*! + * @brief Creates a new XML element with the specified name, namespace and * string value. * - * \param name The name for the element - * \param ns The namespace for the element - * \param stringValue The value for the element - * \return A new autoreleased OFXMLElement with the specified element name, + * @param name The name for the element + * @param ns The namespace for the element + * @param stringValue The value for the element + * @return A new autoreleased OFXMLElement with the specified element name, * namespace and value */ + (instancetype)elementWithName: (OFString*)name namespace: (OFString*)ns stringValue: (OFString*)stringValue; -/** - * \brief Creates a new element with the specified element. +/*! + * @brief Creates a new element with the specified element. * - * \param element An OFXMLElement to initialize the OFXMLElement with - * \return A new autoreleased OFXMLElement with the contents of the specified + * @param element An OFXMLElement to initialize the OFXMLElement with + * @return A new autoreleased OFXMLElement with the contents of the specified * element */ + (instancetype)elementWithElement: (OFXMLElement*)element; -/** - * \brief Parses the string and returns an OFXMLElement for it. +/*! + * @brief Parses the string and returns an OFXMLElement for it. * - * \param string The string to parse - * \return A new autoreleased OFXMLElement with the contents of the string + * @param string The string to parse + * @return A new autoreleased OFXMLElement with the contents of the string */ + (instancetype)elementWithXMLString: (OFString*)string; -/** - * \brief Parses the specified file and returns an OFXMLElement for it. +/*! + * @brief Parses the specified file and returns an OFXMLElement for it. * - * \param path The path to the file - * \return A new autoreleased OFXMLElement with the contents of the specified + * @param path The path to the file + * @return A new autoreleased OFXMLElement with the contents of the specified * file */ + (instancetype)elementWithFile: (OFString*)path; -/** - * \brief Initializes an already allocated OFXMLElement with the specified name. +/*! + * @brief 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 + * @param name The name for the element + * @return An initialized OFXMLElement with the specified element name */ - initWithName: (OFString*)name; -/** - * \brief Initializes an already allocated OFXMLElement with the specified name +/*! + * @brief Initializes an already allocated OFXMLElement with the specified name * and string value. * - * \param name The name for the element - * \param stringValue The value for the element - * \return An initialized OFXMLElement with the specified element name and + * @param name The name for the element + * @param stringValue The value for the element + * @return An initialized OFXMLElement with the specified element name and * value */ - initWithName: (OFString*)name stringValue: (OFString*)stringValue; -/** - * \brief Initializes an already allocated OFXMLElement with the specified name +/*! + * @brief Initializes an already allocated OFXMLElement with the specified name * and namespace. * - * \param name The name for the element - * \param ns The namespace for the element - * \return An initialized OFXMLElement with the specified element name and + * @param name The name for the element + * @param ns The namespace for the element + * @return An initialized OFXMLElement with the specified element name and * namespace */ - initWithName: (OFString*)name namespace: (OFString*)ns; -/** - * \brief Initializes an already allocated OFXMLElement with the specified name, +/*! + * @brief Initializes an already allocated OFXMLElement with the specified name, * namespace and value. * - * \param name The name for the element - * \param ns The namespace for the element - * \param stringValue The value for the element - * \return An initialized OFXMLElement with the specified element name, + * @param name The name for the element + * @param ns The namespace for the element + * @param stringValue The value for the element + * @return An initialized OFXMLElement with the specified element name, * namespace and value */ - initWithName: (OFString*)name namespace: (OFString*)ns stringValue: (OFString*)stringValue; -/** - * \brief Initializes an already allocated OFXMLElement with the specified - * element. - * - * \param element An OFXMLElement to initialize the OFXMLElement with - * \return A new autoreleased OFXMLElement with the contents of the specified - * element - */ -- initWithElement: (OFXMLElement*)element; - -/** - * \brief Parses the string and initializes an already allocated OFXMLElement - * with it. - * - * \param string The string to parse - * \return An initialized OFXMLElement with the contents of the string - */ -- initWithXMLString: (OFString*)string; - -/** - * \brief Parses the specified file and initializes an already allocated - * OFXMLElement with it. - * - * \param path The path to the file - * \return An initialized OFXMLElement with the contents of the specified file - */ -- initWithFile: (OFString*)path; - -/** - * \brief Sets the name of the element. - * - * \param name The new name - */ -- (void)setName: (OFString*)name; - -/** - * \brief Returns the name of the element. - * - * \return The name of the element - */ -- (OFString*)name; - -/** - * \brief Sets the namespace of the element. - * - * \param ns The new namespace - */ -- (void)setNamespace: (OFString*)ns; - -/** - * \brief Returns the namespace of the element. - * - * \return The namespace of the element - */ -- (OFString*)namespace; - -/** - * \brief Returns an OFArray with the attributes of the element. - * - * \return An OFArray with the attributes of the element - */ -- (OFArray*)attributes; - -/** - * \brief Removes all children and adds the children from the specified array. - * - * \param children The new children to add - */ -- (void)setChildren: (OFArray*)children; - -/** - * \brief Returns an array of OFXMLNodes with all children of the element. - * - * \return An array of OFXMLNodes with all children of the element - */ -- (OFArray*)children; - -/** - * \brief Removes all children and sets the string value to the specified - * string. - * - * \param stringValue The new string value for the element - */ -- (void)setStringValue: (OFString*)stringValue; - -/** - * \brief Adds the specified attribute. - * - * If an attribute with the same name and namespace already exists, it is not - * added. - * - * \param attribute The attribute to add - */ -- (void)addAttribute: (OFXMLAttribute*)attribute; - -/** - * \brief Adds the specified attribute with the specified string value. - * - * If an attribute with the same name and namespace already exists, it is not - * added. - * - * \param name The name of the attribute - * \param stringValue The value of the attribute - */ -- (void)addAttributeWithName: (OFString*)name - stringValue: (OFString*)stringValue; - -/** - * \brief Adds the specified attribute with the specified namespace and string +/*! + * @brief Initializes an already allocated OFXMLElement with the specified + * element. + * + * @param element An OFXMLElement to initialize the OFXMLElement with + * @return A new autoreleased OFXMLElement with the contents of the specified + * element + */ +- initWithElement: (OFXMLElement*)element; + +/*! + * @brief Parses the string and initializes an already allocated OFXMLElement + * with it. + * + * @param string The string to parse + * @return An initialized OFXMLElement with the contents of the string + */ +- initWithXMLString: (OFString*)string; + +/*! + * @brief Parses the specified file and initializes an already allocated + * OFXMLElement with it. + * + * @param path The path to the file + * @return An initialized OFXMLElement with the contents of the specified file + */ +- initWithFile: (OFString*)path; + +/*! + * @brief Sets the name of the element. + * + * @param name The new name + */ +- (void)setName: (OFString*)name; + +/*! + * @brief Returns the name of the element. + * + * @return The name of the element + */ +- (OFString*)name; + +/*! + * @brief Sets the namespace of the element. + * + * @param ns The new namespace + */ +- (void)setNamespace: (OFString*)ns; + +/*! + * @brief Returns the namespace of the element. + * + * @return The namespace of the element + */ +- (OFString*)namespace; + +/*! + * @brief Returns an OFArray with the attributes of the element. + * + * @return An OFArray with the attributes of the element + */ +- (OFArray*)attributes; + +/*! + * @brief Removes all children and adds the children from the specified array. + * + * @param children The new children to add + */ +- (void)setChildren: (OFArray*)children; + +/*! + * @brief Returns an array of OFXMLNodes with all children of the element. + * + * @return An array of OFXMLNodes with all children of the element + */ +- (OFArray*)children; + +/*! + * @brief Removes all children and sets the string value to the specified + * string. + * + * @param stringValue The new string value for the element + */ +- (void)setStringValue: (OFString*)stringValue; + +/*! + * @brief Adds the specified attribute. + * + * If an attribute with the same name and namespace already exists, it is not + * added. + * + * @param attribute The attribute to add + */ +- (void)addAttribute: (OFXMLAttribute*)attribute; + +/*! + * @brief Adds the specified attribute with the specified string value. + * + * If an attribute with the same name and namespace already exists, it is not + * added. + * + * @param name The name of the attribute + * @param stringValue The value of the attribute + */ +- (void)addAttributeWithName: (OFString*)name + stringValue: (OFString*)stringValue; + +/*! + * @brief Adds the specified attribute with the specified namespace and string * value. * * If an attribute with the same name and namespace already exists, it is not * added. * - * \param name The name of the attribute - * \param ns The namespace of the attribute - * \param stringValue The value of the attribute + * @param name The name of the attribute + * @param ns The namespace of the attribute + * @param stringValue The value of the attribute */ - (void)addAttributeWithName: (OFString*)name namespace: (OFString*)ns stringValue: (OFString*)stringValue; -/** - * \brief Returns the attribute with the specified name. +/*! + * @brief Returns the attribute with the specified name. * - * \param attributeName The name of the attribute - * \return The attribute with the specified name + * @param attributeName The name of the attribute + * @return The attribute with the specified name */ - (OFXMLAttribute*)attributeForName: (OFString*)attributeName; -/** - * \brief Returns the attribute with the specified name and namespace. +/*! + * @brief Returns the attribute with the specified name and namespace. * - * \param attributeName The name of the attribute - * \param attributeNS The namespace of the attribute - * \return The attribute with the specified name and namespace + * @param attributeName The name of the attribute + * @param attributeNS The namespace of the attribute + * @return The attribute with the specified name and namespace */ - (OFXMLAttribute*)attributeForName: (OFString*)attributeName namespace: (OFString*)attributeNS; -/** - * \brief Removes the attribute with the specified name. +/*! + * @brief Removes the attribute with the specified name. * - * \param attribteName The name of the attribute + * @param attribteName The name of the attribute */ - (void)removeAttributeForName: (OFString*)attributeName; -/** - * \brief Removes the attribute with the specified name and namespace. +/*! + * @brief Removes the attribute with the specified name and namespace. * - * \param attributeName The name of the attribute - * \param attributeNS The namespace of the attribute + * @param attributeName The name of the attribute + * @param attributeNS The namespace of the attribute */ - (void)removeAttributeForName: (OFString*)attributeName namespace: (OFString*)attributeNS; -/** - * \brief Sets a prefix for a namespace. +/*! + * @brief Sets a prefix for a namespace. * - * \param prefix The prefix for the namespace - * \param ns The namespace for which the prefix is set + * @param prefix The prefix for the namespace + * @param ns The namespace for which the prefix is set */ - (void)setPrefix: (OFString*)prefix forNamespace: (OFString*)ns; -/** - * \brief Binds a prefix for a namespace. +/*! + * @brief Binds a prefix for a namespace. * - * \param prefix The prefix for the namespace - * \param ns The namespace for which the prefix is bound + * @param prefix The prefix for the namespace + * @param ns The namespace for which the prefix is bound */ - (void)bindPrefix: (OFString*)prefix forNamespace: (OFString*)ns; -/** - * \brief Sets the default namespace for the element to be used if there is no +/*! + * @brief Sets the default namespace for the element to be used if there is no * parent. * - * \param ns The default namespace for the element + * @param ns The default namespace for the element */ - (void)setDefaultNamespace: (OFString*)ns; -/** - * \brief Adds a child to the OFXMLElement. +/*! + * @brief Adds a child to the OFXMLElement. * - * \param child An OFXMLNode which is added as a child + * @param child An OFXMLNode which is added as a child */ - (void)addChild: (OFXMLNode*)child; -/** - * \brief Removes the first child that is equal to the specified OFXMLElement. +/*! + * @brief Removes the first child that is equal to the specified OFXMLElement. * - * \param child The child to remove from the OFXMLElement + * @param child The child to remove from the OFXMLElement */ - (void)removeChild: (OFXMLNode*)child; -/** - * \brief Returns all children that are elements. +/*! + * @brief Returns all children that are elements. * - * \return All children that are elements + * @return All children that are elements */ - (OFArray*)elements; -/** - * \brief Returns all children that have the specified namespace. +/*! + * @brief Returns all children that have the specified namespace. * - * \return All children that have the specified namespace + * @return All children that have the specified namespace */ - (OFArray*)elementsForNamespace: (OFString*)elementNS; -/** - * \brief Returns the first child element with the specified name. +/*! + * @brief Returns the first child element with the specified name. * - * \param elementName The name of the element - * \return The first child element with the specified name + * @param elementName The name of the element + * @return The first child element with the specified name */ - (OFXMLElement*)elementForName: (OFString*)elementName; -/** - * \brief Returns the child elements with the specified name. +/*! + * @brief Returns the child elements with the specified name. * - * \param elementName The name of the elements - * \return The child elements with the specified name + * @param elementName The name of the elements + * @return The child elements with the specified name */ - (OFArray*)elementsForName: (OFString*)elementName; -/** - * \brief Returns the first child element with the specified name and namespace. +/*! + * @brief Returns the first child element with the specified name and namespace. * - * \param elementName The name of the element - * \param elementNS The namespace of the element - * \return The first child element with the specified name and namespace + * @param elementName The name of the element + * @param elementNS The namespace of the element + * @return The first child element with the specified name and namespace */ - (OFXMLElement*)elementForName: (OFString*)elementName namespace: (OFString*)elementNS; -/** - * \brief Returns the child elements with the specified name and namespace. +/*! + * @brief Returns the child elements with the specified name and namespace. * - * \param elementName The name of the elements - * \param elementNS The namespace of the elements - * \return The child elements with the specified name and namespace + * @param elementName The name of the elements + * @param elementNS The namespace of the elements + * @return The child elements with the specified name and namespace */ - (OFArray*)elementsForName: (OFString*)elementName namespace: (OFString*)elementNS; @end #import "OFXMLElement+Serialization.h" Index: src/OFXMLElementBuilder.h ================================================================== --- src/OFXMLElementBuilder.h +++ src/OFXMLElementBuilder.h @@ -19,51 +19,51 @@ @class OFMutableArray; @class OFXMLElement; @class OFXMLElementBuilder; -/** - * \brief A protocol that needs to be implemented by delegates for +/*! + * @brief A protocol that needs to be implemented by delegates for * OFXMLElementBuilder. */ #ifndef OF_XML_ELEMENT_BUILDER_M @protocol OFXMLElementBuilderDelegate #else @protocol OFXMLElementBuilderDelegate #endif -/** - * \brief This callback is called when the OFXMLElementBuilder built an element. +/*! + * @brief This callback is called when the OFXMLElementBuilder built an element. * * 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 builder The builder which built an OFXMLElement + * @param elem The OFXMLElement the OFXMLElementBuilder built */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didBuildElement: (OFXMLElement*)element; #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional #endif -/** - * \brief This callback is called when the OFXMLElementBuilder built an +/*! + * @brief This callback is called when the OFXMLElementBuilder built an * OFXMLNode which is not inside an element. * * This is usually called for comments or whitespace character data before the * root element. * - * \param builder The builder which built the OFXMLNode without parent - * \param node The OFXMLNode the OFXMLElementBuilder built + * @param builder The builder which built the OFXMLNode without parent + * @param node The OFXMLNode the OFXMLElementBuilder built */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didBuildParentlessNode: (OFXMLNode*)node; -/** - * \brief This callback is called when the OFXMLElementBuilder gets a close tag +/*! + * @brief This callback is called when the OFXMLElementBuilder gets a close tag * which does not belong there. * * Most likely, the OFXMLElementBuilder was used to build XML only of a child * of the root element and the root element was closed. Often the delegate is * set to the OFXMLElementBuilder when a certain element is found, this can be @@ -71,33 +71,33 @@ * closed. * * If this method is not implemented in the delegate, the default is to throw * an OFMalformedXMLException. * - * \param builder The builder which did not expect the close tag - * \param name The name of the close tag - * \param prefix The prefix of the close tag - * \param ns The namespace of the close tag + * @param builder The builder which did not expect the close tag + * @param name The name of the close tag + * @param prefix The prefix of the close tag + * @param ns The namespace of the close tag */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didNotExpectCloseTag: (OFString*)name withPrefix: (OFString*)prefix namespace: (OFString*)ns; -/** - * \brief This callback is called when the XML parser for the element builder +/*! + * @brief This callback is called when the XML parser for the element builder * found an unknown entity. * - * \param entity The name of the entity - * \return The substitution for the entity + * @param entity The name of the entity + * @return The substitution for the entity */ - (OFString*)elementBuilder: (OFXMLElementBuilder*)builder foundUnknownEntityNamed: (OFString*)entity; @end -/** - * \brief A class implementing the OFXMLParserDelegate protocol that can build +/*! + * @brief A class implementing the OFXMLParserDelegate protocol that can build * OFXMLElements from the document parsed by the OFXMLParser. * * It can also be used to build OFXMLElements from parts of the document by * first parsing stuff using the OFXMLParser with another delegate and then * setting the OFXMLElementBuilder as delegate for the parser. @@ -110,29 +110,29 @@ #ifdef OF_HAVE_PROPERTIES @property (assign) id delegate; #endif -/** - * \brief Creates a new element builder. +/*! + * @brief Creates a new element builder. * - * \return A new, autoreleased OFXMLElementBuilder + * @return A new, autoreleased OFXMLElementBuilder */ + (instancetype)elementBuilder; -/** - * \brief Returns the delegate for the OFXMLElementBuilder. +/*! + * @brief Returns the delegate for the OFXMLElementBuilder. * - * \return The delegate for the OFXMLElementBuilder + * @return The delegate for the OFXMLElementBuilder */ - (id )delegate; -/** - * \brief Sets the delegate for the OFXMLElementBuilder. +/*! + * @brief Sets the delegate for the OFXMLElementBuilder. * - * \param delegate The delegate for the OFXMLElementBuilder + * @param delegate The delegate for the OFXMLElementBuilder */ - (void)setDelegate: (id )delegate; @end @interface OFObject (OFXMLElementBuilderDelegate) @end Index: src/OFXMLNode.h ================================================================== --- src/OFXMLNode.h +++ src/OFXMLNode.h @@ -15,73 +15,73 @@ */ #import "OFObject.h" #import "OFSerialization.h" -/** - * \brief A class which stores an XML element. +/*! + * @brief A class which stores an XML element. */ @interface OFXMLNode: OFObject -/** - * \brief Returns the contents of the receiver as a string value. +/*! + * @brief Returns the contents of the receiver as a string value. * - * \return A string with the string value + * @return A string with the string value */ - (OFString*)stringValue; -/** - * \brief Returns the contents of the receiver as a decimal value. +/*! + * @brief Returns the contents of the receiver as a decimal value. * - * \return An integer with the decimal value + * @return An integer with the decimal value */ - (intmax_t)decimalValue; -/** - * \brief Returns the contents of the receiver as a hexadecimal value. +/*! + * @brief Returns the contents of the receiver as a hexadecimal value. * - * \return An integer with the hexadecimal value + * @return An integer with the hexadecimal value */ - (uintmax_t)hexadecimalValue; -/** - * \brief Returns the contents of the receiver as a float value. +/*! + * @brief Returns the contents of the receiver as a float value. * - * \return A float with the float value + * @return A float with the float value */ - (float)floatValue; -/** - * \brief Returns the contents of the receiver as a double value. +/*! + * @brief Returns the contents of the receiver as a double value. * - * \return A double with the double value + * @return A double with the double value */ - (double)doubleValue; -/** - * \brief Returns an OFString representing the OFXMLNode as an XML string. +/*! + * @brief Returns an OFString representing the OFXMLNode as an XML string. * - * \return An OFString representing the OFXMLNode as an XML string + * @return An OFString representing the OFXMLNode as an XML string */ - (OFString*)XMLString; -/** - * \brief Returns an OFString representing the OFXMLNode as an XML string with +/*! + * @brief Returns an OFString representing the OFXMLNode as an XML string with * indentation. * - * \param indentation The indentation for the XML string - * \return An OFString representing the OFXMLNode as an XML string with + * @param indentation The indentation for the XML string + * @return An OFString representing the OFXMLNode as an XML string with * indentation */ - (OFString*)XMLStringWithIndentation: (unsigned int)indentation; -/** - * \brief Returns an OFString representing the OFXMLNode as an XML string with +/*! + * @brief Returns an OFString representing the OFXMLNode as an XML string with * indentation for the specified level. * - * \param indentation The indentation for the XML string - * \param level The level of indentation - * \return An OFString representing the OFXMLNode as an XML string with + * @param indentation The indentation for the XML string + * @param level The level of indentation + * @return An OFString representing the OFXMLNode as an XML string with * indentation */ - (OFString*)XMLStringWithIndentation: (unsigned int)indentation level: (unsigned int)level; @end Index: src/OFXMLParser.h ================================================================== --- src/OFXMLParser.h +++ src/OFXMLParser.h @@ -22,109 +22,109 @@ @class OFArray; @class OFMutableArray; @class OFDataArray; @class OFStream; -/** - * \brief A protocol that needs to be implemented by delegates for OFXMLParser. +/*! + * @brief A protocol that needs to be implemented by delegates for OFXMLParser. */ #ifndef OF_XML_PARSER_M @protocol OFXMLParserDelegate #else @protocol OFXMLParserDelegate #endif #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional #endif -/** - * \brief This callback is called when the XML parser found processing +/*! + * @brief This callback is called when the XML parser found processing * instructions. * - * \param parser The parser which found processing instructions - * \param pi The processing instructions + * @param parser The parser which found processing instructions + * @param pi The processing instructions */ - (void)parser: (OFXMLParser*)parser foundProcessingInstructions: (OFString*)pi; -/** - * \brief This callback is called when the XML parser found the start of a new +/*! + * @brief This callback is called when the XML parser found the start of a new * tag. * - * \param parser The parser which found a new tag - * \param name The name of the tag which just started - * \param prefix The prefix of the tag which just started or nil - * \param ns The namespace of the tag which just started or nil - * \param attributes The attributes included in the tag which just started or + * @param parser The parser which found a new tag + * @param name The name of the tag which just started + * @param prefix The prefix of the tag which just started or nil + * @param ns The namespace of the tag which just started or nil + * @param attributes The attributes included in the tag which just started or * nil */ - (void)parser: (OFXMLParser*)parser didStartElement: (OFString*)name withPrefix: (OFString*)prefix namespace: (OFString*)ns attributes: (OFArray*)attributes; -/** - * \brief This callback is called when the XML parser found the end of a tag. +/*! + * @brief This callback is called when the XML parser found the end of a tag. * - * \param parser The parser which found the end of a tag - * \param name The name of the tag which just ended - * \param prefix The prefix of the tag which just ended or nil - * \param ns The namespace of the tag which just ended or nil + * @param parser The parser which found the end of a tag + * @param name The name of the tag which just ended + * @param prefix The prefix of the tag which just ended or nil + * @param ns The namespace of the tag which just ended or nil */ - (void)parser: (OFXMLParser*)parser didEndElement: (OFString*)name withPrefix: (OFString*)prefix namespace: (OFString*)ns; -/** - * \brief This callback is called when the XML parser found characters. +/*! + * @brief This callback is called when the XML parser found characters. * * In case there are comments or CDATA, it is possible that this callback is * called multiple times in a row. * - * \param parser The parser which found a string - * \param characters The characters the XML parser found + * @param parser The parser which found a string + * @param characters The characters the XML parser found */ - (void)parser: (OFXMLParser*)parser foundCharacters: (OFString*)characters; -/** - * \brief This callback is called when the XML parser found CDATA. +/*! + * @brief This callback is called when the XML parser found CDATA. * - * \param parser The parser which found a string - * \param CDATA The CDATA the XML parser found + * @param parser The parser which found a string + * @param CDATA The CDATA the XML parser found */ - (void)parser: (OFXMLParser*)parser foundCDATA: (OFString*)CDATA; -/** - * \brief This callback is called when the XML parser found a comment. +/*! + * @brief This callback is called when the XML parser found a comment. * - * \param parser The parser which found a comment - * \param comment The comment the XML parser found + * @param parser The parser which found a comment + * @param comment The comment the XML parser found */ - (void)parser: (OFXMLParser*)parser foundComment: (OFString*)comment; -/** - * \brief This callback is called when the XML parser found an entity it +/*! + * @brief This callback is called when the XML parser found an entity it * doesn't know. * * The callback is supposed to return a substitution for the entity or nil if * it is not known to the callback as well, in which case an exception will be * risen. * - * \param parser The parser which found an unknown entity - * \param entity The name of the entity the XML parser didn't know - * \return A substitution for the entity or nil + * @param parser The parser which found an unknown entity + * @param entity The name of the entity the XML parser didn't know + * @return A substitution for the entity or nil */ - (OFString*)parser: (OFXMLParser*)parser foundUnknownEntityNamed: (OFString*)entity; @end -/** - * \brief An event-based XML parser. +/*! + * @brief An event-based XML parser. * * OFXMLParser is an event-based XML parser which calls the delegate's callbacks * as soon asit finds something, thus suitable for streams as well. */ @interface OFXMLParser: OFObject @@ -171,73 +171,73 @@ #ifdef OF_HAVE_PROPERTIES @property (assign) id delegate; #endif -/** - * \brief Creates a new XML parser. +/*! + * @brief Creates a new XML parser. * - * \return A new, autoreleased OFXMLParser + * @return A new, autoreleased OFXMLParser */ + (instancetype)parser; -/** - * \brief Returns the delegate that is used by the XML parser. +/*! + * @brief Returns the delegate that is used by the XML parser. * - * \return The delegate that is used by the XML parser + * @return The delegate that is used by the XML parser */ - (id )delegate; -/** - * \brief Sets the delegate the OFXMLParser should use. +/*! + * @brief Sets the delegate the OFXMLParser should use. * - * \param delegate The delegate to use + * @param delegate The delegate to use */ - (void)setDelegate: (id )delegate; -/** - * \brief Parses the specified buffer with the specified size. +/*! + * @brief Parses the specified buffer with the specified size. * - * \param buffer The buffer to parse - * \param length The length of the buffer + * @param buffer The buffer to parse + * @param length The length of the buffer */ - (void)parseBuffer: (const char*)buffer length: (size_t)length; -/** - * \brief Parses the specified string. +/*! + * @brief Parses the specified string. * - * \param string The string to parse + * @param string The string to parse */ - (void)parseString: (OFString*)string; -/** - * \brief Parses the specified stream. +/*! + * @brief Parses the specified stream. * - * \param stream The stream to parse + * @param stream The stream to parse */ - (void)parseStream: (OFStream*)stream; -/** - * \brief Parses the specified file. +/*! + * @brief Parses the specified file. * - * \param path The path to the file to parse + * @param path The path to the file to parse */ - (void)parseFile: (OFString*)path; -/** - * \brief Returns the current line number. +/*! + * @brief Returns the current line number. * - * \return The current line number + * @return The current line number */ - (size_t)lineNumber; -/** - * \brief Returns whether the XML parser has finished parsing. +/*! + * @brief Returns whether the XML parser has finished parsing. * - * \return Whether the XML parser has finished parsing + * @return Whether the XML parser has finished parsing */ - (BOOL)finishedParsing; @end @interface OFObject (OFXMLParserDelegate) @end Index: src/OFXMLProcessingInstructions.h ================================================================== --- src/OFXMLProcessingInstructions.h +++ src/OFXMLProcessingInstructions.h @@ -14,30 +14,30 @@ * file. */ #import "OFXMLNode.h" -/** - * \brief A class for representing XML processing instructions. +/*! + * @brief A class for representing XML processing instructions. */ @interface OFXMLProcessingInstructions: OFXMLNode { OFString *processingInstructions; } -/** - * \brief Creates a new OFXMLProcessingInstructions with the specified string. +/*! + * @brief Creates a new OFXMLProcessingInstructions with the specified string. * - * \param string The string for the processing instructions - * \return A new OFXMLProcessingInstructions + * @param string The string for the processing instructions + * @return A new OFXMLProcessingInstructions */ + (instancetype)processingInstructionsWithString: (OFString*)string; -/** - * \brief Initializes an already allocated OFXMLProcessingInstructions with the +/*! + * @brief Initializes an already allocated OFXMLProcessingInstructions with the * specified string. * - * \param string The string for the processing instructions - * \return An initialized OFXMLProcessingInstructions + * @param string The string for the processing instructions + * @return An initialized OFXMLProcessingInstructions */ - initWithString: (OFString*)string; @end Index: src/exceptions/OFAcceptFailedException.h ================================================================== --- src/exceptions/OFAcceptFailedException.h +++ src/exceptions/OFAcceptFailedException.h @@ -16,12 +16,12 @@ #import "OFException.h" @class OFTCPSocket; -/** - * \brief An exception indicating that accepting a connection failed. +/*! + * @brief An exception indicating that accepting a connection failed. */ @interface OFAcceptFailedException: OFException { OFTCPSocket *socket; int errNo; @@ -30,33 +30,33 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFTCPSocket *socket; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket; -/** +/*! * 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 + * @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; -/** - * \return The socket which could not accept a connection +/*! + * @return The socket which could not accept a connection */ - (OFTCPSocket*)socket; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFTCPSocket; -/** - * \brief An exception indicating the translation of an address failed. +/*! + * @brief An exception indicating the translation of an address failed. */ @interface OFAddressTranslationFailedException: OFException { OFTCPSocket *socket; OFString *host; @@ -32,42 +32,42 @@ @property (readonly, retain, nonatomic) OFTCPSocket *socket; @property (readonly, copy, nonatomic) OFString *host; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host; -/** +/*! * 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 + * @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 */ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host; -/** - * \return 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 */ - (OFString*)host; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFObject.h" @class OFString; -/** - * \brief An exception indicating an object could not be allocated. +/*! + * @brief An exception indicating an object could not be allocated. * * This exception is preallocated, as if there's no memory, no exception can * be allocated of course. That's why you shouldn't and even can't deallocate * it. * @@ -29,10 +29,10 @@ * 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. */ @interface OFAllocFailedException: OFObject -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFTCPSocket; -/** - * \brief An exception indicating an attempt to connect or bind an already +/*! + * @brief An exception indicating an attempt to connect or bind an already * connected or bound socket. */ @interface OFAlreadyConnectedException: OFException { OFTCPSocket *socket; @@ -29,28 +29,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFTCPSocket *socket; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFTCPSocket; -/** - * \brief An exception indicating that binding a socket failed. +/*! + * @brief An exception indicating that binding a socket failed. */ @interface OFBindFailedException: OFException { OFTCPSocket *socket; OFString *host; @@ -34,51 +34,51 @@ @property (readonly, copy, nonatomic) OFString *host; @property (readonly) uint16_t port; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; -/** +/*! * 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 - * \return An initialized 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 An initialized bind failed exception */ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; -/** - * \return The socket which could not be bound +/*! + * @return The socket which could not be bound */ - (OFTCPSocket*)socket; -/** - * \return The host on which binding failed +/*! + * @return The host on which binding failed */ - (OFString*)host; -/** - * \return The port on which binding failed +/*! + * @return The port on which binding failed */ - (uint16_t)port; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating changing to a directory failed +/*! + * @brief An exception indicating changing to a directory failed */ @interface OFChangeDirectoryFailedException: OFException { OFString *path; int errNo; @@ -28,35 +28,35 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 change directory failed exception */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; -/** +/*! * 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 + * @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 + * @return An initialized change directory failed exception */ - initWithClass: (Class)class_ path: (OFString*)path; -/** - * \return 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 +/*! + * @return A string with the path of the directory to which couldn't changed */ - (OFString*)path; @end Index: src/exceptions/OFChangeFileModeFailedException.h ================================================================== --- src/exceptions/OFChangeFileModeFailedException.h +++ src/exceptions/OFChangeFileModeFailedException.h @@ -16,12 +16,12 @@ #include #import "OFException.h" -/** - * \brief An exception indicating that changing the mode of a file failed. +/*! + * @brief An exception indicating that changing the mode of a file failed. */ @interface OFChangeFileModeFailedException: OFException { OFString *path; mode_t mode; @@ -32,42 +32,42 @@ @property (readonly, copy, nonatomic) OFString *path; @property (readonly) mode_t mode; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path mode: (mode_t)mode; -/** +/*! * 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 + * @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 */ - initWithClass: (Class)class_ path: (OFString*)path mode: (mode_t)mode; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return The path of the file +/*! + * @return The path of the file */ - (OFString*)path; -/** - * \return 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 @@ -15,12 +15,12 @@ */ #import "OFException.h" #ifndef _WIN32 -/** - * \brief An exception indicating that changing the owner of a file failed. +/*! + * @brief An exception indicating that changing the owner of a file failed. */ @interface OFChangeFileOwnerFailedException: OFException { OFString *path; OFString *owner; @@ -33,52 +33,52 @@ @property (readonly, copy, nonatomic) OFString *owner; @property (readonly, copy, nonatomic) OFString *group; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path owner: (OFString*)owner group: (OFString*)group; -/** +/*! * 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 - * \return An initialized 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 */ - initWithClass: (Class)class_ path: (OFString*)path owner: (OFString*)owner group: (OFString*)group; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return The path of the file +/*! + * @return The path of the file */ - (OFString*)path; -/** - * \return The new owner for the file +/*! + * @return The new owner for the file */ - (OFString*)owner; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFCondition; -/** - * \brief An exception indicating broadcasting a condition failed. +/*! + * @brief An exception indicating broadcasting a condition failed. */ @interface OFConditionBroadcastFailedException: OFException { OFCondition *condition; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFCondition; -/** - * \brief An exception indicating signaling a condition failed. +/*! + * @brief An exception indicating signaling a condition failed. */ @interface OFConditionSignalFailedException: OFException { OFCondition *condition; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; -/** +/*! * 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 + * @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; -/** - * \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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFCondition; -/** - * \brief An exception indicating that a thread is still waiting for a +/*! + * @brief An exception indicating that a thread is still waiting for a * condition. */ @interface OFConditionStillWaitingException: OFException { OFCondition *condition; @@ -29,28 +29,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; -/** +/*! * 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 + * @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; -/** - * \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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFCondition; -/** - * \brief An exception indicating waiting for a condition failed. +/*! + * @brief An exception indicating waiting for a condition failed. */ @interface OFConditionWaitFailedException: OFException { OFCondition *condition; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFCondition *condition; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ condition: (OFCondition*)condition; -/** +/*! * 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 + * @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; -/** - * \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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFTCPSocket; -/** - * \brief An exception indicating that a connection could not be established. +/*! + * @brief An exception indicating that a connection could not be established. */ @interface OFConnectionFailedException: OFException { OFTCPSocket *socket; OFString *host; @@ -34,51 +34,51 @@ @property (readonly, copy, nonatomic) OFString *host; @property (readonly) uint16_t port; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; -/** +/*! * 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 - * \return An initialized 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 An initialized connection failed exception */ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket host: (OFString*)host port: (uint16_t)port; -/** - * \return The socket which could not connect +/*! + * @return The socket which could not connect */ - (OFTCPSocket*)socket; -/** - * \return The host to which the connection failed +/*! + * @return The host to which the connection failed */ - (OFString*)host; -/** - * \return The port on the host to which the connection failed +/*! + * @return The port on the host to which the connection failed */ - (uint16_t)port; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that copying a file failed. +/*! + * @brief An exception indicating that copying a file failed. */ @interface OFCopyFileFailedException: OFException { OFString *sourcePath; OFString *destinationPath; @@ -30,42 +30,42 @@ @property (readonly, copy, nonatomic) OFString *sourcePath; @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** +/*! * 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 + * @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 */ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return The path of the source file +/*! + * @return The path of the source file */ - (OFString*)sourcePath; -/** - * \return The destination path +/*! + * @return The destination path */ - (OFString*)destinationPath; @end Index: src/exceptions/OFCreateDirectoryFailedException.h ================================================================== --- src/exceptions/OFCreateDirectoryFailedException.h +++ src/exceptions/OFCreateDirectoryFailedException.h @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating a directory couldn't be created. +/*! + * @brief An exception indicating a directory couldn't be created. */ @interface OFCreateDirectoryFailedException: OFException { OFString *path; int errNo; @@ -28,33 +28,33 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; -/** +/*! * 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 + * @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; -/** - * \return 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 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that deleting a directory failed. +/*! + * @brief An exception indicating that deleting a directory failed. */ @interface OFDeleteDirectoryFailedException: OFException { OFString *path; int errNo; @@ -28,33 +28,33 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; -/** +/*! * 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 + * @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; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that deleting a file failed. +/*! + * @brief An exception indicating that deleting a file failed. */ @interface OFDeleteFileFailedException: OFException { OFString *path; int errNo; @@ -28,33 +28,33 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path; -/** +/*! * 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 + * @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; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that a mutation was detected during +/*! + * @brief An exception indicating that a mutation was detected during * enumeration. */ @interface OFEnumerationMutationException: OFException { id object; @@ -27,28 +27,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id object; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ object: (id)object; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFObject.h" @class OFString; -/** - * \brief The base class for all exceptions in ObjFW +/*! + * @brief The base class for all exceptions in ObjFW * * The OFException class is the base class for all exceptions in ObjFW, except * the OFAllocFailedException. */ @interface OFException: OFObject @@ -32,31 +32,31 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) Class inClass; #endif -/** +/*! * Creates a new exception. * - * \param class_ The class of the object which caused the exception - * \return A new exception + * @param class_ The class of the object which caused the exception + * @return A new exception */ + (instancetype)exceptionWithClass: (Class)class_; -/** +/*! * Initializes an already allocated OFException. * - * \param class_ The class of the object which caused the exception - * \return An initialized OFException + * @param class_ The class of the object which caused the exception + * @return An initialized OFException */ - initWithClass: (Class)class_; -/** - * \return The class of the object in which the exception happened +/*! + * @return The class of the object in which the exception happened */ - (Class)inClass; -/** - * \return 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 @@ -17,12 +17,12 @@ #import "OFException.h" @class OFHTTPRequest; @class OFHTTPRequestResult; -/** - * \brief An exception indicating that a HTTP request failed. +/*! + * @brief An exception indicating that a HTTP request failed. */ @interface OFHTTPRequestFailedException: OFException { OFHTTPRequest *request; OFHTTPRequestResult *result; @@ -31,37 +31,37 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFHTTPRequest *request; @property (readonly, retain, nonatomic) OFHTTPRequestResult *result; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ request: (OFHTTPRequest*)request result: (OFHTTPRequestResult*)result; -/** +/*! * 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 + * @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 */ - initWithClass: (Class)class_ request: (OFHTTPRequest*)request result: (OFHTTPRequestResult*)result; -/** - * \return The HTTP request which failed +/*! + * @return The HTTP request which failed */ - (OFHTTPRequest*)request; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFHash; -/** - * \brief An exception indicating that the hash has already been calculated. +/*! + * @brief An exception indicating that the hash has already been calculated. */ @interface OFHashAlreadyCalculatedException: OFException { OFHash *hashObject; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFHash *hashObject; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ hash: (OFHash*)hash; -/** +/*! * 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 + * @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; -/** - * \return The hash which has already been calculated +/*! + * @return The hash which has already been calculated */ - (OFHash*)hashObject; @end Index: src/exceptions/OFInitializationFailedException.h ================================================================== --- src/exceptions/OFInitializationFailedException.h +++ src/exceptions/OFInitializationFailedException.h @@ -14,10 +14,10 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that initializing something failed. +/*! + * @brief An exception indicating that initializing something failed. */ @interface OFInitializationFailedException: OFException @end Index: src/exceptions/OFInvalidArgumentException.h ================================================================== --- src/exceptions/OFInvalidArgumentException.h +++ src/exceptions/OFInvalidArgumentException.h @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that the argument is invalid for this method. +/*! + * @brief An exception indicating that the argument is invalid for this method. */ @interface OFInvalidArgumentException: OFException { SEL selector; } @@ -26,28 +26,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) SEL selector; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ selector: (SEL)selector; -/** +/*! * 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 + * @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; -/** - * \return 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/OFInvalidEncodingException.h ================================================================== --- src/exceptions/OFInvalidEncodingException.h +++ src/exceptions/OFInvalidEncodingException.h @@ -14,10 +14,10 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that the encoding is invalid for this object. +/*! + * @brief An exception indicating that the encoding is invalid for this object. */ @interface OFInvalidEncodingException: OFException @end Index: src/exceptions/OFInvalidFormatException.h ================================================================== --- src/exceptions/OFInvalidFormatException.h +++ src/exceptions/OFInvalidFormatException.h @@ -14,10 +14,10 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that the format is invalid. +/*! + * @brief An exception indicating that the format is invalid. */ @interface OFInvalidFormatException: OFException @end Index: src/exceptions/OFInvalidJSONException.h ================================================================== --- src/exceptions/OFInvalidJSONException.h +++ src/exceptions/OFInvalidJSONException.h @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating a JSON representation is invalid. +/*! + * @brief An exception indicating a JSON representation is invalid. */ @interface OFInvalidJSONException: OFException { size_t line; } @@ -26,28 +26,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t line; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ line: (size_t)line; -/** +/*! * 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 + * @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; -/** - * \return 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/OFInvalidServerReplyException.h ================================================================== --- src/exceptions/OFInvalidServerReplyException.h +++ src/exceptions/OFInvalidServerReplyException.h @@ -14,10 +14,10 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that the server sent an invalid reply. +/*! + * @brief An exception indicating that the server sent an invalid reply. */ @interface OFInvalidServerReplyException: OFException @end Index: src/exceptions/OFLinkFailedException.h ================================================================== --- src/exceptions/OFLinkFailedException.h +++ src/exceptions/OFLinkFailedException.h @@ -15,12 +15,12 @@ */ #import "OFException.h" #ifndef _WIN32 -/** - * \brief An exception indicating that creating a link failed. +/*! + * @brief An exception indicating that creating a link failed. */ @interface OFLinkFailedException: OFException { OFString *sourcePath; OFString *destinationPath; @@ -31,43 +31,43 @@ @property (readonly, copy, nonatomic) OFString *sourcePath; @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; # endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** +/*! * 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 + * @param class_ The class of the object which caused the exception + * @param source The source for the link + * @param destination The destination for the link + * @return An initialized link failed exception */ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return A string with the source for the link +/*! + * @return A string with the source for the link */ - (OFString*)sourcePath; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFTCPSocket; -/** - * \brief An exception indicating that listening on the socket failed. +/*! + * @brief An exception indicating that listening on the socket failed. */ @interface OFListenFailedException: OFException { OFTCPSocket *socket; int backLog; @@ -32,42 +32,42 @@ @property (readonly, retain, nonatomic) OFTCPSocket *socket; @property (readonly) int backLog; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFTCPSocket*)socket backLog: (int)backlog; -/** +/*! * 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 + * @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 */ - initWithClass: (Class)class_ socket: (OFTCPSocket*)socket backLog: (int)backlog; -/** - * \return The socket which failed to listen +/*! + * @return The socket which failed to listen */ - (OFTCPSocket*)socket; -/** - * \return The requested back log. +/*! + * @return The requested back log. */ - (int)backLog; -/** - * \return 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 @@ -15,12 +15,12 @@ */ #import "OFException.h" #import "OFLocking.h" -/** - * \brief An exception indicating that locking a lock failed. +/*! + * @brief An exception indicating that locking a lock failed. */ @interface OFLockFailedException: OFException { id lock; } @@ -27,28 +27,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id lock; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ lock: (id )lock; -/** +/*! * 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 + * @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 +/*! + * @param The lock which could not be locked */ - (id )lock; @end Index: src/exceptions/OFMalformedXMLException.h ================================================================== --- src/exceptions/OFMalformedXMLException.h +++ src/exceptions/OFMalformedXMLException.h @@ -16,12 +16,12 @@ #import "OFException.h" @class OFXMLParser; -/** - * \brief An exception indicating that a parser encountered malformed XML. +/*! + * @brief An exception indicating that a parser encountered malformed XML. */ @interface OFMalformedXMLException: OFException { OFXMLParser *parser; } @@ -28,26 +28,26 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFXMLParser *parser; #endif -/** - * \param parser The parser which encountered malformed XML - * \return A new malformed XML exception +/*! + * @param parser The parser which encountered malformed XML + * @return A new malformed XML exception */ + (instancetype)exceptionWithClass: (Class)class_ parser: (OFXMLParser*)parser; -/** +/*! * Initializes an already allocated malformed XML exception. * - * \param parser The parser which encountered malformed XML - * \return An initialized malformed XML exception + * @param parser The parser which encountered malformed XML + * @return An initialized malformed XML exception */ - initWithClass: (Class)class_ parser: (OFXMLParser*)parser; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating the given memory is not part of the object. +/*! + * @brief An exception indicating the given memory is not part of the object. */ @interface OFMemoryNotPartOfObjectException: OFException { void *pointer; } @@ -26,28 +26,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) void *pointer; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ pointer: (void*)ptr; -/** +/*! * Initializes an already allocated memory not part of object exception. * - * \param class_ The class of the object which caused the exception - * \param ptr A pointer to the memory that is not part of the object - * \return An initialized 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; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFStreamSocket; -/** - * \brief An exception indicating a socket is not connected or bound. +/*! + * @brief An exception indicating a socket is not connected or bound. */ @interface OFNotConnectedException: OFException { OFStreamSocket *socket; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFStreamSocket *socket; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ socket: (OFStreamSocket*)socket; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that a method or part of it is not +/*! + * @brief An exception indicating that a method or part of it is not * implemented. */ @interface OFNotImplementedException: OFException { SEL selector; @@ -27,28 +27,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) SEL selector; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ selector: (SEL)selector; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating a file couldn't be opened. +/*! + * @brief An exception indicating a file couldn't be opened. */ @interface OFOpenFileFailedException: OFException { OFString *path; OFString *mode; @@ -30,42 +30,42 @@ @property (readonly, copy, nonatomic) OFString *path; @property (readonly, copy, nonatomic) OFString *mode; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ path: (OFString*)path mode: (OFString*)mode; -/** +/*! * Initializes an already allocated open file failed exception. * - * \param class_ The class of the object which caused the exception - * \param 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 + * @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 */ - initWithClass: (Class)class_ path: (OFString*)path mode: (OFString*)mode; -/** - * \return 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 file which couldn't be opened +/*! + * @return A string with the path of the file which couldn't be opened */ - (OFString*)path; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating there is not enough memory available. +/*! + * @brief An exception indicating there is not enough memory available. */ @interface OFOutOfMemoryException: OFException { size_t requestedSize; } @@ -26,28 +26,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t requestedSize; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ requestedSize: (size_t)size; -/** +/*! * 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 + * @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; -/** - * \return 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/OFOutOfRangeException.h ================================================================== --- src/exceptions/OFOutOfRangeException.h +++ src/exceptions/OFOutOfRangeException.h @@ -14,10 +14,10 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating the given value is out of range. +/*! + * @brief An exception indicating the given value is out of range. */ @interface OFOutOfRangeException: OFException @end Index: src/exceptions/OFReadFailedException.h ================================================================== --- src/exceptions/OFReadFailedException.h +++ src/exceptions/OFReadFailedException.h @@ -14,10 +14,10 @@ * file. */ #import "OFReadOrWriteFailedException.h" -/** - * \brief An exception indicating a read on a stream failed. +/*! + * @brief An exception indicating a read on a stream failed. */ @interface OFReadFailedException: OFReadOrWriteFailedException @end Index: src/exceptions/OFReadOrWriteFailedException.h ================================================================== --- src/exceptions/OFReadOrWriteFailedException.h +++ src/exceptions/OFReadOrWriteFailedException.h @@ -16,12 +16,12 @@ #import "OFException.h" @class OFStream; -/** - * \brief An exception indicating a read or write to a stream failed. +/*! + * @brief An exception indicating a read or write to a stream failed. */ @interface OFReadOrWriteFailedException: OFException { OFStream *stream; size_t requestedLength; @@ -33,44 +33,44 @@ @property (readonly, retain, nonatomic) OFStream *stream; @property (readonly) size_t requestedLength; @property (readonly) int errNo; #endif -/** - * \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 / +/*! + * @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 open file failed exception */ + (instancetype)exceptionWithClass: (Class)class_ stream: (OFStream*)stream requestedLength: (size_t)length; -/** +/*! * 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 / + * @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 open file failed exception */ - initWithClass: (Class)class_ stream: (OFStream*)stream requestedLength: (size_t)length; -/** - * \return The stream which caused the read or write failed exception +/*! + * @return The stream which caused the read or write failed exception */ - (OFStream*)stream; -/** - * \return 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; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that renaming a file failed. +/*! + * @brief An exception indicating that renaming a file failed. */ @interface OFRenameFileFailedException: OFException { OFString *sourcePath; OFString *destinationPath; @@ -30,42 +30,42 @@ @property (readonly, copy, nonatomic) OFString *sourcePath; @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** +/*! * 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 + * @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 */ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return The original path +/*! + * @return The original path */ - (OFString*)sourcePath; -/** - * \return The new path +/*! + * @return The new path */ - (OFString*)destinationPath; @end Index: src/exceptions/OFSeekFailedException.h ================================================================== --- src/exceptions/OFSeekFailedException.h +++ src/exceptions/OFSeekFailedException.h @@ -18,12 +18,12 @@ #import "OFException.h" @class OFSeekableStream; -/** - * \brief An exception indicating that seeking in a stream failed. +/*! + * @brief An exception indicating that seeking in a stream failed. */ @interface OFSeekFailedException: OFException { OFSeekableStream *stream; off_t offset; @@ -36,49 +36,49 @@ @property (readonly) off_t offset; @property (readonly) int whence; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ stream: (OFSeekableStream*)stream offset: (off_t)offset whence: (int)whence; -/** +/*! * Initializes an already allocated seek failed 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 + * @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 */ - initWithClass: (Class)class_ stream: (OFSeekableStream*)stream offset: (off_t)offset whence: (int)whence; -/** - * \return The stream for which seeking failed +/*! + * @return The stream for which seeking failed */ - (OFSeekableStream*)stream; -/** - * \return The offset to which seeking failed +/*! + * @return The offset to which seeking failed */ - (off_t)offset; -/** - * \return To what the offset is relative +/*! + * @return To what the offset is relative */ - (int)whence; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFStream; -/** - * \brief An exception indicating that setting an option for a stream failed. +/*! + * @brief An exception indicating that setting an option for a stream failed. */ @interface OFSetOptionFailedException: OFException { OFStream *stream; } @@ -28,26 +28,26 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFStream *stream; #endif -/** - * \param stream The stream for which the option could not be set - * \return A new set option failed exception +/*! + * @param stream The stream for which the option could not be set + * @return A new set option failed exception */ + (instancetype)exceptionWithClass: (Class)class_ stream: (OFStream*)stream; -/** +/*! * Initializes an already allocated set option failed exception. * - * \param stream The stream for which the option could not be set - * \return An initialized set option failed 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; -/** - * \return 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 @@ -15,12 +15,12 @@ */ #import "OFException.h" #import "OFLocking.h" -/** - * \brief An exception indicating that a lock is still locked. +/*! + * @brief An exception indicating that a lock is still locked. */ @interface OFStillLockedException: OFException { id lock; } @@ -27,28 +27,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id lock; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ lock: (id )lock; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -15,12 +15,12 @@ */ #import "OFException.h" #ifndef _WIN32 -/** - * \brief An exception indicating that creating a symlink failed. +/*! + * @brief An exception indicating that creating a symlink failed. */ @interface OFSymlinkFailedException: OFException { OFString *sourcePath; OFString *destinationPath; @@ -31,43 +31,43 @@ @property (readonly, copy, nonatomic) OFString *sourcePath; @property (readonly, copy, nonatomic) OFString *destinationPath; @property (readonly) int errNo; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** +/*! * 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 + * @param class_ The class of the object which caused the exception + * @param source The source for the symlink + * @param destination The destination for the symlink + * @return An initialized symlink failed exception */ - initWithClass: (Class)class_ sourcePath: (OFString*)source destinationPath: (OFString*)destination; -/** - * \return The errno from when the exception was created +/*! + * @return The errno from when the exception was created */ - (int)errNo; -/** - * \return A string with the source for the symlink +/*! + * @return A string with the source for the symlink */ - (OFString*)sourcePath; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFThread; -/** - * \brief An exception indicating that joining a thread failed. +/*! + * @brief An exception indicating that joining a thread failed. */ @interface OFThreadJoinFailedException: OFException { OFThread *thread; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFThread *thread; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ thread: (OFThread*)thread; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFThread; -/** - * \brief An exception indicating that starting a thread failed. +/*! + * @brief An exception indicating that starting a thread failed. */ @interface OFThreadStartFailedException: OFException { OFThread *thread; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFThread *thread; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ thread: (OFThread*)thread; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFThread; -/** - * \brief An exception indicating that a thread is still running. +/*! + * @brief An exception indicating that a thread is still running. */ @interface OFThreadStillRunningException: OFException { OFThread *thread; } @@ -28,28 +28,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFThread *thread; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ thread: (OFThread*)thread; -/** +/*! * 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 + * @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; -/** - * \return The thread which is still running +/*! + * @return The thread which is still running */ - (OFThread*)thread; @end Index: src/exceptions/OFTruncatedDataException.h ================================================================== --- src/exceptions/OFTruncatedDataException.h +++ src/exceptions/OFTruncatedDataException.h @@ -14,11 +14,11 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that data was truncated while it should not +/*! + * @brief An exception indicating that data was truncated while it should not * have been truncated. */ @interface OFTruncatedDataException: OFException @end Index: src/exceptions/OFUnboundNamespaceException.h ================================================================== --- src/exceptions/OFUnboundNamespaceException.h +++ src/exceptions/OFUnboundNamespaceException.h @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating an attempt to use an unbound namespace. +/*! + * @brief An exception indicating an attempt to use an unbound namespace. */ @interface OFUnboundNamespaceException: OFException { OFString *ns; OFString *prefix; @@ -28,51 +28,51 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic, getter=namespace) OFString *ns; @property (readonly, copy, nonatomic) OFString *prefix; #endif -/** - * \param class_ The class of the object which caused the exception - * \param ns The namespace which is unbound - * \return A new unbound namespace exception - */ -+ (instancetype)exceptionWithClass: (Class)class_ - namespace: (OFString*)ns; - -/** - * \param class_ The class of the object which caused the exception - * \param prefix The prefix which is unbound - * \return A new unbound namespace exception - */ -+ (instancetype)exceptionWithClass: (Class)class_ - prefix: (OFString*)prefix; - -/** - * 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 - * - * \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; - -/** - * \return The unbound namespace - */ -- (OFString*)namespace; - -/** - * \return The unbound prefix +/*! + * @param class_ The class of the object which caused the exception + * @param ns The namespace which is unbound + * @return A new unbound namespace exception + */ ++ (instancetype)exceptionWithClass: (Class)class_ + namespace: (OFString*)ns; + +/*! + * @param class_ The class of the object which caused the exception + * @param prefix The prefix which is unbound + * @return A new unbound namespace exception + */ ++ (instancetype)exceptionWithClass: (Class)class_ + prefix: (OFString*)prefix; + +/*! + * 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 + * + * @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; + +/*! + * @return The unbound namespace + */ +- (OFString*)namespace; + +/*! + * @return The unbound prefix */ - (OFString*)prefix; @end Index: src/exceptions/OFUnlockFailedException.h ================================================================== --- src/exceptions/OFUnlockFailedException.h +++ src/exceptions/OFUnlockFailedException.h @@ -15,12 +15,12 @@ */ #import "OFException.h" #import "OFLocking.h" -/** - * \brief An exception indicating that unlocking a lock failed. +/*! + * @brief An exception indicating that unlocking a lock failed. */ @interface OFUnlockFailedException: OFException { id lock; } @@ -27,28 +27,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) id lock; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ lock: (id )lock; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -16,12 +16,12 @@ #import "OFException.h" @class OFURL; -/** - * \brief An exception indicating that the protocol specified by the URL is not +/*! + * @brief An exception indicating that the protocol specified by the URL is not * supported. */ @interface OFUnsupportedProtocolException: OFException { OFURL *URL; @@ -29,28 +29,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain, nonatomic) OFURL *URL; #endif -/** - * \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 +/*! + * @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 */ + (instancetype)exceptionWithClass: (Class)class_ URL: (OFURL*)url; -/** +/*! * 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 + * @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; -/** - * \return 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 @@ -14,12 +14,12 @@ * file. */ #import "OFException.h" -/** - * \brief An exception indicating that the specified version of the format or +/*! + * @brief An exception indicating that the specified version of the format or * protocol is not supported. */ @interface OFUnsupportedVersionException: OFException { OFString *version; @@ -27,28 +27,28 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *version; #endif -/** - * \param class_ The class of the object which caused the exception - * \param version The version which is unsupported - * \return A new 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 */ + (instancetype)exceptionWithClass: (Class)class_ version: (OFString*)version; -/** +/*! * 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 + * @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; -/** - * \return The version which is unsupported +/*! + * @return The version which is unsupported */ - (OFString*)version; @end Index: src/exceptions/OFWriteFailedException.h ================================================================== --- src/exceptions/OFWriteFailedException.h +++ src/exceptions/OFWriteFailedException.h @@ -14,10 +14,10 @@ * file. */ #import "OFReadOrWriteFailedException.h" -/** - * \brief An exception indicating a write to a stream failed. +/*! + * @brief An exception indicating a write to a stream failed. */ @interface OFWriteFailedException: OFReadOrWriteFailedException @end