mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 19:19:05 +01: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.
34 lines
819 B
TOML
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);
|
|
}
|
|
}
|
|
"""
|