11// ======================================================================
2- // \title SetOrMapImplEntry
2+ // \title SetOrMapImplConstEntry
33// \author bocchino
4- // \brief A class template representing an entry for a set or map implementation
4+ // \brief A class template representing a const entry for a set or map
5+ // implementation
56// ======================================================================
67
7- #ifndef Fw_SetOrMapImplEntry_HPP
8- #define Fw_SetOrMapImplEntry_HPP
8+ #ifndef Fw_SetOrMapImplConstEntry_HPP
9+ #define Fw_SetOrMapImplConstEntry_HPP
910
1011#include " Fw/DataStructures/MapConstEntry.hpp"
1112#include " Fw/DataStructures/SetEntry.hpp"
1415namespace Fw {
1516
1617template <typename KE, typename VN>
17- class SetOrMapImplEntry final : public MapConstEntry<KE, VN>, public SetEntry<KE> {
18+ class SetOrMapImplConstEntry final : public MapConstEntry<KE, VN>, public SetEntry<KE> {
1819 public:
1920 // ----------------------------------------------------------------------
2021 // Public constructors and destructors
2122 // ----------------------------------------------------------------------
2223
2324 // ! Zero-argument constructor
24- SetOrMapImplEntry () : MapConstEntry<KE, VN>(), SetEntry<KE>() {}
25+ SetOrMapImplConstEntry () : MapConstEntry<KE, VN>(), SetEntry<KE>() {}
2526
2627 // ! Constructor providing members
27- SetOrMapImplEntry (const KE& keyOrElement, // !< The key or element
28+ SetOrMapImplConstEntry (const KE& keyOrElement, // !< The key or element
2829 const VN& valueOrNil, // !< The value or Nil
29- const SetOrMapImplEntry <KE, VN>* next = nullptr // !< The next entry
30+ const SetOrMapImplConstEntry <KE, VN>* next = nullptr // !< The next entry
3031 )
31- : MapConstEntry<KE, VN>(), SetEntry<KE>(), m_keyOrElement(keyOrElement), m_valueOrNil(valueOrNil), m_next(next) {}
32+ : MapConstEntry<KE, VN>(),
33+ SetEntry<KE>(),
34+ m_keyOrElement (keyOrElement),
35+ m_valueOrNil (valueOrNil),
36+ m_next (next) {}
3237
3338 // ! Copy constructor
34- SetOrMapImplEntry (const SetOrMapImplEntry <KE, VN>& entry) { *this = entry; }
39+ SetOrMapImplConstEntry (const SetOrMapImplConstEntry <KE, VN>& entry) { *this = entry; }
3540
3641 // ! Destructor
37- ~SetOrMapImplEntry () override = default ;
42+ ~SetOrMapImplConstEntry () override = default ;
3843
3944 public:
4045 // ----------------------------------------------------------------------
4146 // Public member functions
4247 // ----------------------------------------------------------------------
4348
4449 // ! operator=
45- SetOrMapImplEntry <KE, VN>& operator =(const SetOrMapImplEntry <KE, VN>& entry) {
50+ SetOrMapImplConstEntry <KE, VN>& operator =(const SetOrMapImplConstEntry <KE, VN>& entry) {
4651 if (this != &entry) {
4752 this ->m_keyOrElement = entry.m_keyOrElement ;
4853 this ->m_valueOrNil = entry.m_valueOrNil ;
@@ -82,7 +87,7 @@ class SetOrMapImplEntry final : public MapConstEntry<KE, VN>, public SetEntry<KE
8287 }
8388
8489 // ! Set the next entry
85- void setNextEntry (const SetOrMapImplEntry <KE, VN>* next) { this ->m_next = next; }
90+ void setNextEntry (const SetOrMapImplConstEntry <KE, VN>* next) { this ->m_next = next; }
8691
8792 // ! Set the value or Nil
8893 void setValueOrNil (const VN& valueOrNil) { this ->m_valueOrNil = valueOrNil; }
@@ -99,7 +104,7 @@ class SetOrMapImplEntry final : public MapConstEntry<KE, VN>, public SetEntry<KE
99104 VN m_valueOrNil = {};
100105
101106 // ! Pointer to the next entry or nullptr if none
102- const SetOrMapImplEntry <KE, VN>* m_next = nullptr ;
107+ const SetOrMapImplConstEntry <KE, VN>* m_next = nullptr ;
103108};
104109
105110} // namespace Fw
0 commit comments