GCC Code Coverage Report


Directory: ../
File: src/model/Struct.h
Date: 2025-12-07 00:53:49
Coverage Exec Excl Total
Lines: 100.0% 3 0 3
Functions: 100.0% 1 0 1
Branches: -% 0 0 0

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