AttributeChecker implementation for EnumValue. More...
#include "enum.h"
Inheritance diagram for ns3::EnumChecker< T >:
Collaboration diagram for ns3::EnumChecker< T >:Public Member Functions | |
| EnumChecker () | |
| void | Add (T value, std::string name) |
| Add a new value. | |
| void | AddDefault (T value, std::string name) |
| Add a default value. | |
| bool | Check (const AttributeValue &value) const override |
| bool | Copy (const AttributeValue &src, AttributeValue &dst) const override |
| Copy the source to the destination. | |
| Ptr< AttributeValue > | Create () const override |
| std::string | GetName (T value) const |
| Get the enum symbol name by value. | |
| std::string | GetUnderlyingTypeInformation () const override |
| T | GetValue (const std::string name) const |
| Get the enum value by name. | |
| std::string | GetValueTypeName () const override |
| bool | HasUnderlyingTypeInformation () const override |
Public Member Functions inherited from ns3::AttributeChecker | |
| AttributeChecker () | |
| virtual | ~AttributeChecker () |
| Ptr< AttributeValue > | CreateValidValue (const AttributeValue &value) const |
| Create a valid value from the argument value, or reinterpret the argument as a string. | |
Public Member Functions inherited from ns3::SimpleRefCount< AttributeChecker > | |
| SimpleRefCount () | |
| Default constructor. | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
Private Types | |
| using | Value = std::pair< T, std::string > |
| Type for the pair value, name. | |
| using | ValueSet = std::list< Value > |
| Type of container for storing Enum values and symbol names. | |
Private Attributes | |
| ValueSet | m_valueSet |
| The stored Enum values and symbol names. | |
AttributeChecker implementation for EnumValue.
|
private |
|
private |
| ns3::EnumChecker< T >::EnumChecker | ( | ) |
| void ns3::EnumChecker< T >::Add | ( | T | value, |
| std::string | name | ||
| ) |
Add a new value.
| [in] | value | The value. |
| [in] | name | The enum symbol name. |
Definition at line 267 of file enum.h.
References ns3::value().
Here is the call graph for this function:| void ns3::EnumChecker< T >::AddDefault | ( | T | value, |
| std::string | name | ||
| ) |
Add a default value.
| [in] | value | The value. |
| [in] | name | Then enum symbol name. |
Definition at line 260 of file enum.h.
References ns3::value().
Here is the call graph for this function:
|
overridevirtual |
| [in] | value | A pointer to the value to check |
Implements ns3::AttributeChecker.
Definition at line 316 of file enum.h.
References ns3::EnumValue< T >::Get().
Here is the call graph for this function:
|
overridevirtual |
Copy the source to the destination.
| [in] | source | Source AttributeValue |
| [out] | destination | Destination AttributeValue |
Implements ns3::AttributeChecker.
|
overridevirtual |
This method is typically used to create a temporary variable prior to calling Attribute::DeserializeFromString.
Implements ns3::AttributeChecker.
Definition at line 360 of file enum.h.
References ns3::Create().
Referenced by visualizer.ipython_view.ConsoleView::__init__(), show_last_packets.ShowLastPackets.PacketList::__init__(), visualizer.ipython_view.ConsoleView::_write(), test-ns3.NS3BaseTestCase::config_ok(), visualizer.svgitem.SvgItem::do_set_property(), test-ns3.NS3StyleTestCase::setUp(), test-ns3.NS3BaseTestCase::setUp(), test-ns3.NS3ExpectedUseTestCase::setUp(), test-ns3.NS3BuildBaseTestCase::test_01_BuildExistingTargets(), test-ns3.NS3ExpectedUseTestCase::test_01_BuildProject(), test-ns3.NS3StyleTestCase::test_01_CheckCMakeFormat(), test-ns3.NS3QualityControlTestCase::test_01_CheckForDeadLinksInSources(), test-ns3.NS3DependenciesTestCase::test_01_CheckIfIncludedHeadersMatchLinkedModules(), test-ns3.NS3ConfigureBuildProfileTestCase::test_01_Debug(), test-ns3.NS3CommonSettingsTestCase::test_01_NoOption(), test-ns3.NS3UnusedSourcesTestCase::test_01_UnusedExampleSources(), test-ns3.NS3ExpectedUseTestCase::test_02_BuildAndRunExistingExecutableTarget(), test-ns3.NS3BuildBaseTestCase::test_02_BuildNonExistingTargets(), test-ns3.NS3QualityControlTestCase::test_02_MemoryCheckWithSanitizers(), test-ns3.NS3CommonSettingsTestCase::test_02_NoTaskLines(), test-ns3.NS3ConfigureBuildProfileTestCase::test_02_Release(), test-ns3.NS3ConfigureTestCase::test_02_Tests(), test-ns3.NS3UnusedSourcesTestCase::test_02_UnusedModuleSources(), test-ns3.NS3ExpectedUseTestCase::test_03_BuildAndRunExistingLibraryTarget(), test-ns3.NS3BuildBaseTestCase::test_03_BuildProject(), test-ns3.NS3CommonSettingsTestCase::test_03_CheckConfig(), test-ns3.NS3QualityControlTestCase::test_03_CheckImageBrightness(), test-ns3.NS3ConfigureBuildProfileTestCase::test_03_Optimized(), test-ns3.NS3UnusedSourcesTestCase::test_03_UnusedUtilsSources(), test-ns3.NS3ExpectedUseTestCase::test_04_BuildAndRunNonExistingTarget(), test-ns3.NS3BuildBaseTestCase::test_04_BuildProjectNoTaskLines(), test-ns3.NS3QualityControlTestCase::test_04_CheckForBrokenLogs(), test-ns3.NS3CommonSettingsTestCase::test_04_CheckProfile(), test-ns3.NS3ConfigureTestCase::test_04_DisableModules(), test-ns3.NS3ConfigureBuildProfileTestCase::test_04_Typo(), test-ns3.NS3BuildBaseTestCase::test_05_BreakBuild(), test-ns3.NS3CommonSettingsTestCase::test_05_CheckVersion(), test-ns3.NS3ConfigureTestCase::test_05_EnableModulesComma(), test-ns3.NS3ExpectedUseTestCase::test_05_RunNoBuildExistingExecutableTarget(), test-ns3.NS3ConfigureBuildProfileTestCase::test_05_TYPO(), test-ns3.NS3ConfigureTestCase::test_06_DisableModulesComma(), test-ns3.NS3ConfigureBuildProfileTestCase::test_06_OverwriteDefaultSettings(), test-ns3.NS3ExpectedUseTestCase::test_06_RunNoBuildExistingLibraryTarget(), test-ns3.NS3BuildBaseTestCase::test_06_TestVersionFile(), test-ns3.NS3BuildBaseTestCase::test_07_OutputDirectory(), test-ns3.NS3ExpectedUseTestCase::test_07_RunNoBuildNonExistingExecutableTarget(), test-ns3.NS3ConfigureTestCase::test_08_DryRun(), test-ns3.NS3BuildBaseTestCase::test_08_InstallationAndUninstallation(), test-ns3.NS3ExpectedUseTestCase::test_08_RunNoBuildGdb(), test-ns3.NS3ConfigureTestCase::test_09_PropagationOfReturnCode(), test-ns3.NS3ExpectedUseTestCase::test_09_RunNoBuildValgrind(), test-ns3.NS3BuildBaseTestCase::test_09_Scratches(), test-ns3.NS3BuildBaseTestCase::test_10_AmbiguityCheck(), test-ns3.NS3ConfigureTestCase::test_10_CheckConfig(), test-ns3.NS3ExpectedUseTestCase::test_10_DoxygenWithBuild(), test-ns3.NS3ConfigureTestCase::test_11_CheckProfile(), test-ns3.NS3ExpectedUseTestCase::test_11_DoxygenWithoutBuild(), test-ns3.NS3BuildBaseTestCase::test_11_StaticBuilds(), test-ns3.NS3ConfigureTestCase::test_12_CheckVersion(), test-ns3.NS3BuildBaseTestCase::test_12_CppyyBindings(), test-ns3.NS3ExpectedUseTestCase::test_12_SphinxDocumentation(), test-ns3.NS3ExpectedUseTestCase::test_13_Documentation(), test-ns3.NS3BuildBaseTestCase::test_13_FetchOptionalComponents(), test-ns3.NS3ConfigureTestCase::test_13_Scratches(), test-ns3.NS3ExpectedUseTestCase::test_14_EnableSudo(), test-ns3.NS3BuildBaseTestCase::test_14_LinkContribModuleToSrcModule(), test-ns3.NS3ConfigureTestCase::test_14_MpiCommandTemplate(), test-ns3.NS3ExpectedUseTestCase::test_15_CommandTemplate(), test-ns3.NS3ConfigureTestCase::test_15_InvalidLibrariesToLink(), test-ns3.NS3ExpectedUseTestCase::test_16_ForwardArgumentsToRunTargets(), test-ns3.NS3ConfigureTestCase::test_16_LibrariesContainingLib(), test-ns3.NS3ConfigureTestCase::test_17_CMakePerformanceTracing(), test-ns3.NS3ExpectedUseTestCase::test_17_RunNoBuildLldb(), test-ns3.NS3ConfigureTestCase::test_18_CheckBuildVersionAndVersionCache(), test-ns3.NS3ExpectedUseTestCase::test_18_CpmAndVcpkgManagers(), test-ns3.NS3ConfigureTestCase::test_19_FilterModuleExamplesAndTests(), test-ns3.NS3ConfigureTestCase::test_20_CheckFastLinkers(), test-ns3.NS3ConfigureTestCase::test_21_ClangTimeTrace(), test-ns3.NS3ConfigureTestCase::test_22_NinjaTrace(), test-ns3.NS3ConfigureTestCase::test_23_PrecompiledHeaders(), test-ns3.NS3ConfigureTestCase::test_24_CheckTestSettings(), python-unit-tests.TestSimulator::testAttributes(), python-unit-tests.TestSimulator::testCommandLine(), python-unit-tests.TestSimulator::testIdentity(), python-unit-tests.TestSimulator::testSchedule(), python-unit-tests.TestSimulator::testScheduleDestroy(), python-unit-tests.TestSimulator::testSubclass(), python-unit-tests.TestSimulator::testTimeComparison(), python-unit-tests.TestSimulator::testTimeNumericOperations(), python-unit-tests.TestSimulator::testTypeId(), and visualizer.core.Node::tooltip_query().
Here is the call graph for this function:| std::string ns3::EnumChecker< T >::GetName | ( | T | value | ) | const |
Get the enum symbol name by value.
| [in] | value | The value. |
Definition at line 274 of file enum.h.
References ns3::Create(), NS_ASSERT_MSG, and ns3::value().
Here is the call graph for this function:
|
overridevirtual |
Implements ns3::AttributeChecker.
| T ns3::EnumChecker< T >::GetValue | ( | const std::string | name | ) | const |
Get the enum value by name.
| [in] | name | Then enum symbol name. |
Definition at line 288 of file enum.h.
References ns3::Create(), and NS_ASSERT_MSG.
Here is the call graph for this function:
|
overridevirtual |
A typical return value here is FooValue where Foo is the name of the type being wrapped.
Implements ns3::AttributeChecker.
Definition at line 332 of file enum.h.
References ns3::Demangle().
Here is the call graph for this function:
|
overridevirtual |
If this method returns false, the return value of the GetUnderlyingTypeInformation method cannot be relied upon.
Implements ns3::AttributeChecker.
|
private |