object-introspection/types/boost_bimap_type.toml
Alastair Robertson 68290655b1 TypeGraph: Update container TOML files to new format
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.
2023-05-26 18:21:59 +01:00

34 lines
819 B
TOML

[info]
type_name = "boost::bimap"
ctype = "BOOST_BIMAP_TYPE"
header = "boost/bimap.hpp"
# Old:
numTemplateParams = 2
typeName = "boost::bimap"
ns = ["boost::bimap"]
[codegen]
decl = """
template <class KeyTypeA, class KeyTypeB, class AP1, class AP2, class AP3>
void getSizeType(const %1%<KeyTypeA, KeyTypeB, AP1, AP2, AP3> &container,
size_t& returnArg);
"""
func = """
template <class KeyTypeA, class KeyTypeB, class AP1, class AP2, class AP3>
void getSizeType(const %1%<KeyTypeA, KeyTypeB, AP1, AP2, AP3> &container,
size_t& returnArg)
{
SAVE_SIZE(sizeof(%1%<KeyTypeA, KeyTypeB, AP1, AP2, AP3>));
SAVE_DATA((uintptr_t)container.size());
for (auto const& it: container) {
getSizeType(it.left, returnArg);
getSizeType(it.right, returnArg);
}
}
"""