Added documentation for OCRepresentation::getValue
authorWilliam Dieter <william.r.dieter@intel.com>
Tue, 17 Feb 2015 05:34:52 +0000 (00:34 -0500)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Thu, 19 Feb 2015 03:27:38 +0000 (03:27 +0000)
Change-Id: I832fa198bfc3e3fe633531c3bf67d0c1421b47da
Signed-off-by: William Dieter <william.r.dieter@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/353
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/include/OCRepresentation.h

index 98c0914..47c9c47 100644 (file)
@@ -151,6 +151,14 @@ namespace OC
                 m_values[str] = val;
             }
 
+            /**
+             *  Retrieve the attribute value associated with the supplied name
+             *
+             *  @param str Name of the attribute
+             *  @param val Value of the attribute
+             *  @return The getValue method returns true if the attribute was
+             *        found in the representation.  Otherwise it returns false.
+             */
             template <typename T>
             bool getValue(const std::string& str, T& val) const
             {
@@ -168,6 +176,14 @@ namespace OC
                 }
             }
 
+            /**
+             *  Return the attribute value associated with the supplied name
+             *
+             *  @param str Name of the attribute
+             *  @return When the representation contains the attribute, the
+             *       the associated value is returned.  Otherwise, getValue
+             *       returns the default contructed value for the type.
+             */
             template <typename T>
             T getValue(const std::string& str) const
             {