[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/strigi/src/streams
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2007-03-31 22:17:37
Message-ID: 1175379457.341827.25464.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 648650 by alexmerry:

Minor APIdox corrections.



 M  +3 -2      Mainpage.dox  
 M  +4 -1      bufferedstream.h  
 M  +3 -2      fileinputstream.h  
 M  +1 -2      inputstreamreader.h  
 M  +16 -15    streambase.h  
 M  +0 -1      stringstream.h  
 M  +1 -1      substreamprovider.h  


--- trunk/kdesupport/strigi/src/streams/Mainpage.dox #648649:648650
@@ -33,8 +33,9 @@
 FileInputStream will open an InputStream to read the
 contents of a file.
 
-StringReader (and StringInputStream) allows you to
-access in-memory data as a stream.
+StringStream allows you to access in-memory data as a stream.
+StringInputStream and StringReader are types of StringStream
+for byte (char) arrays and Unicode (wchar_t) strings.
 
 @subsection Substreams
 
--- trunk/kdesupport/strigi/src/streams/bufferedstream.h #648649:648650
@@ -28,6 +28,10 @@
 
 /**
  * @brief Abstract class providing a buffered input stream.
+ *
+ * You can inherit this class to provide buffered access to a
+ * resource.  You just need to implement fillBuffer, and
+ * BufferedStream will do the rest.
  */
 template <class T>
 class BufferedStream : public StreamBase<T> {
@@ -70,7 +74,6 @@
     void setMinBufSize(int32_t s) {
         buffer.makeSpace(s);
     }
-    /** Default constructor just initialises members */
     BufferedStream<T>();
 public:
     int32_t read(const T*& start, int32_t min, int32_t max);
--- trunk/kdesupport/strigi/src/streams/fileinputstream.h #648649:648650
@@ -25,7 +25,9 @@
 
 namespace Strigi {
 
-/** Provides buffered access to a file */
+/**
+ * @brief Provides buffered access to a file
+ */
 class STREAMS_EXPORT FileInputStream : public BufferedInputStream {
 private:
     FILE *file;
@@ -43,7 +45,6 @@
      */
     explicit FileInputStream(const char *filepath,
         int32_t buffersize=defaultBufferSize);
-    /** Destructor */
     ~FileInputStream();
 };
 
--- trunk/kdesupport/strigi/src/streams/inputstreamreader.h #648649:648650
@@ -55,14 +55,13 @@
      * Not all encodings are supported on all systems.
      *
      * If the requested encoding is not available, the status is set to
-     * Error and an error message is set.
+     * Error and an error message is available by calling error().
      *
      * @param i the input stream to decode
      * @param enc the encoding of the input stream.  UTF-8 is assumed if
      * no encoding is given
      */
     explicit InputStreamReader(InputStream *i, const char *enc=0);
-    /** Destructor */
     ~InputStreamReader();
 };
 
--- trunk/kdesupport/strigi/src/streams/streambase.h #648649:648650
@@ -43,8 +43,8 @@
  * This class contains all the non-virtual StreamBase methods
  * that don't depend on a specific Stream type
  *
- * developer comment: This is needed because win32 compilation.
- * When we want to access a function outside a lib, we have to export them
+ * Developer comment: This is needed because of win32 compilation.
+ * When we want to access a function outside a lib, we have to export them,
  * but we can't export the template class because this would be somewhat
  * stupid / does not work by design :)
  * Because of this I've introduced this StreamBaseBase class
@@ -64,9 +64,12 @@
     StreamStatus m_status;
 public:
     /**
-     * @brief  Default constructor just initialises everything to sane defaults
-     */
+     * @brief  Constructor: initialises everything to sane defaults
+     **/
     StreamBaseBase() :m_size(-1), m_position(0), m_status(Ok) {}
+    /**
+     * @brief Destructor
+     **/
     virtual ~StreamBaseBase() {}
     /**
      * @brief  Return a string representation of the last error.
@@ -85,34 +88,32 @@
     /**
      * @brief Return the size of the stream.
      *
-     * The size of the stream is always know if the end of the stream
+     * The size of the stream is always known if the end of the stream
      * has been reached.  In all other cases, this may return -1 to
      * indicate the size of the stream is unknown.
      *
-     * @return the size of the stream, if it is known. -1 is returned
-     * otherwise
+     * @return the size of the stream, if it is known, or -1 if the size
+     * of the stream is unknown
      **/
     int64_t size() const { return m_size; }
 };
 
 /**
- * @brief Base class for stream read access to many different file types.
+ * @brief Base class for stream read access to a data source.
  *
- * This class is based on the interface java.io.InputStream. It allows
- * for uniform access to streamed resources.
+ * This class is based on the interface java.io.InputStream. It provides
+ * a uniform interface for accessing streamed resources.
  *
- * The main difference with the java equivalent is a performance improvement.
+ * The main difference with the Java equivalent is a performance improvement.
  * When reading data, data is not copied into a buffer provided by the caller,
  * but a pointer to the read data is provided. This makes this interface
- * especially useful for deriving from it and implementing filterers or
+ * especially useful for deriving from it and implementing filters or
  * transformers.
  */
 template <class T>
 class StreamBase : public StreamBaseBase {
 public:
-    /** @brief Default constructor does nothing */
     StreamBase() { }
-    /** @brief Default destructor does nothing */
     virtual ~StreamBase(){}
     /**
      * @brief Reads items from the stream and sets @p start to point to
@@ -130,7 +131,7 @@
      * @p max items be read.
      *
      * If the end of the stream is reached before @p min items are read, the
-     * read is still considered successful, and the number of items read will
+     * read is still considered successful and the number of items read will
      * be returned.
      *
      * @param start pointer passed by reference that will be set to point to
--- trunk/kdesupport/strigi/src/streams/stringstream.h #648649:648650
@@ -63,7 +63,6 @@
      * a pointer to the original data will be used
      */
     StringStream(const T* value, int32_t length = -1, bool copy = true);
-    /** Destructor */
     ~StringStream();
     int32_t read(const T*& start, int32_t min, int32_t max);
     int64_t skip(int64_t ntoskip);
--- trunk/kdesupport/strigi/src/streams/substreamprovider.h #648649:648650
@@ -55,7 +55,7 @@
 /**
  * @brief Extracts substreams from an InputStream
  *
- * This class extract substreams, such as files and directories,
+ * This class extracts substreams, such as files and directories,
  * from an InputStream.  For example, it may extract files
  * and directories from a tar achive, or a uncompressed data from
  * a gzipped data stream.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic