src/core/default-value.h
changeset 1962 600b310a3218
parent 1701 5e9bd24a8716
child 2114 bfd8e5afb36d
--- a/src/core/default-value.h	Thu Oct 11 16:53:42 2007 +0200
+++ b/src/core/default-value.h	Mon Oct 15 12:58:53 2007 +0200
@@ -340,6 +340,42 @@
 };
 
 /**
+ * \brief A string variable for ns3::Bind
+ * \ingroup config
+ *
+ * Every instance of this type is automatically 
+ * registered in the variable pool which is used
+ * by ns3::Bind. 
+ */
+class StringDefaultValue : public DefaultValueBase
+{
+public:
+  StringDefaultValue (const std::string &name,
+                      const std::string &help,
+                      const std::string defaultValue);
+  StringDefaultValue (const std::string &name,
+                      const std::string &help,
+                      const std::string defaultValue, 
+                      int maxSize);
+  StringDefaultValue (const std::string &name,
+                      const std::string &help,
+                      const std::string defaultValue, 
+                      int minSize,
+                      int maxSize);
+
+  std::string GetValue (void) const;
+private:
+  virtual bool DoParseValue (const std::string &value);
+  virtual std::string DoGetType (void) const;
+  virtual std::string DoGetDefaultValue (void) const;
+
+  std::string m_defaultValue;
+  std::string m_value;
+  int m_minSize;
+  int m_maxSize;
+};
+
+/**
  * \brief Class used to call a certain function during the configuration of the
  * simulation
  * \ingroup config