@@ -45,16 +45,17 @@ * 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:, - * 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! + * \note If you want to subclass this, override + * \ref lowlevelReadIntoBuffer:length:, \ref lowlevelWriteBuffer:length: + * and \ref 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! */ @interface OFStream: OFObject { char *cache; char *writeBuffer; @@ -79,13 +80,13 @@ /** * \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 - + * \ref 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. + * check \ref isAtEndOfStream. * * \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 @@ -95,13 +96,13 @@ /** * \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. + * Unlike \ref 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 * available! Otherwise you will get an exception! * * \param buffer The buffer into which the data is read @@ -115,13 +116,13 @@ * \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. + * \ref 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 \ref isAtEndOfStream. * * \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. * The buffer must be at least this big! @@ -142,11 +143,11 @@ /** * \brief Asyncronously reads exactly the specified length bytes from the * stream into a buffer. * - * Unlike asyncReadIntoBuffer:length:block, this method does not call the + * Unlike \ref 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 @@ -172,13 +173,13 @@ * \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. + * \ref 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 \ref isAtEndOfStream. * * \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. * The buffer must be at least this big! @@ -194,11 +195,11 @@ /** * \brief Asyncronously reads exactly the specified length bytes from the * stream into a buffer. * - * Unlike asyncReadIntoBuffer:length:block, this method does not invoke the + * Unlike \ref 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 @@ -630,12 +631,12 @@ */ - (OFString*)tryReadLine; /** * \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. + * \ref 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 * complete yet */ @@ -663,23 +664,23 @@ - (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 - * of stream (see readTillDelimiter:) and returns nil if not enough data - * has been received yet. + * of stream (see \ref 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 * stream has been reached. */ - (OFString*)tryReadTillDelimiter: (OFString*)delimiter; /** * \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. + * of stream occurs (see \ref 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 * stream has been reached.