uint-value -> uinteger
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 21 Feb 2008 19:09:05 +0100
changeset 2455 8253e8353689
parent 2454 23ab3212cec4
child 2456 8f40bc572412
uint-value -> uinteger
samples/main-grid-topology.cc
src/core/attribute-test.cc
src/core/initial-value.cc
src/core/uint-value.cc
src/core/uint-value.h
src/core/uinteger.cc
src/core/uinteger.h
src/core/wscript
src/node/drop-tail-queue.cc
--- a/samples/main-grid-topology.cc	Thu Feb 21 19:04:18 2008 +0100
+++ b/samples/main-grid-topology.cc	Thu Feb 21 19:09:05 2008 +0100
@@ -5,7 +5,7 @@
 #include "ns3/command-line.h"
 #include "ns3/mobility-model.h"
 #include "ns3/mobility-helper.h"
-#include "ns3/uint-value.h"
+#include "ns3/uinteger.h"
 #include "ns3/fp-value.h"
 #include "ns3/enum-value.h"
 
--- a/src/core/attribute-test.cc	Thu Feb 21 19:04:18 2008 +0100
+++ b/src/core/attribute-test.cc	Thu Feb 21 19:09:05 2008 +0100
@@ -3,7 +3,7 @@
 #include "object.h"
 #include "boolean.h"
 #include "integer.h"
-#include "uint-value.h"
+#include "uinteger.h"
 #include "enum-value.h"
 #include "random-variable.h"
 #include "fp-value.h"
--- a/src/core/initial-value.cc	Thu Feb 21 19:04:18 2008 +0100
+++ b/src/core/initial-value.cc	Thu Feb 21 19:09:05 2008 +0100
@@ -1,9 +1,5 @@
 #include "initial-value.h"
 #include "fatal-error.h"
-#include "uint-value.h"
-#include "integer.h"
-#include "fp-value.h"
-#include "enum-value.h"
 #include "object.h"
 
 namespace ns3 {
@@ -91,7 +87,7 @@
 #ifdef RUN_SELF_TESTS
 
 #include "test.h"
-#include "uint-value.h"
+#include "uinteger.h"
 
 namespace {
 
--- a/src/core/uint-value.cc	Thu Feb 21 19:04:18 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#include "uint-value.h"
-#include "fatal-error.h"
-#include <sstream>
-
-namespace ns3 {
-
-Uinteger::Uinteger (uint64_t value)
-  : m_value (value)
-{}
-Uinteger::Uinteger ()
-{}
-void 
-Uinteger::Set (uint64_t value)
-{
-  m_value = value;
-}
-uint64_t 
-Uinteger::Get (void) const
-{
-  return m_value;
-}
-Uinteger::operator uint64_t () const
-{
-  return m_value;
-}
-std::ostream & operator << (std::ostream &os, const Uinteger &uinteger)
-{
-  os << uinteger.Get ();
-  return os;
-}
-std::istream & operator >> (std::istream &is, Uinteger &uinteger)
-{
-  uint64_t v;
-  is >> v;
-  uinteger.Set (v);
-  return is;
-}
-
-ATTRIBUTE_CONVERTER_IMPLEMENT(Uinteger);
-ATTRIBUTE_VALUE_IMPLEMENT(Uinteger);
-
-
-Ptr<const AttributeChecker> MakeUintegerChecker (uint64_t min, uint64_t max)
-{
-  struct Checker : public AttributeChecker
-  {
-    Checker (uint64_t minValue, uint64_t maxValue)
-      : m_minValue (minValue),
-      m_maxValue (maxValue) {}
-    virtual bool Check (Attribute value) const {
-      const UintegerValue *v = value.DynCast<const UintegerValue *> ();
-      if (v == 0)
-	{
-	  return false;
-	}
-      return v->Get ().Get () >= m_minValue && v->Get ().Get () <= m_maxValue;
-    }
-    uint64_t m_minValue;
-    uint64_t m_maxValue;
-  } *checker = new Checker (min, max);
-  return Ptr<const AttributeChecker> (checker, false);
-}
-
-
-} // namespace ns3
--- a/src/core/uint-value.h	Thu Feb 21 19:04:18 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#ifndef UINTEGER_H
-#define UINTEGER_H
-
-#include "attribute.h"
-#include "attribute-helper.h"
-#include <stdint.h>
-
-namespace ns3 {
-
-class Uinteger
-{
-public:
-  Uinteger (uint64_t value);
-  Uinteger ();
-
-  void Set (uint64_t value);
-  uint64_t Get (void) const;
-
-  operator uint64_t () const;
-
-  ATTRIBUTE_CONVERTER_DEFINE (Uinteger);
-private:
-  uint64_t m_value;
-};
-
-std::ostream & operator << (std::ostream &os, const Uinteger &uinteger);
-std::istream & operator >> (std::istream &is, Uinteger &uinteger);
-
-ATTRIBUTE_VALUE_DEFINE (Uinteger);
-ATTRIBUTE_ACCESSOR_DEFINE (Uinteger);
-
-template <typename T>
-Ptr<const AttributeChecker> MakeUintegerChecker (void);
-
-Ptr<const AttributeChecker> MakeUintegerChecker (uint64_t min, uint64_t max);
-
-} // namespace ns3
-
-namespace ns3 {
-
-template <typename T>
-Ptr<const AttributeChecker> MakeUintegerChecker (void)
-{
-  return MakeUintegerChecker (std::numeric_limits<T>::min (),
-			      std::numeric_limits<T>::max ());
-}
-
-} // namespace ns3
-
-#endif /* UINTEGER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/uinteger.cc	Thu Feb 21 19:09:05 2008 +0100
@@ -0,0 +1,65 @@
+#include "uinteger.h"
+#include "fatal-error.h"
+#include <sstream>
+
+namespace ns3 {
+
+Uinteger::Uinteger (uint64_t value)
+  : m_value (value)
+{}
+Uinteger::Uinteger ()
+{}
+void 
+Uinteger::Set (uint64_t value)
+{
+  m_value = value;
+}
+uint64_t 
+Uinteger::Get (void) const
+{
+  return m_value;
+}
+Uinteger::operator uint64_t () const
+{
+  return m_value;
+}
+std::ostream & operator << (std::ostream &os, const Uinteger &uinteger)
+{
+  os << uinteger.Get ();
+  return os;
+}
+std::istream & operator >> (std::istream &is, Uinteger &uinteger)
+{
+  uint64_t v;
+  is >> v;
+  uinteger.Set (v);
+  return is;
+}
+
+ATTRIBUTE_CONVERTER_IMPLEMENT(Uinteger);
+ATTRIBUTE_VALUE_IMPLEMENT(Uinteger);
+
+
+Ptr<const AttributeChecker> MakeUintegerChecker (uint64_t min, uint64_t max)
+{
+  struct Checker : public AttributeChecker
+  {
+    Checker (uint64_t minValue, uint64_t maxValue)
+      : m_minValue (minValue),
+      m_maxValue (maxValue) {}
+    virtual bool Check (Attribute value) const {
+      const UintegerValue *v = value.DynCast<const UintegerValue *> ();
+      if (v == 0)
+	{
+	  return false;
+	}
+      return v->Get ().Get () >= m_minValue && v->Get ().Get () <= m_maxValue;
+    }
+    uint64_t m_minValue;
+    uint64_t m_maxValue;
+  } *checker = new Checker (min, max);
+  return Ptr<const AttributeChecker> (checker, false);
+}
+
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/uinteger.h	Thu Feb 21 19:09:05 2008 +0100
@@ -0,0 +1,50 @@
+#ifndef UINTEGER_H
+#define UINTEGER_H
+
+#include "attribute.h"
+#include "attribute-helper.h"
+#include <stdint.h>
+
+namespace ns3 {
+
+class Uinteger
+{
+public:
+  Uinteger (uint64_t value);
+  Uinteger ();
+
+  void Set (uint64_t value);
+  uint64_t Get (void) const;
+
+  operator uint64_t () const;
+
+  ATTRIBUTE_CONVERTER_DEFINE (Uinteger);
+private:
+  uint64_t m_value;
+};
+
+std::ostream & operator << (std::ostream &os, const Uinteger &uinteger);
+std::istream & operator >> (std::istream &is, Uinteger &uinteger);
+
+ATTRIBUTE_VALUE_DEFINE (Uinteger);
+ATTRIBUTE_ACCESSOR_DEFINE (Uinteger);
+
+template <typename T>
+Ptr<const AttributeChecker> MakeUintegerChecker (void);
+
+Ptr<const AttributeChecker> MakeUintegerChecker (uint64_t min, uint64_t max);
+
+} // namespace ns3
+
+namespace ns3 {
+
+template <typename T>
+Ptr<const AttributeChecker> MakeUintegerChecker (void)
+{
+  return MakeUintegerChecker (std::numeric_limits<T>::min (),
+			      std::numeric_limits<T>::max ());
+}
+
+} // namespace ns3
+
+#endif /* UINTEGER_H */
--- a/src/core/wscript	Thu Feb 21 19:04:18 2008 +0100
+++ b/src/core/wscript	Thu Feb 21 19:09:05 2008 +0100
@@ -57,7 +57,7 @@
         'boolean.cc',
         'attribute-test.cc',
         'integer.cc',
-        'uint-value.cc',
+        'uinteger.cc',
         'enum-value.cc',
         'fp-value.cc',
         'object-factory.cc',
@@ -111,7 +111,7 @@
         'attribute-accessor-helper.h',
         'boolean.h',
         'integer.h',
-        'uint-value.h',
+        'uinteger.h',
         'fp-value.h',
         'enum-value.h',
         'object-factory.h',
--- a/src/node/drop-tail-queue.cc	Thu Feb 21 19:04:18 2008 +0100
+++ b/src/node/drop-tail-queue.cc	Thu Feb 21 19:09:05 2008 +0100
@@ -18,7 +18,7 @@
  */
 
 #include "ns3/log.h"
-#include "ns3/uint-value.h"
+#include "ns3/uinteger.h"
 #include "drop-tail-queue.h"
 
 NS_LOG_COMPONENT_DEFINE ("DropTailQueue");