diff --git a/src/core/initial-value.cc b/src/core/global-value.cc similarity index 63% rename from src/core/initial-value.cc rename to src/core/global-value.cc index 198bab7fb..b2e27ea86 100644 --- a/src/core/initial-value.cc +++ b/src/core/global-value.cc @@ -1,10 +1,10 @@ -#include "initial-value.h" +#include "global-value.h" #include "fatal-error.h" #include "object.h" namespace ns3 { -InitialValue::InitialValue (std::string name, std::string help, +GlobalValue::GlobalValue (std::string name, std::string help, Attribute initialValue, Ptr checker) : m_name (name), @@ -20,28 +20,28 @@ InitialValue::InitialValue (std::string name, std::string help, } std::string -InitialValue::GetName (void) const +GlobalValue::GetName (void) const { return m_name; } std::string -InitialValue::GetHelp (void) const +GlobalValue::GetHelp (void) const { return m_help; } Attribute -InitialValue::GetValue (void) const +GlobalValue::GetValue (void) const { return m_initialValue; } Ptr -InitialValue::GetChecker (void) const +GlobalValue::GetChecker (void) const { return m_checker; } void -InitialValue::SetValue (Attribute value) +GlobalValue::SetValue (Attribute value) { if (!m_checker->Check (value)) { @@ -51,7 +51,7 @@ InitialValue::SetValue (Attribute value) } void -InitialValue::Bind (std::string name, Attribute value) +GlobalValue::Bind (std::string name, Attribute value) { for (Iterator i = Begin (); i != End (); i++) { @@ -61,22 +61,22 @@ InitialValue::Bind (std::string name, Attribute value) return; } } - // since we did not find a matching InitialValue, + // since we did not find a matching GlobalValue, // we attempt to configure the global parameters list. AttributeList::GetGlobal ()->Set (name, value); } -InitialValue::Iterator -InitialValue::Begin (void) +GlobalValue::Iterator +GlobalValue::Begin (void) { return GetVector ()->begin (); } -InitialValue::Iterator -InitialValue::End (void) +GlobalValue::Iterator +GlobalValue::End (void) { return GetVector ()->end (); } -InitialValue::Vector * -InitialValue::GetVector (void) +GlobalValue::Vector * +GlobalValue::GetVector (void) { static Vector vector; return &vector; @@ -91,7 +91,7 @@ InitialValue::GetVector (void) namespace { -static ns3::InitialValue g_uint = ns3::InitialValue ("TestUint", "help text", +static ns3::GlobalValue g_uint = ns3::GlobalValue ("TestUint", "help text", ns3::Uinteger (10), ns3::MakeUintegerChecker ()); @@ -99,20 +99,20 @@ static ns3::InitialValue g_uint = ns3::InitialValue ("TestUint", "help text", namespace ns3 { -class InitialValueTests : public Test +class GlobalValueTests : public Test { public: - InitialValueTests (); + GlobalValueTests (); virtual bool RunTests (void); private: }; -InitialValueTests::InitialValueTests () - : Test ("InitialValue") +GlobalValueTests::GlobalValueTests () + : Test ("GlobalValue") {} bool -InitialValueTests::RunTests (void) +GlobalValueTests::RunTests (void) { bool result = true; @@ -121,7 +121,7 @@ InitialValueTests::RunTests (void) return result; } -static InitialValueTests g_initialValueTests; +static GlobalValueTests g_initialValueTests; } // namespace ns3 diff --git a/src/core/initial-value.h b/src/core/global-value.h similarity index 78% rename from src/core/initial-value.h rename to src/core/global-value.h index 8b24f5a53..a64fc6502 100644 --- a/src/core/initial-value.h +++ b/src/core/global-value.h @@ -1,5 +1,5 @@ -#ifndef INITIAL_VALUE_H -#define INITIAL_VALUE_H +#ifndef GLOBAL_VALUE_H +#define GLOBAL_VALUE_H #include #include @@ -9,13 +9,13 @@ namespace ns3 { -class InitialValue +class GlobalValue { - typedef std::vector Vector; + typedef std::vector Vector; public: typedef Vector::const_iterator Iterator; - InitialValue (std::string name, std::string help, + GlobalValue (std::string name, std::string help, Attribute initialValue, Ptr checker); @@ -40,4 +40,4 @@ private: } // namespace ns3 -#endif /* INITIAL_VALUE_H */ +#endif /* GLOBAL_VALUE_H */ diff --git a/src/core/wscript b/src/core/wscript index bb9099b72..000c4457d 100644 --- a/src/core/wscript +++ b/src/core/wscript @@ -62,7 +62,7 @@ def build(bld): 'double.cc', 'object-factory.cc', 'object-vector.cc', - 'initial-value.cc', + 'global-value.cc', 'event-trace-source.cc', 'trace-source-accessor.cc', ] @@ -118,7 +118,7 @@ def build(bld): 'enum.h', 'object-factory.h', 'attribute-helper.h', - 'initial-value.h', + 'global-value.h', 'event-trace-source.h', 'integer-trace-source.h', 'trace-source-accessor.h',