mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
ContainerInfo: Read "extra" codegen field
This commit is contained in:
parent
4e80dace1a
commit
1f66ef064a
@ -269,6 +269,10 @@ ContainerInfo::ContainerInfo(const fs::path& path) {
|
||||
codegenToml["traversal_func"].value<std::string>()) {
|
||||
codegen.traversalFunc = std::move(*str);
|
||||
}
|
||||
if (std::optional<std::string> str =
|
||||
codegenToml["extra"].value<std::string>()) {
|
||||
codegen.extra = std::move(*str);
|
||||
}
|
||||
|
||||
if (toml::array* arr = codegenToml["processor"].as_array()) {
|
||||
codegen.processors.reserve(arr->size());
|
||||
|
@ -37,6 +37,7 @@ struct ContainerInfo {
|
||||
std::string func;
|
||||
std::string handler = "";
|
||||
std::string traversalFunc = "";
|
||||
std::string extra = "";
|
||||
std::vector<Processor> processors{};
|
||||
};
|
||||
|
||||
|
@ -48,6 +48,12 @@ This document describes the format of the container definition files contained i
|
||||
`static types::st::Unit<DB> getSizeType(const T& container, ST returnArg)`
|
||||
where `ST` defines the combined static type of each supplied processor.
|
||||
|
||||
- `extra`
|
||||
|
||||
Any extra C++ code to be included directly. This code is not automatically
|
||||
wrapped in a namespace, so definitions from different container TOML files
|
||||
will collide if they share the same name.
|
||||
|
||||
|
||||
## Changes introduced with Typed Data Segment
|
||||
- `decl` and `func` fields are ignored when using `-ftyped-data-segment` and the
|
||||
|
Loading…
Reference in New Issue
Block a user