# `orchestrator.pkg.cpp_extractor`
<!-- generated by `orchestrator understand`; the PKG is source of truth, edits here are advisory -->

[← Episteme](../README.md) · [Architecture](../architecture.md)

**Source:** [`src/orchestrator/pkg/cpp_extractor.py`](../../src/orchestrator/pkg/cpp_extractor.py)

2 types · 10 functions · python

## Changing this safely

**Tested by** (1): `tests.pkg.test_cpp_extractor`

**Most depended-upon here** — a change to these reaches the most code (call graph, ≤4 hops):

- [`_qualified_text`](../../src/orchestrator/pkg/cpp_extractor.py#L469) — reaches **8** symbols · **no test path visible**
- [`CppExtractor`](../../src/orchestrator/pkg/cpp_extractor.py#L57) — reaches **6** symbols
- [`_join`](../../src/orchestrator/pkg/cpp_extractor.py#L505) — reaches **5** symbols · **no test path visible**
- [`_base_types`](../../src/orchestrator/pkg/cpp_extractor.py#L493) — reaches **4** symbols · **no test path visible**
- [`_cpp_parser`](../../src/orchestrator/pkg/cpp_extractor.py#L515) — reaches **4** symbols
- [`_member`](../../src/orchestrator/pkg/cpp_extractor.py#L343) — reaches **4** symbols · **no test path visible**
- [`_qual_name`](../../src/orchestrator/pkg/cpp_extractor.py#L511) — reaches **4** symbols · **no test path visible**
- [`_declared_name`](../../src/orchestrator/pkg/cpp_extractor.py#L364) — reaches **3** symbols · **no test path visible**

_10 of the symbols other code depends on here have no test path the graph can see — worth a second look before changing them. Absence of a path is not proof of absence of a test: calls through an attribute chain (`obj.method()`) are skipped rather than guessed at, so indirect coverage is invisible._

## Types

### `CppExtractor`

[`src/orchestrator/pkg/cpp_extractor.py:57`](../../src/orchestrator/pkg/cpp_extractor.py#L57)

- **Called by** (1 production · 1 test): [`default_extractors`](../../src/orchestrator/pkg/extractor.py#L530), [`_extract`](../../tests/pkg/test_cpp_extractor.py#L19)
- **Fields**: `language`, `suffixes`
- **Documented in**: `docs/specs/language-support-roadmap.md#track-3-c-cpp-cc-cxx-hpp-hh-hxx-do-third-builds-on-c`

### `_Ctx`

[`src/orchestrator/pkg/cpp_extractor.py:316`](../../src/orchestrator/pkg/cpp_extractor.py#L316)

- **Called by** (1): [`extract`](../../src/orchestrator/pkg/cpp_extractor.py#L66)
- **Fields**: `batch`, `free_funcs`, `funcs`, `module_id`, `path`, `rel`, `source`, `type_methods`

## Functions

### `_base_types`

[`src/orchestrator/pkg/cpp_extractor.py:493`](../../src/orchestrator/pkg/cpp_extractor.py#L493)

- **Called by** (1): [`_emit_type`](../../src/orchestrator/pkg/cpp_extractor.py#L148)
- **Calls** (1): [`_qualified_text`](../../src/orchestrator/pkg/cpp_extractor.py#L469)

### `_bound_names`

[`src/orchestrator/pkg/cpp_extractor.py:390`](../../src/orchestrator/pkg/cpp_extractor.py#L390)

- **Called by** (1): [`_calls`](../../src/orchestrator/pkg/cpp_extractor.py#L287)
- **Calls** (1): [`_declared_name`](../../src/orchestrator/pkg/cpp_extractor.py#L364)

### `_cpp_parser`

[`src/orchestrator/pkg/cpp_extractor.py:515`](../../src/orchestrator/pkg/cpp_extractor.py#L515)

- **Called by** (2): [`_parser_for`](../../src/orchestrator/pkg/scope.py#L466), [`extract`](../../src/orchestrator/pkg/cpp_extractor.py#L66)
- **Calls** (3): `language`, `tree_sitter.Language`, `tree_sitter.Parser`

### `_declared_name`

[`src/orchestrator/pkg/cpp_extractor.py:364`](../../src/orchestrator/pkg/cpp_extractor.py#L364)

- **Called by** (1): [`_bound_names`](../../src/orchestrator/pkg/cpp_extractor.py#L390)
- **Calls** (1): [`_text`](../../src/orchestrator/pkg/c_extractor.py#L491)

### `_join`

[`src/orchestrator/pkg/cpp_extractor.py:505`](../../src/orchestrator/pkg/cpp_extractor.py#L505)

- **Called by** (4): [`_declaration`](../../src/orchestrator/pkg/cpp_extractor.py#L247), [`_emit_type`](../../src/orchestrator/pkg/cpp_extractor.py#L148), [`_function_def`](../../src/orchestrator/pkg/cpp_extractor.py#L214), [`_walk`](../../src/orchestrator/pkg/cpp_extractor.py#L88)

### `_member`

[`src/orchestrator/pkg/cpp_extractor.py:343`](../../src/orchestrator/pkg/cpp_extractor.py#L343)

- **Called by** (1): [`_emit_type`](../../src/orchestrator/pkg/cpp_extractor.py#L148)
- **Calls** (3): [`Edge`](../../src/orchestrator/pkg/facts.py#L137), [`Node`](../../src/orchestrator/pkg/facts.py#L121), [`Provenance`](../../src/orchestrator/pkg/facts.py#L81)

### `_qual_name`

[`src/orchestrator/pkg/cpp_extractor.py:511`](../../src/orchestrator/pkg/cpp_extractor.py#L511)

- **Called by** (1): [`_emit_type`](../../src/orchestrator/pkg/cpp_extractor.py#L148)

### `_qualified_text`

[`src/orchestrator/pkg/cpp_extractor.py:469`](../../src/orchestrator/pkg/cpp_extractor.py#L469)

- **Called by** (3): [`_base_types`](../../src/orchestrator/pkg/cpp_extractor.py#L493), [`_function_def`](../../src/orchestrator/pkg/cpp_extractor.py#L214), [`_resolve_callee`](../../src/orchestrator/pkg/cpp_extractor.py#L445)
- **Calls** (1): [`_text`](../../src/orchestrator/pkg/c_extractor.py#L491)

### `_resolve_callee`

[`src/orchestrator/pkg/cpp_extractor.py:445`](../../src/orchestrator/pkg/cpp_extractor.py#L445)

- **Called by** (1): [`_calls`](../../src/orchestrator/pkg/cpp_extractor.py#L287)
- **Calls** (2): [`_qualified_text`](../../src/orchestrator/pkg/cpp_extractor.py#L469), [`_text`](../../src/orchestrator/pkg/c_extractor.py#L491)

### `_template_params`

[`src/orchestrator/pkg/cpp_extractor.py:477`](../../src/orchestrator/pkg/cpp_extractor.py#L477)

- **Called by** (1): [`_walk`](../../src/orchestrator/pkg/cpp_extractor.py#L88)
- **Calls** (1): [`_text`](../../src/orchestrator/pkg/c_extractor.py#L491)

## Imports

`__future__.annotations`, [`orchestrator.pkg.c_extractor`](orchestrator.pkg.c_extractor.md), [`orchestrator.pkg.extractor`](../../src/orchestrator/pkg/extractor.py#L1), [`orchestrator.pkg.facts`](../../src/orchestrator/pkg/facts.py#L1), `pathlib.Path`, `tree_sitter.Language`, `tree_sitter.Node`, `tree_sitter.Parser`, `tree_sitter_cpp`, `typing.Any`, `typing.TYPE_CHECKING`

## Imported by

[`orchestrator.pkg.extractor`](../../src/orchestrator/pkg/extractor.py#L1), [`orchestrator.pkg.scope`](orchestrator.pkg.scope.md), [`tests.pkg.test_cpp_extractor`](../../tests/pkg/test_cpp_extractor.py#L1)
