Chrysalis - Pattern Test Coverage


pattern/
File: pattern/include/BaseNamedElement.h
Date: 2026-08-27 18:35:18
Lines:
2/2
100.0%
Functions:
3/3
100.0%
Branches:
0/0
-%
Decisions:
0/0
-%
Calls:
16/16
100.0%

Line Branch Decision Call Exec Source
1 #ifndef CHRYSALIS_BASENAMEDINPUT_H
2 #define CHRYSALIS_BASENAMEDINPUT_H
3
4 #include "serialization.h"
5
6 #include <string>
7 #include <boost/optional/optional.hpp>
8
9 namespace Chrysalis {
10 class BaseNamedElement {
11 protected:
12
9/9
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
✓ Call 6 invoked.
✓ Call 7 invoked.
✓ Call 8 invoked.
168 SERIALIZE(name_, alias_)
13
7/7
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
✓ Call 6 invoked.
42 PROVIDE_DEFAULT_SERIALIZATION_ACCESS(BaseNamedElement)
14 explicit BaseNamedElement(const std::string& name);
15 public:
16 [[nodiscard]] bool hasAlias() const;
17
18 [[nodiscard]] const std::string& getName() const;
19 [[nodiscard]] const std::string& getAlias() const;
20
21 void setName(const std::string& name);
22 void setAlias(const std::string& alias);
23 private:
24 std::string name_;
25 boost::optional<std::string> alias_;
26 };
27 }
28
29 #endif //CHRYSALIS_BASENAMEDINPUT_H
30