MCPcopy Create free account
hub / github.com/apache/fory / collect_union_includes

Method collect_union_includes

compiler/fory_compiler/generators/cpp.py:385–397  ·  view source on GitHub ↗

Collect includes for a union and its cases.

(self, union: Union, includes: Set[str])

Source from the content-addressed store, hash-verified

383 self.collect_union_includes(nested_union, includes)
384
385 def collect_union_includes(self, union: Union, includes: Set[str]):
386 """Collect includes for a union and its cases."""
387 for field in union.fields:
388 self.collect_includes(
389 field.field_type,
390 False,
391 False,
392 includes,
393 field.element_optional,
394 field.element_ref,
395 False,
396 False,
397 )
398
399 def generate_forward_declarations(self, lines: List[str]):
400 """Generate forward declarations for top-level messages."""

Callers 2

generate_headerMethod · 0.95

Calls 1

collect_includesMethod · 0.95

Tested by

no test coverage detected