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
:
30
FomParser
(
const
std::vector<std::filesystem::path>& paths,
31
const
std::vector<std::filesystem::path>& mappings,
32
const
TypeSettings
& settings);
33
~FomParser
();
34
35
public
:
40
TypeSetContext
computeTypeSets
();
41
43
TypeSetContext
convertToCompleteTypeSetContext
() &&;
44
45
[[nodiscard]]
const
lang::TypeSet
&
getRootTypeSet
() const& noexcept;
46
47
private:
48
struct FomParserImpl;
49
std
::unique_ptr<FomParserImpl> pimpl_;
50
};
51
52
inline
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
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 > &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:51
sen::lang::parseFomDocuments
TypeSetContext parseFomDocuments(const std::vector< std::filesystem::path > &paths, const std::vector< std::filesystem::path > &mappings, const TypeSettings &settings)
Definition
fom_parser.h:52
sen::lang::TypeSet
A set of types coming from a STL file.
Definition
stl_resolver.h:33
sen::lang
Definition
code_location.h:14
std
STL namespace.
stl_resolver.h
sen::lang::TypeSettings
Definition
stl_resolver.h:95
libs
core
include
sen
core
lang
fom_parser.h
Generated by
1.17.0