ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ore_import_planner Class Reference

Produces a fully-stamped ore_import_plan from a scan_result and user-supplied import_choices. More...

#include <ore_import_planner.hpp>

Collaboration diagram for ore_import_planner:
Collaboration graph

Public Member Functions

 ore_import_planner (scanner::scan_result scan_result, std::set< std::string > existing_iso_codes, import_choices choices)
 Constructs the planner.
 
ore_import_plan plan ()
 Builds the import plan.
 

Detailed Description

Produces a fully-stamped ore_import_plan from a scan_result and user-supplied import_choices.

This is a pure-logic class (no network calls). It:

  1. Filters currencies by iso_code against existing_iso_codes when currency_mode == missing_only.
  2. Uses ore_hierarchy_builder to derive portfolios and books from the portfolio file paths, optionally prepending a parent portfolio.
  3. Calls importer::import_portfolio_with_context for each book's source files and stamps the resulting trades with context fields.

Constructor & Destructor Documentation

◆ ore_import_planner()

ore_import_planner ( scanner::scan_result  scan_result,
std::set< std::string >  existing_iso_codes,
import_choices  choices 
)
explicit

Constructs the planner.

Parameters
scan_resultResult of ore_directory_scanner::scan().
existing_iso_codesISO codes already present in the database.
choicesUser-supplied import options.

Member Function Documentation

◆ plan()

ore_import_plan plan ( )

Builds the import plan.

Pure function — safe to call multiple times (each call re-runs the hierarchy builder and re-imports trades).

Returns
Fully-populated ore_import_plan ready for batch saves.