Sen API
Sen Libraries
Loading...
Searching...
No Matches
fom_parser.h
Go to the documentation of this file.
1// === fom_parser.h ====================================================================================================
2// Sen Infrastructure
3// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4// See the LICENSE.txt file for more information.
5// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6// =====================================================================================================================
7
8#ifndef SEN_CORE_LANG_FOM_PARSER_H
9#define SEN_CORE_LANG_FOM_PARSER_H
10
12
13// std
14#include <filesystem>
15#include <vector>
16
17namespace sen::lang
18{
19
22
25{
26 SEN_NOCOPY_NOMOVE(FomParser)
27
28public:
34 FomParser(const std::vector<std::filesystem::path>& paths,
35 const std::vector<std::filesystem::path>& extensions,
36 const std::vector<std::filesystem::path>& mappings,
37 const TypeSettings& settings);
39
40public:
46
49
50 [[nodiscard]] const lang::TypeSet& getRootTypeSet() const& noexcept;
51
52private:
53 struct FomParserImpl;
54 std::unique_ptr<FomParserImpl> pimpl_;
55};
56
57inline TypeSetContext parseFomDocuments(const std::vector<std::filesystem::path>& paths,
58 const std::vector<std::filesystem::path>& extensions,
59 const std::vector<std::filesystem::path>& mappings,
60 const TypeSettings& settings)
61{
62 sen::lang::FomParser documents(paths, extensions, mappings, settings);
63 return std::move(documents).convertToCompleteTypeSetContext();
64}
65
67
68} // namespace sen::lang
69
70#endif // SEN_CORE_LANG_FOM_PARSER_H
Parses HLA FOM files.
Definition fom_parser.h:25
const lang::TypeSet & getRootTypeSet() const &noexcept
FomParser(const std::vector< std::filesystem::path > &paths, const std::vector< std::filesystem::path > &extensions, const std::vector< std::filesystem::path > &mappings, const TypeSettings &settings)
Stores the tokens for eventual parsing.
TypeSetContext convertToCompleteTypeSetContext() &&
Computes all underlying type sets and returns a complete TypeSetContext including the current root Ty...
TypeSetContext computeTypeSets()
Computes all underlying type sets and puts them into a TypeSetContext.
The set of types used during resolution.
Definition stl_resolver.h:52
TypeSetContext parseFomDocuments(const std::vector< std::filesystem::path > &paths, const std::vector< std::filesystem::path > &extensions, const std::vector< std::filesystem::path > &mappings, const TypeSettings &settings)
Definition fom_parser.h:57
A set of types coming from a STL file.
Definition stl_resolver.h:34
Definition code_location.h:14
STL namespace.
Definition stl_resolver.h:103