MCPcopy
hub / github.com/colbymchenry/codegraph / cppClassExists

Function cppClassExists

src/resolution/name-matcher.ts:716–721  ·  view source on GitHub ↗

Does the graph contain a class/struct named `name`'s last segment?

(name: string, ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

714
715/** Does the graph contain a class/struct named `name`'s last segment? */
716function cppClassExists(name: string, ref: UnresolvedRef, context: ResolutionContext): boolean {
717 const last = cppLastSegment(name);
718 return context
719 .getNodesByName(last)
720 .some((n) => (n.kind === 'class' || n.kind === 'struct') && n.language === ref.language);
721}
722
723/**
724 * Infer the class produced by a C++ call/construction expression, using return

Callers 1

resolveCppCallResultTypeFunction · 0.85

Calls 2

cppLastSegmentFunction · 0.85
getNodesByNameMethod · 0.65

Tested by

no test coverage detected