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:
30 FomParser(const std::vector<std::filesystem::path>& paths,
31 const std::vector<std::filesystem::path>& mappings,
32 const TypeSettings& settings);
34
35public:
41
44
45 [[nodiscard]] const lang::TypeSet& getRootTypeSet() const& noexcept;
46
47private:
48 struct FomParserImpl;
49 std::unique_ptr<FomParserImpl> pimpl_;
50};
51
52inline TypeSetContext parseFomDocuments(const std::vector<std::filesystem::path>& paths,
53 const std::vector<std::filesystem::path>& mappings,
54 const TypeSettings& settings)
55{
56 sen::lang::FomParser documents(paths, mappings, settings);
57 return std::move(documents).convertToCompleteTypeSetContext();
58}
59
61
62} // namespace sen::lang
63
64#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 > &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:51
TypeSetContext parseFomDocuments(const std::vector< std::filesystem::path > &paths, const std::vector< std::filesystem::path > &mappings, const TypeSettings &settings)
Definition fom_parser.h:52
A set of types coming from a STL file.
Definition stl_resolver.h:33
Definition code_location.h:14
STL namespace.
Definition stl_resolver.h:95