From 6d96614e354ef77a4c3f0b0f37148e791f64fb3c Mon Sep 17 00:00:00 2001 From: Budiarto Herman Date: Thu, 17 Oct 2013 17:33:30 +0300 Subject: [PATCH] Moved DoDispose method of handover and ANR classes to protected scope --- .../model/a2-a4-rsrq-handover-algorithm.cc | 18 ++++++++--------- src/lte/model/a2-a4-rsrq-handover-algorithm.h | 4 ++-- src/lte/model/a3-rsrp-handover-algorithm.cc | 18 ++++++++--------- src/lte/model/a3-rsrp-handover-algorithm.h | 4 ++-- src/lte/model/lte-anr.cc | 20 +++++++++---------- src/lte/model/lte-anr.h | 4 ++-- src/lte/model/lte-handover-algorithm.cc | 15 +++++++------- src/lte/model/lte-handover-algorithm.h | 6 ++++-- src/lte/model/no-op-handover-algorithm.cc | 2 +- src/lte/model/no-op-handover-algorithm.h | 4 ++-- 10 files changed, 49 insertions(+), 46 deletions(-) diff --git a/src/lte/model/a2-a4-rsrq-handover-algorithm.cc b/src/lte/model/a2-a4-rsrq-handover-algorithm.cc index 215507358..d02edc8f0 100644 --- a/src/lte/model/a2-a4-rsrq-handover-algorithm.cc +++ b/src/lte/model/a2-a4-rsrq-handover-algorithm.cc @@ -60,16 +60,8 @@ A2A4RsrqHandoverAlgorithm::~A2A4RsrqHandoverAlgorithm () } -void -A2A4RsrqHandoverAlgorithm::DoDispose () -{ - NS_LOG_FUNCTION (this); - delete m_handoverManagementSapProvider; -} - - TypeId -A2A4RsrqHandoverAlgorithm::GetTypeId (void) +A2A4RsrqHandoverAlgorithm::GetTypeId () { static TypeId tid = TypeId ("ns3::A2A4RsrqHandoverAlgorithm") .SetParent () @@ -135,6 +127,14 @@ A2A4RsrqHandoverAlgorithm::DoInitialize () } +void +A2A4RsrqHandoverAlgorithm::DoDispose () +{ + NS_LOG_FUNCTION (this); + delete m_handoverManagementSapProvider; +} + + void A2A4RsrqHandoverAlgorithm::DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) diff --git a/src/lte/model/a2-a4-rsrq-handover-algorithm.h b/src/lte/model/a2-a4-rsrq-handover-algorithm.h index 6bc4af997..a8df469dc 100644 --- a/src/lte/model/a2-a4-rsrq-handover-algorithm.h +++ b/src/lte/model/a2-a4-rsrq-handover-algorithm.h @@ -86,8 +86,7 @@ public: virtual ~A2A4RsrqHandoverAlgorithm (); // inherited from Object - virtual void DoDispose (void); - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from LteHandoverAlgorithm virtual void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s); @@ -99,6 +98,7 @@ public: protected: // inherited from Object virtual void DoInitialize (); + virtual void DoDispose (); // inherited from LteHandoverAlgorithm as a Handover Management SAP implementation void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); diff --git a/src/lte/model/a3-rsrp-handover-algorithm.cc b/src/lte/model/a3-rsrp-handover-algorithm.cc index 87ab87f89..6c81fc855 100644 --- a/src/lte/model/a3-rsrp-handover-algorithm.cc +++ b/src/lte/model/a3-rsrp-handover-algorithm.cc @@ -46,16 +46,8 @@ A3RsrpHandoverAlgorithm::~A3RsrpHandoverAlgorithm () } -void -A3RsrpHandoverAlgorithm::DoDispose () -{ - NS_LOG_FUNCTION (this); - delete m_handoverManagementSapProvider; -} - - TypeId -A3RsrpHandoverAlgorithm::GetTypeId (void) +A3RsrpHandoverAlgorithm::GetTypeId () { static TypeId tid = TypeId ("ns3::A3RsrpHandoverAlgorithm") .SetParent () @@ -118,6 +110,14 @@ A3RsrpHandoverAlgorithm::DoInitialize () } +void +A3RsrpHandoverAlgorithm::DoDispose () +{ + NS_LOG_FUNCTION (this); + delete m_handoverManagementSapProvider; +} + + void A3RsrpHandoverAlgorithm::DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) diff --git a/src/lte/model/a3-rsrp-handover-algorithm.h b/src/lte/model/a3-rsrp-handover-algorithm.h index 4cf0ef83c..e558ad546 100644 --- a/src/lte/model/a3-rsrp-handover-algorithm.h +++ b/src/lte/model/a3-rsrp-handover-algorithm.h @@ -73,8 +73,7 @@ public: virtual ~A3RsrpHandoverAlgorithm (); // inherited from Object - virtual void DoDispose (void); - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from LteHandoverAlgorithm virtual void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s); @@ -86,6 +85,7 @@ public: protected: // inherited from Object virtual void DoInitialize (); + virtual void DoDispose (); // inherited from LteHandoverAlgorithm as a Handover Management SAP implementation void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); diff --git a/src/lte/model/lte-anr.cc b/src/lte/model/lte-anr.cc index 2cdf30ec1..a7ae940cf 100644 --- a/src/lte/model/lte-anr.cc +++ b/src/lte/model/lte-anr.cc @@ -53,17 +53,8 @@ LteAnr::~LteAnr () } -void -LteAnr::DoDispose () -{ - NS_LOG_FUNCTION (this); - delete m_anrSapProvider; - m_neighbourRelationTable.clear (); -} - - TypeId -LteAnr::GetTypeId (void) +LteAnr::GetTypeId () { static TypeId tid = TypeId ("ns3::LteAnr") .SetParent () @@ -148,6 +139,15 @@ LteAnr::DoInitialize () } +void +LteAnr::DoDispose () +{ + NS_LOG_FUNCTION (this); + delete m_anrSapProvider; + m_neighbourRelationTable.clear (); +} + + void LteAnr::DoReportUeMeas (LteRrcSap::MeasResults measResults) { diff --git a/src/lte/model/lte-anr.h b/src/lte/model/lte-anr.h index 2384957d9..85c8141ac 100644 --- a/src/lte/model/lte-anr.h +++ b/src/lte/model/lte-anr.h @@ -89,8 +89,7 @@ public: virtual ~LteAnr (); // inherited from Object - virtual void DoDispose (void); - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Provide an advance information about a related neighbouring cell @@ -139,6 +138,7 @@ public: protected: // inherited from Object virtual void DoInitialize (); + virtual void DoDispose (); private: diff --git a/src/lte/model/lte-handover-algorithm.cc b/src/lte/model/lte-handover-algorithm.cc index d7b4da7bd..6e0224a37 100644 --- a/src/lte/model/lte-handover-algorithm.cc +++ b/src/lte/model/lte-handover-algorithm.cc @@ -39,14 +39,8 @@ LteHandoverAlgorithm::~LteHandoverAlgorithm () } -void -LteHandoverAlgorithm::DoDispose () -{ -} - - TypeId -LteHandoverAlgorithm::GetTypeId (void) +LteHandoverAlgorithm::GetTypeId () { static TypeId tid = TypeId ("ns3::LteHandoverAlgorithm") .SetParent () @@ -55,4 +49,11 @@ LteHandoverAlgorithm::GetTypeId (void) } +void +LteHandoverAlgorithm::DoDispose () +{ +} + + + } // end of namespace ns3 diff --git a/src/lte/model/lte-handover-algorithm.h b/src/lte/model/lte-handover-algorithm.h index 0591d8cf6..3a8d4f1fc 100644 --- a/src/lte/model/lte-handover-algorithm.h +++ b/src/lte/model/lte-handover-algorithm.h @@ -70,8 +70,7 @@ public: virtual ~LteHandoverAlgorithm (); // inherited from Object - virtual void DoDispose (void); - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Set the "user" part of the Handover Management SAP interface that @@ -90,6 +89,9 @@ public: protected: + // inherited from Object + virtual void DoDispose (); + // HANDOVER MANAGEMENT SAP PROVIDER IMPLEMENTATION /** diff --git a/src/lte/model/no-op-handover-algorithm.cc b/src/lte/model/no-op-handover-algorithm.cc index c72bfeb15..41b629639 100644 --- a/src/lte/model/no-op-handover-algorithm.cc +++ b/src/lte/model/no-op-handover-algorithm.cc @@ -52,7 +52,7 @@ NoOpHandoverAlgorithm::DoDispose () TypeId -NoOpHandoverAlgorithm::GetTypeId (void) +NoOpHandoverAlgorithm::GetTypeId () { static TypeId tid = TypeId ("ns3::NoOpHandoverAlgorithm") .SetParent () diff --git a/src/lte/model/no-op-handover-algorithm.h b/src/lte/model/no-op-handover-algorithm.h index 601c43cf9..e5c41cba8 100644 --- a/src/lte/model/no-op-handover-algorithm.h +++ b/src/lte/model/no-op-handover-algorithm.h @@ -49,8 +49,7 @@ public: virtual ~NoOpHandoverAlgorithm (); // inherited from Object - virtual void DoDispose (void); - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from LteHandoverAlgorithm virtual void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s); @@ -62,6 +61,7 @@ public: protected: // inherited from Object virtual void DoInitialize (); + virtual void DoDispose (); // inherited from LteHandoverAlgorithm as a Handover Management SAP implementation void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);