GCC Code Coverage Report


Directory: ../
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 2 / 0 / 2
Functions: 100.0% 1 / 0 / 1
Branches: -% 0 / 0 / 0

src/model/Interface.h
Line Branch Exec Source
1 // Copyright (c) 2021-2026 ChilliBits. All rights reserved.
2
3 #pragma once
4
5 #include <string>
6 #include <utility>
7 #include <vector>
8
9 #include <model/Function.h>
10 #include <model/GenericType.h>
11 #include <model/StructBase.h>
12
13 namespace spice::compiler {
14
15 class Interface : public StructBase {
16 public:
17 // Constructors
18 105 Interface(std::string name, SymbolTableEntry *entry, Scope *scope, std::vector<Function *> methods,
19 std::vector<GenericType> templateTypes, ASTNode *declNode)
20 105 : StructBase(std::move(name), entry, scope, std::move(templateTypes), declNode), methods(std::move(methods)) {}
21
22 // Public methods
23 [[nodiscard]] std::string getScopeName() const;
24 static std::string getScopeName(const std::string &name, const QualTypeList &concreteTemplateTypes = {});
25
26 // Public members
27 std::vector<Function *> methods;
28 };
29
30 } // namespace spice::compiler
31