SILICON
Toggle main menu visibility
Loading...
Searching...
No Matches
projectSession.cpp
Go to the documentation of this file.
1
#include "
projectSession.hpp
"
2
3
#include <ranges>
4
5
namespace
SILICON::ui
{
6
7
std::optional<std::string>
8
ProjectSession::firstCircuitPath
(
const
std::string_view excludedPath)
const
9
{
10
const
auto
& documents =
projectContext
.documents().getDocuments();
11
const
auto
circuit = std::ranges::find_if(documents, [excludedPath](
const
auto
& d) {
12
return
d.getType() ==
SILICON::project::DocumentType::Circuit
13
&& d.getPath() != excludedPath;
14
});
15
if
(circuit == documents.end())
16
return
std::nullopt;
17
return
circuit->getPath();
18
}
19
20
}
// namespace SILICON::ui
SILICON::project::DocumentType::Circuit
@ Circuit
Definition
projectDocument.hpp:37
SILICON::ui
Definition
actionGroups.hpp:14
projectSession.hpp
SILICON::ui::ProjectSession::projectContext
SILICON::project::ProjectContext projectContext
Definition
projectSession.hpp:32
SILICON::ui::ProjectSession::firstCircuitPath
std::optional< std::string > firstCircuitPath(std::string_view excludedPath={}) const
Definition
projectSession.cpp:8
src
ui
project
projectSession.cpp
Generated by
1.17.0