MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / cppClassExists

Function cppClassExists

src/resolution/name-matcher.ts:802–807  ·  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

800
801/** Does the graph contain a class/struct named `name`'s last segment? */
802function cppClassExists(name: string, ref: UnresolvedRef, context: ResolutionContext): boolean {
803 const last = cppLastSegment(name);
804 return context
805 .getNodesByName(last)
806 .some((n) => (n.kind === 'class' || n.kind === 'struct') && n.language === ref.language);
807}
808
809/**
810 * 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