Index: trunk/FACT++/src/Configuration.cc
===================================================================
--- trunk/FACT++/src/Configuration.cc	(revision 11386)
+++ trunk/FACT++/src/Configuration.cc	(revision 11387)
@@ -335,4 +335,5 @@
 #include <boost/filesystem.hpp>
 #include <boost/program_options.hpp>
+#include <boost/lexical_cast.hpp>
 
 #define HAS_SQL
@@ -602,14 +603,99 @@
 }
 
-// --------------------------------------------------------------------------
-//
-//!
-//
-void Configuration::PrintOptions()
+template<class T>
+string Configuration::VecAsStr(const po::variable_value &v) const
+{
+    ostringstream str;
+
+    const vector<T> vec = v.as<vector<T>>();
+    for (typename std::vector<T>::const_iterator s=vec.begin(); s<vec.end(); s++)
+        str << " " << *s;
+
+    return str.str().substr(1);
+}
+
+string Configuration::VarAsStr(const po::variable_value &v) const
+{
+    if (v.value().type()==typeid(bool))
+        return v.as<bool>() ? "yes ": "no";
+
+    if (v.value().type()==typeid(string))
+        return v.as<string>();
+
+    if (v.value().type()==typeid(int16_t))
+        return boost::lexical_cast<string>(v.as<int16_t>());
+
+    if (v.value().type()==typeid(int32_t))
+        return boost::lexical_cast<string>(v.as<int32_t>());
+
+    if (v.value().type()==typeid(int64_t))
+        return boost::lexical_cast<string>(v.as<int64_t>());
+
+    if (v.value().type()==typeid(uint16_t))
+        return boost::lexical_cast<string>(v.as<uint16_t>());
+
+    if (v.value().type()==typeid(uint32_t))
+        return boost::lexical_cast<string>(v.as<uint32_t>());
+
+    if (v.value().type()==typeid(uint64_t))
+        return boost::lexical_cast<string>(v.as<uint64_t>());
+
+    if (v.value().type()==typeid(float))
+        return boost::lexical_cast<string>(v.as<float>());
+
+    if (v.value().type()==typeid(double))
+        return boost::lexical_cast<string>(v.as<double>());
+
+    if (v.value().type()==typeid(vector<string>))
+        return VecAsStr<string>(v);
+
+    if (v.value().type()==typeid(vector<int16_t>))
+        return VecAsStr<int16_t>(v);
+
+    if (v.value().type()==typeid(vector<int32_t>))
+        return VecAsStr<int32_t>(v);
+
+    if (v.value().type()==typeid(vector<int64_t>))
+        return VecAsStr<int64_t>(v);
+
+    if (v.value().type()==typeid(vector<uint16_t>))
+        return VecAsStr<uint16_t>(v);
+
+    if (v.value().type()==typeid(vector<uint32_t>))
+        return VecAsStr<uint32_t>(v);
+
+    if (v.value().type()==typeid(vector<uint64_t>))
+        return VecAsStr<uint64_t>(v);
+
+    if (v.value().type()==typeid(vector<float>))
+        return VecAsStr<float>(v);
+
+    if (v.value().type()==typeid(vector<double>))
+        return VecAsStr<double>(v);
+
+    ostringstream str;
+    str << hex << setfill('0') << "0x";
+    if (v.value().type()==typeid(Hex<uint16_t>))
+        str << setw(4) << v.as<Hex<uint16_t>>();
+
+    if (v.value().type()==typeid(Hex<uint32_t>))
+        str << setw(8) << v.as<Hex<uint32_t>>();
+
+    if (v.value().type()==typeid(Hex<uint64_t>))
+        str << setw(16) << v.as<Hex<uint64_t>>();
+
+    return str.str();
+}
+
+// --------------------------------------------------------------------------
+//
+//!
+//
+void Configuration::PrintOptions() const
 {
     cout << "Options propagated to program:" << endl;
 
     int maxlen = 0;
-    for (map<string,po::variable_value>::iterator m=fVariables.begin();
+    for (map<string,po::variable_value>::const_iterator m=fVariables.begin();
          m!=fVariables.end(); m++)
         Max(maxlen, m->first.length());
@@ -618,45 +704,66 @@
 
     // =============> Implement prining of options in use
-    for (map<string,po::variable_value>::iterator m=fVariables.begin();
+    for (map<string,po::variable_value>::const_iterator m=fVariables.begin();
          m!=fVariables.end(); m++)
     {
-        cout << setw(maxlen) << m->first << " = ";
-
         const po::variable_value &v = m->second;
 
+        ostringstream str;
+
         if (v.value().type()==typeid(bool))
-            cout << (v.as<bool>()?"true":"false") << "   # bool";
-
+            str << " bool";
         if (v.value().type()==typeid(string))
-            cout << v.as<string>() << "   # string";
-
-        if (v.value().type()==typeid(int))
-            cout << v.as<int>() << "   # int";
-
+            str << " string";
+        if (v.value().type()==typeid(int16_t))
+            str << " int16_t";
+        if (v.value().type()==typeid(int32_t))
+            str << " int32_t";
+        if (v.value().type()==typeid(int64_t))
+            str << " int64_t";
+        if (v.value().type()==typeid(uint16_t))
+            str << " uint16_t";
+        if (v.value().type()==typeid(uint32_t))
+            str << " uint32_t";
+        if (v.value().type()==typeid(uint64_t))
+            str << " uint64_t";
+        if (v.value().type()==typeid(float))
+            str << " float";
         if (v.value().type()==typeid(double))
-            cout << v.as<double>() << "   # double";
-
-        if (v.value().type()==typeid(float))
-            cout << v.as<float>() << "   # float";
-
+            str << " double";
+        if (v.value().type()==typeid(Hex<uint16_t>))
+            str << " Hex<uint16_t>";
+        if (v.value().type()==typeid(Hex<uint32_t>))
+            str << " Hex<uint32_t>";
+        if (v.value().type()==typeid(Hex<uint64_t>))
+            str << " Hex<uint64_t>";
         if (v.value().type()==typeid(vector<string>))
-        {
-            vector<string> vec = v.as<vector<string>>();
-            for (vector<string>::iterator s=vec.begin(); s<vec.end(); s++)
-                cout << *s << " ";
-            cout << "   # strings";
-        }
+            str << " vector<string>";
+        if (v.value().type()==typeid(vector<int16_t>))
+            str << " vector<int16_t>";
+        if (v.value().type()==typeid(vector<int32_t>))
+            str << " vector<int32_t>";
+        if (v.value().type()==typeid(vector<int64_t>))
+            str << " vector<int64_t>";
+        if (v.value().type()==typeid(vector<uint16_t>))
+            str << " vector<uint16_t>";
+        if (v.value().type()==typeid(vector<uint32_t>))
+            str << " vector<uint32_t>";
+        if (v.value().type()==typeid(vector<uint64_t>))
+            str << " vector<uint64_t>";
+        if (v.value().type()==typeid(vector<float>))
+            str << " vector<float>";
         if (v.value().type()==typeid(vector<double>))
-        {
-            vector<double> vec = v.as<vector<double>>();
-            for (vector<double>::iterator s=vec.begin(); s<vec.end(); s++)
-                cout << *s << " ";
-            cout << "   # doubles";
-        }
+            str << " vector<double>";
+
+        if (str.str().empty())
+            str << " unknown[" << v.value().type().name() << "]";
+
+        cout << setw(maxlen) << m->first << " = " << VarAsStr(v);
+        cout << "   #" << str.str();
 
         if (v.defaulted())
-            cout << "   # default value";
+            cout << " [default]";
         if (v.empty())
-            cout << "   # empty value";
+            cout << " [empty]";
 
         cout << endl;
@@ -670,16 +777,27 @@
 //!
 //
-void Configuration::PrintUnknown(vector<string> &vec, int steps)
-{
-    for (vector<string>::iterator v=vec.begin(); v<vec.end(); v+=steps)
+void Configuration::PrintUnknown(const vector<string> &vec, int steps) const
+{
+    for (vector<string>::const_iterator v=vec.begin(); v<vec.end(); v+=steps)
         cout << " " << *v << endl;
     cout << endl;
 }
 
-// --------------------------------------------------------------------------
-//
-//!
-//
-void Configuration::PrintUnknown()
+multimap<string, string> Configuration::GetOptions() const
+{
+    multimap<string,string> rc;
+
+    for (map<string,po::variable_value>::const_iterator m=fVariables.begin();
+         m!=fVariables.end(); m++)
+        rc.insert(make_pair(m->first, VarAsStr(m->second)));
+
+    return rc;
+}
+
+// --------------------------------------------------------------------------
+//
+//!
+//
+void Configuration::PrintUnknown() const
 {
     if (fUnknownCommandline.size())
@@ -954,5 +1072,5 @@
     if (getfiles.count("print-default") || getfiles.count("print-all"))
     {
-        if (!indef && defaulted)
+        if (!indef.is_open() && defaulted)
             cout << "No configuration file by --default option specified." << endl;
         else
Index: trunk/FACT++/src/Configuration.h
===================================================================
--- trunk/FACT++/src/Configuration.h	(revision 11386)
+++ trunk/FACT++/src/Configuration.h	(revision 11387)
@@ -57,8 +57,13 @@
     }
 
+    // Helper functions for PrintOptions and GetOptions
+    template<class T>
+        std::string VecAsStr(const po::variable_value &v) const;
+    std::string VarAsStr(const po::variable_value &v) const;
+
     /// Print all options from a list of already parsed options
     void PrintParsed(const po::parsed_options &parsed) const;
     /// Print a list of all unkown options within the given vector
-    void PrintUnknown(std::vector<std::string> &vec, int steps=1);
+    void PrintUnknown(const std::vector<std::string> &vec, int steps=1) const;
 
     virtual void PrintUsage() const { }
@@ -105,6 +110,8 @@
 
     // Output
-    void PrintOptions();
-    void PrintUnknown();
+    void PrintOptions() const;
+    void PrintUnknown() const;
+
+    std::multimap<std::string, std::string> GetOptions() const;
 
     // Process command line arguments
