SILICON
Toggle main menu visibility
Loading...
Searching...
No Matches
projectCircuitResolver.hpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2026. Giulio Cocconi
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#pragma once
19
20
#include <string>
21
#include <string_view>
22
#include <vector>
23
24
#include <
core/circuitDocument.hpp
>
25
26
namespace
SILICON::project
{
27
class
ProjectContext
;
28
33
class
ProjectCircuitResolver
final :
public
SILICON::core::CircuitResolver
{
34
public
:
35
ProjectCircuitResolver
(
const
ProjectContext
&
project
,
36
const
SILICON::core::ComponentRegistry
&
registry
);
37
38
[[nodiscard]]
SILICON::core::SubcircuitDefinition
39
resolve
(std::string_view slug)
const override
;
40
41
private
:
42
const
ProjectContext
&
project
;
43
const
SILICON::core::ComponentRegistry
&
registry
;
44
mutable
std::vector<std::string>
activeSlugs
;
45
};
46
47
}
// namespace SILICON::project
circuitDocument.hpp
SILICON::core::CircuitResolver
Definition
circuitDocument.hpp:52
SILICON::core::ComponentRegistry
Definition
component_registry.hpp:35
SILICON::project::ProjectCircuitResolver::project
const ProjectContext & project
Definition
projectCircuitResolver.hpp:42
SILICON::project::ProjectCircuitResolver::ProjectCircuitResolver
ProjectCircuitResolver(const ProjectContext &project, const SILICON::core::ComponentRegistry ®istry)
Definition
projectCircuitResolver.cpp:30
SILICON::project::ProjectCircuitResolver::activeSlugs
std::vector< std::string > activeSlugs
Definition
projectCircuitResolver.hpp:44
SILICON::project::ProjectCircuitResolver::resolve
SILICON::core::SubcircuitDefinition resolve(std::string_view slug) const override
Definition
projectCircuitResolver.cpp:37
SILICON::project::ProjectCircuitResolver::registry
const SILICON::core::ComponentRegistry & registry
Definition
projectCircuitResolver.hpp:43
SILICON::project::ProjectContext
Definition
projectContext.hpp:30
SILICON::project
Definition
circuitDependencyGraph.cpp:30
SILICON::core::SubcircuitDefinition
Definition
circuitDocument.hpp:39
src
core
projectCircuitResolver.hpp
Generated by
1.17.0