| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // Copyright (c) 2021-2025 ChilliBits. All rights reserved. | ||
| 2 | |||
| 3 | #include "Interface.h" | ||
| 4 | |||
| 5 | namespace spice::compiler { | ||
| 6 | |||
| 7 | static constexpr auto INTERFACE_SCOPE_PREFIX = "interface:"; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * Retrieve the name of the scope, where signatures are placed. This is used to navigate to the scope of the interface | ||
| 11 | * from the parent scope. | ||
| 12 | * | ||
| 13 | * @return Name of the interface scope | ||
| 14 | */ | ||
| 15 | 326 | std::string Interface::getScopeName() const { | |
| 16 |
5/8✓ Branch 2 → 3 taken 326 times.
✗ Branch 2 → 13 not taken.
✓ Branch 3 → 4 taken 163 times.
✓ Branch 3 → 5 taken 163 times.
✓ Branch 4 → 6 taken 163 times.
✗ Branch 4 → 13 not taken.
✓ Branch 5 → 6 taken 163 times.
✗ Branch 5 → 13 not taken.
|
326 | const std::string &appendix = isGenericSubstantiation() ? getSignature() : name; |
| 17 |
1/2✓ Branch 6 → 7 taken 326 times.
✗ Branch 6 → 11 not taken.
|
652 | return INTERFACE_SCOPE_PREFIX + appendix; |
| 18 | 326 | } | |
| 19 | |||
| 20 | /** | ||
| 21 | * Retrieve the name of the scope, where signatures are placed. This is used to navigate to the scope of the interface | ||
| 22 | * from the parent scope. | ||
| 23 | * | ||
| 24 | * @return Name of the interface scope | ||
| 25 | */ | ||
| 26 | 103 | std::string Interface::getScopeName(const std::string &name, const QualTypeList &concreteTemplateTypes) { | |
| 27 |
2/4✓ Branch 2 → 3 taken 103 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 103 times.
✗ Branch 3 → 8 not taken.
|
103 | return INTERFACE_SCOPE_PREFIX + getSignature(name, concreteTemplateTypes); |
| 28 | } | ||
| 29 | |||
| 30 | } // namespace spice::compiler | ||
| 31 |