Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
python.h
Go to the documentation of this file.
1
// === python.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_LIBS_GEN_INCLUDE_SEN_GEN_PYTHON_H
9
#define SEN_LIBS_GEN_INCLUDE_SEN_GEN_PYTHON_H
10
11
#include "
sen/core/base/compiler_macros.h
"
12
#include "
sen/core/lang/stl_resolver.h
"
13
14
#include <memory>
15
#include <string>
16
17
namespace
sen::gen
18
{
19
22
class
PythonGenerator
23
{
24
SEN_NOCOPY_NOMOVE(
PythonGenerator
)
25
26
public
:
27
PythonGenerator
();
28
~PythonGenerator
();
29
32
[[nodiscard]] std::string
generateModule
(
const
sen::lang::TypeSet
& typeSet);
33
36
static
void
replaceInvalidCharacters
(std::string& str);
37
38
private
:
39
class
Impl;
40
std::unique_ptr<Impl> pimpl_;
41
};
42
43
}
// namespace sen::gen
44
45
#endif
// SEN_LIBS_GEN_INCLUDE_SEN_GEN_PYTHON_H
sen::gen::PythonGenerator::PythonGenerator
PythonGenerator()
sen::gen::PythonGenerator::replaceInvalidCharacters
static void replaceInvalidCharacters(std::string &str)
Sanitises a string so it is a valid Python identifier fragment by replacing the characters Python for...
sen::gen::PythonGenerator::~PythonGenerator
~PythonGenerator()
sen::gen::PythonGenerator::generateModule
std::string generateModule(const sen::lang::TypeSet &typeSet)
Renders one Python module for the supplied type set. Imports are derived from the type set's imported...
compiler_macros.h
sen::lang::TypeSet
A set of types coming from a STL file.
Definition
stl_resolver.h:33
sen::gen
Definition
cpp.h:21
stl_resolver.h
libs
gen
include
sen
gen
python.h
Generated by
1.17.0