src/core/object.h
changeset 2424 217a447122a6
parent 2420 7b145012b2eb
child 2426 9c9d1a49d061
--- a/src/core/object.h	Sun Feb 17 00:46:24 2008 +0100
+++ b/src/core/object.h	Sun Feb 17 04:38:34 2008 +0100
@@ -141,6 +141,8 @@
    */
   std::string GetParameterFullName (uint32_t i) const;
 
+  PValue GetParameterInitialValue (uint32_t i) const;
+
   Ptr<Object> CreateObject (const Parameters &parameters) const;
 
 
@@ -209,7 +211,9 @@
    * Record in this TypeId the fact that a new parameter exists.
    */
   TypeId AddParameter (std::string name,
-                       std::string help, Ptr<const ParamSpec> spec);
+                       std::string help, 
+                       PValue initialValue,
+                       Ptr<const ParamSpec> spec);
 
   /**
    * \param name the name of the new parameter
@@ -224,6 +228,7 @@
   TypeId AddParameter (std::string name,
                        std::string help, 
                        uint32_t flags,
+                       PValue initialValue,
                        Ptr<const ParamSpec> spec);
 
   // construct an invalid TypeId.
@@ -237,6 +242,7 @@
 
   struct ParameterInfo {
     Ptr<const ParamSpec> spec;
+    PValue initialValue;
     uint32_t flags;
   };
 
@@ -323,7 +329,7 @@
 
 
 
-  bool DoSet (Ptr<const ParamSpec> spec, PValue param);
+  bool DoSet (struct TypeId::ParameterInfo *info, PValue param);
   void DoSetOne (Ptr<const ParamSpec> spec, PValue param);
   std::string LookupParameterFullNameByParamSpec (Ptr<const ParamSpec> spec) const;
 
@@ -474,7 +480,7 @@
   friend Ptr<T> CreateObject (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7);
 
 
-  bool DoSet (Ptr<const ParamSpec> spec, PValue value);
+  bool DoSet (Ptr<const ParamSpec> spec, PValue intialValue, PValue value);
   Ptr<Object> DoGetObject (TypeId tid) const;
   void DoCollectSources (std::string path, const TraceContext &context, 
                          TraceResolver::SourceCollection *collection) const;