mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
68290655b1
This change is fully backwards compatible with the old ContainerInfo parser, as it is just adding new fields. The old fields will continue to be used by legacy OICodeGen until that is removed. Also add a README to document the format.
28 lines
566 B
TOML
28 lines
566 B
TOML
[info]
|
|
type_name = "std::pair"
|
|
ctype = "PAIR_TYPE"
|
|
header = "utility"
|
|
|
|
# Old:
|
|
typeName = "std::pair<"
|
|
ns = ["namespace std"]
|
|
numTemplateParams = 2
|
|
replaceTemplateParamIndex = []
|
|
|
|
[codegen]
|
|
decl = """
|
|
template<typename P, typename Q>
|
|
void getSizeType(const %1%<P,Q> &container, size_t& returnArg);
|
|
"""
|
|
|
|
func = """
|
|
template<typename P, typename Q>
|
|
void getSizeType(const %1%<P,Q> &container, size_t& returnArg)
|
|
{
|
|
SAVE_SIZE(sizeof(%1%<P,Q>) - sizeof(P) - sizeof(Q));
|
|
|
|
getSizeType(container.first, returnArg);
|
|
getSizeType(container.second, returnArg);
|
|
}
|
|
"""
|