src/core/command-line.cc
changeset 2965 4b28e9740e3b
parent 2693 56e28e34e109
child 2972 d76553495b91
--- a/src/core/command-line.cc	Mon Apr 14 16:19:17 2008 -0700
+++ b/src/core/command-line.cc	Thu Apr 17 13:42:25 2008 -0700
@@ -21,6 +21,7 @@
 #include "log.h"
 #include "config.h"
 #include "global-value.h"
+#include "type-id.h"
 #include "string.h"
 #include <stdlib.h>
 
@@ -109,8 +110,9 @@
     {
       std::cout << "    --" << (*i)->GetName () << "=[";
       Ptr<const AttributeChecker> checker = (*i)->GetChecker ();
-      Attribute value = (*i)->GetValue ();
-      std::cout << value.SerializeToString (checker) << "]:  "
+      StringValue v;
+      (*i)->GetValue (v);
+      std::cout << v.Get () << "]:  "
 		<< (*i)->GetHelp () << std::endl;      
     }
   exit (0);
@@ -128,8 +130,8 @@
     {
       std::cout << "    --"<<tid.GetAttributeFullName (i)<<"=[";
       Ptr<const AttributeChecker> checker = tid.GetAttributeChecker (i);
-      Attribute initial = tid.GetAttributeInitialValue (i);
-      std::cout << initial.SerializeToString (checker) << "]:  "
+      Ptr<const AttributeValue> initial = tid.GetAttributeInitialValue (i);
+      std::cout << initial->SerializeToString (checker) << "]:  "
 		<< tid.GetAttributeHelp (i) << std::endl;
     }
   exit (0);
@@ -243,8 +245,8 @@
 	    }
 	}
     }
-  if (!Config::SetGlobalFailSafe (name, String (value))
-      && !Config::SetDefaultFailSafe (name, String (value)))
+  if (!Config::SetGlobalFailSafe (name, StringValue (value))
+      && !Config::SetDefaultFailSafe (name, StringValue (value)))
     {
       std::cerr << "Invalid command-line arguments: --"<<name<<"="<<value<<std::endl;
       PrintHelp ();