MCPcopy Create free account
hub / github.com/apache/trafficserver / initRecurseSuper

Function initRecurseSuper

include/tscore/Extendible.h:624–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622 /// recursively init all extendible structures, and construct fields
623 template <typename Derived_t>
624 uintptr_t
625 initRecurseSuper(Derived_t &derived, uintptr_t tail_ptr /*= 0*/)
626 {
627 // track a tail pointer, that starts after the class, and iterate each extendible block
628 if constexpr (has_super_type<Derived_t>::value) {
629 // init super type, move tail pointer
630 tail_ptr = initRecurseSuper<typename Derived_t::super_type>(derived, tail_ptr);
631 }
632 if constexpr (std::is_base_of<Extendible<Derived_t>, Derived_t>::value) {
633 // set start for this extendible block after the previous extendible, and move tail pointer to after this block
634 tail_ptr = derived.Extendible<Derived_t>::initFields(tail_ptr);
635 }
636 return tail_ptr;
637 }
638
639} // namespace details
640

Callers 1

createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected