CPGen
C++ project generator
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ProjectResolver Class Reference

Converts a ProjectConfig into a fully resolved ResolvedProject. More...

#include <ProjectResolver.hpp>

Public Member Functions

 ProjectResolver ()
 Construct a ProjectResolver with a default ModuleResolver.
 
ResolvedProject resolve (const ProjectConfig &config)
 Run the full resolution pipeline for config.
 

Detailed Description

Converts a ProjectConfig into a fully resolved ResolvedProject.

Internally owns a ModuleResolver and delegates per-module lookups to it. Target deduplication is handled via std::unordered_set<ResolvedTarget> (uses the name-based hash/equality defined in Resolved.hpp).

Constructor & Destructor Documentation

◆ ProjectResolver()

ProjectResolver::ProjectResolver ( )

Construct a ProjectResolver with a default ModuleResolver.

Exceptions
std::runtime_errorIf the underlying ModuleResolver cannot find any template search path.

Member Function Documentation

◆ resolve()

ResolvedProject ProjectResolver::resolve ( const ProjectConfig config)

Run the full resolution pipeline for config.

For each module name in config.modules:

  1. Calls ModuleResolver::resolveModule to parse the module's JSON.
  2. Calls buildTarget for each TargetInjection the module produces.
  3. Inserts deduplicated targets into the result.
Parameters
configParsed project configuration from the CLI or TUI.
Returns
A ResolvedProject containing the original config, all resolved modules, deduplicated targets, and raw injections.
Exceptions
std::runtime_errorIf any requested module cannot be found.

The documentation for this class was generated from the following files: