object-introspection/types/f14_node_set.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.0 KiB
TOML
Raw Normal View History

2022-12-19 14:37:51 +00:00
[info]
type_name = "folly::F14NodeSet"
stub_template_params = [1,2,3]
2022-12-19 14:37:51 +00:00
ctype = "F14_SET"
header = "folly/container/detail/F14SetFallback.h"
# Old:
typeName = "folly::F14NodeSet<"
2022-12-19 14:37:51 +00:00
ns = ["folly::F14NodeSet"]
numTemplateParams = 1
2022-12-19 14:37:51 +00:00
replaceTemplateParamIndex = [1, 2]
allocatorIndex = 3
[codegen]
decl = """
template <typename Key, typename Hasher, typename KeyEqual, typename Alloc>
void getSizeType(const %1%<Key, Hasher, KeyEqual, Alloc> &container, size_t& returnArg);
"""
func = """
template <typename Key, typename Hasher, typename KeyEqual, typename Alloc>
void getSizeType(const %1%<Key, Hasher, KeyEqual, Alloc> &container, size_t& returnArg)
{
size_t memorySize = container.getAllocatedMemorySize();
SAVE_SIZE(sizeof(%1%<Key, Hasher, KeyEqual, Alloc>) + memorySize);
SAVE_DATA(memorySize);
SAVE_DATA(container.bucket_count());
SAVE_DATA(container.size());
// The double ampersand is needed otherwise this loop doesn't work with vector<bool>
for (auto&& it: container) {
getSizeType(it, returnArg);
}
}
"""