[freenos] [freenos commit] r164 - Added decent comments to StringTokenizer.h and URI.h

  • From: codesite-noreply@xxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Sun, 28 Jun 2009 19:42:20 +0000

Author: coenbijlsma
Date: Sun Jun 28 12:18:18 2009
New Revision: 164

Modified:
   trunk/lib/libparse/StringTokenizer.h
   trunk/lib/libparse/URI.h

Log:
Added decent comments to StringTokenizer.h and URI.h


Modified: trunk/lib/libparse/StringTokenizer.h
==============================================================================
--- trunk/lib/libparse/StringTokenizer.h        (original)
+++ trunk/lib/libparse/StringTokenizer.h        Sun Jun 28 12:18:18 2009
@@ -35,12 +35,16 @@
        /**
         * Constructor.
         * Initializes the tokenizer
+        * @param seq The String to be tokenized.
+        * @param delim The character to use as a delimiter.
         */
        StringTokenizer(String& seq, char delim);
        
        /**
         * Constructor.
         * Initializes the tokenizer
+        * @param seq The string to be tokenized.
+        * @param delim The character to use as a delimiter.
         */
        StringTokenizer(char* seq, char delim);
        
@@ -52,17 +56,22 @@
        /**
         * Returns whether there are any tokens left
         * after the current position.
+        * @return bool Whether there are more tokens left.
         */
        bool hasNext();
        
        /**
         * Returns the amount of tokens there are
-        * in the String
+        * in the String.
+        * @return int The amount of tokens found in the given string.
         */
        unsigned int count();
        
        /**
-        * Returns the next token
+        * Returns the next token. If there are no more tokens
+        * (when StringTokenizer::hasNext() returns false),
+        * (char*)NULL is returned.
+        * @return char* The next token in the string.
         */
        char* next();


Modified: trunk/lib/libparse/URI.h
==============================================================================
--- trunk/lib/libparse/URI.h    (original)
+++ trunk/lib/libparse/URI.h    Sun Jun 28 12:18:18 2009
@@ -61,35 +61,53 @@
         virtual ~URI();

         /**
-         * Returns the scheme of this URI
+         * Returns the scheme of this URI as a lowercase string.
+         * The scheme part of an URI is mandatory and the URI class
+         * guarantees that this value never is NULL.
+         * @return char* The scheme if this URI
          */
         char* getScheme() const;

         /**
-         *
+         * Returns the hierarchical part of this URI.
+         * The hierarchical part is the chunk of URI between
+         * the scheme and the optional query and/or fragment.
+         * The hierarchical part of an URI is mandatory and the URI class
+         * guarantees that this value never is NULL.
+         * @return char* The hierarchical part of this URI.
          */
         char* getHierarchical() const;

         /**
-         *
+         * Returns the query part of this URI.
+         * The query part of an URI starts with a question mark (?).
+ * The query is optional so the returned value may or may not be NULL.
+         * @return char* The query part of this URI.
          */
         char* getQuery() const;

         /**
-         *
+         * Returns the fragment part of this URI.
+         * The fragment part of an URI starts with a number sign (#).
+ * The fragment is optional so the returned value may or may not be NULL.
+         * @return char* The fragment part of this URI.
          */
         char* getFragment() const;

         /**
-         * Returns the raw URI string as given in the
-         * constructor.
+         * Returns the raw URI string as given in the constructor.
+         * @return char* The raw URI string as given in the constructor.
          */
         char* getRawURI() const;

         /**
          * Returns whether the given URI is equal
          * to this URI.
+         * Before comparison is carried out, both this URI and the
+         * given URI are normalized. The normalized values are compared
+         * and the result of that comparison is returned.
          * @param uri The URI to compare to this URI.
+         * @return Whether the given URI equals this URI.
          */
         bool equals(URI& uri);


Other related posts:

  • » [freenos] [freenos commit] r164 - Added decent comments to StringTokenizer.h and URI.h - codesite-noreply