src/core/global-value.h
changeset 2965 4b28e9740e3b
parent 2584 5011c132ed6c
child 3182 61fe7fe81ebd
--- a/src/core/global-value.h	Mon Apr 14 16:19:17 2008 -0700
+++ b/src/core/global-value.h	Thu Apr 17 13:42:25 2008 -0700
@@ -51,8 +51,8 @@
    *        value matches the requested type constraints.
    */
   GlobalValue (std::string name, std::string help,
-		Attribute initialValue,
-		Ptr<const AttributeChecker> checker);
+               const AttributeValue &initialValue,
+               Ptr<const AttributeChecker> checker);
 
   /**
    * \returns the name of this GlobalValue.
@@ -65,7 +65,7 @@
   /**
    * \returns the current value of this GlobalValue.
    */
-  Attribute GetValue (void) const;
+  void GetValue (AttributeValue &value) const;
   /**
    * \returns the checker associated to this GlobalValue.
    */
@@ -73,7 +73,7 @@
   /**
    * \param value the new value to set in this GlobalValue.
    */
-  bool SetValue (Attribute value);
+  bool SetValue (const AttributeValue &value);
 
   /**
    * \param name the name of the global value
@@ -84,7 +84,7 @@
    *
    * This method cannot fail. It will crash if the input is not valid.
    */
-  static void Bind (std::string name, Attribute value);
+  static void Bind (std::string name, const AttributeValue &value);
   
   /**
    * \param name the name of the global value
@@ -94,7 +94,7 @@
    * Iterate over the set of GlobalValues until a matching name is found
    * and then set its value with GlobalValue::SetValue.
    */
-  static bool BindFailSafe (std::string name, Attribute value);
+  static bool BindFailSafe (std::string name, const AttributeValue &value);
 
   /**
    * \returns an iterator which represents a pointer to the first GlobalValue registered.
@@ -109,7 +109,7 @@
   static Vector *GetVector (void);
   std::string m_name;
   std::string m_help;
-  Attribute m_initialValue;
+  Ptr<AttributeValue> m_initialValue;
   Ptr<const AttributeChecker> m_checker;
 };