object-introspection/types/sorted_vec_set_type.toml

28 lines
1001 B
TOML

[info]
typeName = "folly::sorted_vector_set<"
ctype = "SORTED_VEC_SET_TYPE"
header = "folly/sorted_vector_types.h"
ns = ["namespace std", "folly::sorted_vector_set"]
replaceTemplateParamIndex = [1,2]
underlyingContainerIndex = 4
[codegen]
decl = """
template <class T, class Compare, class Allocator, class GrowthPolicy, class Container>
void getSizeType(const %1%<T,Compare, Allocator, GrowthPolicy, Container> &container, size_t& returnArg);
"""
func = """
template <class T, class Compare, class Allocator, class GrowthPolicy, class Container>
void getSizeType(const %1%<T,Compare, Allocator, GrowthPolicy, Container> &containerAdapter, size_t& returnArg)
{
SAVE_DATA((uintptr_t)&containerAdapter);
// Underlying container is grabbed by recursion, store only the exclusive size.
SAVE_SIZE(sizeof(%1%<T,Compare, Allocator, GrowthPolicy, Container>) - sizeof(Container));
const Container &container = containerAdapter.get_container();
getSizeType(container, returnArg);
}
"""