GCC Code Coverage Report


Directory: ./
File: Os/QueueString.hpp
Date: 2026-09-03 21:13:48
Exec Total Coverage
Lines: 11 11 100.0%
Functions: 7 7 100.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 // ======================================================================
2 // @file QueueString.hpp
3 // @author F Prime
4 // @brief A string sized for an OS queue name
5 // ======================================================================
6
7 #ifndef OS_QUEUE_STRING_HPP
8 #define OS_QUEUE_STRING_HPP
9
10 #include <Fw/FPrimeBasicTypes.hpp>
11
12 #include "Fw/Types/StringBase.hpp"
13
14 namespace Os {
15
16 class QueueString final : public Fw::StringBase {
17 public:
18 enum { STRING_SIZE = FW_QUEUE_NAME_BUFFER_SIZE, SERIALIZED_SIZE = STATIC_SERIALIZED_SIZE(STRING_SIZE) };
19
20
1/1
✓ Branch 11 taken 1302 times.
1302 QueueString() : StringBase() { *this = ""; }
21
22 QueueString(const QueueString& src) : StringBase() { *this = src; }
23
24 QueueString(const ConstStringBase& src) : StringBase() { *this = src; }
25
26
1/1
✓ Branch 11 taken 1833 times.
1833 explicit QueueString(const char* src) : StringBase() { *this = src; }
27
28 6270 ~QueueString() {}
29
30 QueueString& operator=(const QueueString& src) {
31 (void)StringBase::operator=(src);
32 return *this;
33 }
34
35 2974 QueueString& operator=(const ConstStringBase& src) {
36 2974 (void)StringBase::operator=(src);
37 2974 return *this;
38 }
39
40 3135 QueueString& operator=(const char* src) {
41 3135 (void)StringBase::operator=(src);
42 3135 return *this;
43 }
44
45 19450 const char* toChar() const { return this->m_buf; }
46
47 12058 StringBase::SizeType getCapacity() const { return sizeof this->m_buf; }
48
49 private:
50 char m_buf[BUFFER_SIZE(STRING_SIZE)];
51 };
52 } // namespace Os
53
54 #endif
55