Sen API
Sen Libraries
Toggle main menu visibility
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
11
#include "
sen/core/lang/stl_resolver.h
"
12
13
// std
14
#include <filesystem>
15
#include <vector>
16
17
namespace
sen::lang
18
{
19
22
24
class
FomParser
25
{
26
SEN_NOCOPY_NOMOVE(
FomParser
)
27
28
public
:
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);
38
~FomParser
();
39
40
public
:
45
TypeSetContext
computeTypeSets
();
46
48
TypeSetContext
convertToCompleteTypeSetContext
() &&;
49
50
[[nodiscard]]
const
lang::TypeSet
&
getRootTypeSet
() const& noexcept;
51
52
private:
53
struct FomParserImpl;
54
std
::unique_ptr<FomParserImpl> pimpl_;
55
};
56
57
inline
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
sen::lang::FomParser
Parses HLA FOM files.
Definition
fom_parser.h:25
sen::lang::FomParser::getRootTypeSet
const lang::TypeSet & getRootTypeSet() const &noexcept
sen::lang::FomParser::FomParser
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.
sen::lang::FomParser::~FomParser
~FomParser()
sen::lang::FomParser::convertToCompleteTypeSetContext
TypeSetContext convertToCompleteTypeSetContext() &&
Computes all underlying type sets and returns a complete TypeSetContext including the current root Ty...
sen::lang::FomParser::computeTypeSets
TypeSetContext computeTypeSets()
Computes all underlying type sets and puts them into a TypeSetContext.
sen::lang::TypeSetContext
The set of types used during resolution.
Definition
stl_resolver.h:52
sen::lang::parseFomDocuments
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
sen::lang::TypeSet
A set of types coming from a STL file.
Definition
stl_resolver.h:34
sen::lang
Definition
code_location.h:14
std
STL namespace.
stl_resolver.h
sen::lang::TypeSettings
Definition
stl_resolver.h:103
libs
core
include
sen
core
lang
fom_parser.h
Generated by
1.17.0