Index: /trunk/FACT++/src/Description.cc
===================================================================
--- /trunk/FACT++/src/Description.cc	(revision 10380)
+++ /trunk/FACT++/src/Description.cc	(revision 10381)
@@ -43,5 +43,25 @@
 #include <sstream>
 
+#include "tools.h"
+
 using namespace std;
+
+// --------------------------------------------------------------------------
+//
+//! Construct a Description object
+//!
+//! @param n
+//!     Name of the Description, e.g. "temp"
+//!
+//! @param c
+//!     Descriptive text of the Description, e.g. "Temperature of the moon"
+//!
+//! @param u
+//!     Unit of the Description, e.g. "K"
+//
+Description::Description(const string &n, const string &c, const string &u)
+    : name(Trim(n)), comment(Trim(c)), unit(Trim(u))
+{
+}
 
 // --------------------------------------------------------------------------
@@ -72,5 +92,5 @@
 
     vector<Description> vec;
-    vec.push_back(Description(svc, "", d));
+    vec.push_back(Description(svc, d));
 
     if (p==string::npos)
@@ -98,7 +118,65 @@
         const string name = hasunit ? buf.substr(0, p2) : buf;
 
-        vec.push_back(Description(name, unit, comment));
+        vec.push_back(Description(name, comment, unit));
     }
 
     return vec;
 }
+
+
+// --------------------------------------------------------------------------
+//
+//! Returns a string with an html formatted text containing the descriptions
+//! as returned by SplitDescription
+//!
+//! @param vec
+//!     vector of Description for the individual arguments. First
+//!     element is the global description of the command or service.
+//!
+//! @returns
+//!     string with html formatted text
+//
+string Description::GetHtmlDescription(const vector<Description> &vec)
+{
+    stringstream str;
+    str << '|';
+
+    str << "<H3>" << vec[0].name << "</H3>";
+
+    str << "Usage:";
+    for (vector<Description>::const_iterator i=vec.begin()+1; i!=vec.end(); i++)
+        str << "&nbsp;<font color='maroon'>&lt;" << i->name <<    "&gt;</font>";
+
+    if (vec.size()==1)
+        str << " &lt;no arguments&gt;";
+
+    str << "<P>" << vec[0].comment << "<P>";
+
+    str << "<table>";
+
+    for (vector<Description>::const_iterator i=vec.begin()+1; i!=vec.end(); i++)
+    {
+        str << "<tr>"
+            "<td><font color='maroon'>" << i->name <<     "</font>";
+
+        if (i->unit.empty() && !i->comment.empty() && !i->name.empty())
+            str << ':';
+
+        str << "</td>";
+
+        if (!i->unit.empty())
+            str << "<td><font color='green'>[" << i->unit <<    "]</font>";
+
+        if (!i->unit.empty() && !i->comment.empty())
+            str << ':';
+
+        str <<
+            "</td>"
+            "<td><font color='navy'>"   << i->comment <<  "</font></td>"
+            "</tr>";
+    }
+
+    str << "</table>";
+
+    return str.str();
+}
Index: /trunk/FACT++/src/Description.h
===================================================================
--- /trunk/FACT++/src/Description.h	(revision 10380)
+++ /trunk/FACT++/src/Description.h	(revision 10381)
@@ -5,16 +5,14 @@
 #include <vector>
 
-#include "tools.h"
-
 struct Description
 {
     std::string name;
+    std::string comment;
     std::string unit;
-    std::string comment;
 
     static std::vector<Description> SplitDescription(const std::string &buffer);
+    static std::string GetHtmlDescription(const std::vector<Description> &vec);
 
-    Description(const std::string &n, const std::string &u, const std::string &c)
-        : name(Trim(n)), unit(Trim(u)), comment(Trim(c)) { }
+    Description(const std::string &n, const std::string &c, const std::string &u="");
 };
 
