Skip to content

Commit cc6371d

Browse files
committed
Rename SetOrMapImplEntry to SetOrMapImplConstEntry
1 parent e4792b2 commit cc6371d

13 files changed

+33
-28
lines changed

Fw/DataStructures/ArrayMap.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ArrayMap final : public MapBase<K, V> {
2626
// ----------------------------------------------------------------------
2727

2828
//! The type of an implementation entry
29-
using ImplEntry = SetOrMapImplEntry<K, V>;
29+
using ImplEntry = SetOrMapImplConstEntry<K, V>;
3030

3131
//! The type of a map entry
3232
using MapConstEntry = MapConstEntry<K, V>;

Fw/DataStructures/ArraySet.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ArraySet final : public SetBase<T> {
2626
// ----------------------------------------------------------------------
2727

2828
//! The type of animplementation entry
29-
using ImplEntry = SetOrMapImplEntry<T, Nil>;
29+
using ImplEntry = SetOrMapImplConstEntry<T, Nil>;
3030

3131
//! The type of a set entry
3232
using SetEntry = SetEntry<T>;

Fw/DataStructures/ArraySetOrMapImpl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "Fw/DataStructures/ExternalArray.hpp"
1111
#include "Fw/DataStructures/SetOrMapImplConstIterator.hpp"
12-
#include "Fw/DataStructures/SetOrMapImplEntry.hpp"
12+
#include "Fw/DataStructures/SetOrMapImplConstEntry.hpp"
1313
#include "Fw/Types/Assert.hpp"
1414
#include "Fw/Types/SuccessEnumAc.hpp"
1515

@@ -30,7 +30,7 @@ class ArraySetOrMapImpl final {
3030
// ----------------------------------------------------------------------
3131

3232
//! The type of an entry in the set or map
33-
using Entry = SetOrMapImplEntry<KE, VN>;
33+
using Entry = SetOrMapImplConstEntry<KE, VN>;
3434

3535
//! Const iterator
3636
class ConstIterator final : public SetOrMapImplConstIterator<KE, VN> {

Fw/DataStructures/ExternalArrayMap.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ExternalArrayMap final : public MapBase<K, V> {
2828
// ----------------------------------------------------------------------
2929

3030
//! The type of a map implementation entry
31-
using ImplEntry = SetOrMapImplEntry<K, V>;
31+
using ImplEntry = SetOrMapImplConstEntry<K, V>;
3232

3333
//! The type of a map entry
3434
using MapConstEntry = MapConstEntry<K, V>;

Fw/DataStructures/ExternalArraySet.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ExternalArraySet final : public SetBase<T> {
2929
// ----------------------------------------------------------------------
3030

3131
//! The type of a set entry
32-
using Entry = SetOrMapImplEntry<T, Nil>;
32+
using Entry = SetOrMapImplConstEntry<T, Nil>;
3333

3434
//! The type of a set iterator
3535
using SetEntry = SetEntry<T>;

Fw/DataStructures/SetOrMapImplEntry.hpp renamed to Fw/DataStructures/SetOrMapImplConstEntry.hpp

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
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"
@@ -14,35 +15,39 @@
1415
namespace Fw {
1516

1617
template <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

Fw/DataStructures/SetOrMapImplConstIterator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef Fw_SetOrMapImplConstIterator_HPP
88
#define Fw_SetOrMapImplConstIterator_HPP
99

10-
#include "Fw/DataStructures/SetOrMapImplEntry.hpp"
10+
#include "Fw/DataStructures/SetOrMapImplConstEntry.hpp"
1111
#include "Fw/FPrimeBasicTypes.hpp"
1212

1313
namespace Fw {
@@ -53,7 +53,7 @@ class SetOrMapImplConstIterator {
5353

5454
//! Get the set or map impl entry pointed to by this iterator
5555
//! \return The set or map impl entry
56-
virtual const SetOrMapImplEntry<KE, VN>& getEntry() const = 0;
56+
virtual const SetOrMapImplConstEntry<KE, VN>& getEntry() const = 0;
5757

5858
//! Reset the iterator
5959
virtual void reset() = 0;

Fw/DataStructures/test/ut/ArrayMapTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ArrayMapTester {
3030
namespace MapTest {
3131

3232
using ConstIterator = MapConstIterator<State::KeyType, State::ValueType>;
33-
using Entry = SetOrMapImplEntry<State::KeyType, State::ValueType>;
33+
using Entry = SetOrMapImplConstEntry<State::KeyType, State::ValueType>;
3434
using Map = ArrayMap<State::KeyType, State::ValueType, State::capacity>;
3535
using MapTester = ArrayMapTester<State::KeyType, State::ValueType, State::capacity>;
3636
using ImplTester = ArraySetOrMapImplTester<State::KeyType, State::ValueType>;

Fw/DataStructures/test/ut/ArraySetOrMapImplTester.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Fw {
1717
template <typename KE, typename VN>
1818
class ArraySetOrMapImplTester {
1919
public:
20-
using Entry = SetOrMapImplEntry<KE, VN>;
20+
using Entry = SetOrMapImplConstEntry<KE, VN>;
2121

2222
ArraySetOrMapImplTester<KE, VN>(const ArraySetOrMapImpl<KE, VN>& impl) : m_impl(impl) {}
2323

Fw/DataStructures/test/ut/ArraySetTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ArraySetTester {
2929

3030
namespace SetTest {
3131

32-
using Entry = SetOrMapImplEntry<State::ElementType, Nil>;
32+
using Entry = SetOrMapImplConstEntry<State::ElementType, Nil>;
3333
using Set = ArraySet<State::ElementType, State::capacity>;
3434
using SetTester = ArraySetTester<State::ElementType, State::capacity>;
3535
using ImplTester = ArraySetOrMapImplTester<State::ElementType, Nil>;

0 commit comments

Comments
 (0)