GCC Code Coverage Report


Directory: ../
File: src/model/Struct.h
Date: 2024-12-24 01:17:15
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // Copyright (c) 2021-2024 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 540 Struct(std::string name, SymbolTableEntry *entry, Scope *scope, QualTypeList fieldTypes, std::vector<GenericType> templateTypes,
18 QualTypeList interfaceTypes, ASTNode *declNode)
19 1080 : StructBase(std::move(name), entry, scope, std::move(templateTypes), declNode), fieldTypes(std::move(fieldTypes)),
20 1620 interfaceTypes(std::move(interfaceTypes)) {}
21
22 // Public methods
23 [[nodiscard]] bool hasReferenceFields() const;
24
25 // Public members
26 QualTypeList fieldTypes;
27 QualTypeList interfaceTypes;
28 };
29
30 } // namespace spice::compiler
31