Skip to main content

CorePlotting::LayoutEngine

CorePlotting::LayoutEngine

Main layout engine coordinator. More…

#include <LayoutEngine.hpp>

Public Functions

Name
LayoutEngine(std::unique_ptr< ILayoutStrategy > strategy)
Construct with a specific layout strategy.
LayoutResponse compute(LayoutRequest const & request) const
Compute layout using configured strategy.
void setStrategy(std::unique_ptr< ILayoutStrategy > strategy)
Change layout strategy.

Detailed Description

class CorePlotting::LayoutEngine;

Main layout engine coordinator.

Pure function-based layout computation. No data storage, no global state. Delegates to strategy implementations for actual computation.

This is the evolution of LayoutCalculator, following CorePlotting architecture:

  • Takes LayoutRequest → returns LayoutResponse
  • No series data storage (that lives in widgets)
  • No mutable state (pure calculation)
  • Extensible via Strategy pattern

Public Functions Documentation

function LayoutEngine

explicit LayoutEngine(
    std::unique_ptr< ILayoutStrategy > strategy
)

Construct with a specific layout strategy.

Parameters:

  • strategy Layout algorithm to use (engine takes ownership)

function compute

LayoutResponse compute(
    LayoutRequest const & request
) const

Compute layout using configured strategy.

Parameters:

  • request Layout parameters and series list

Return: Computed layout positions

function setStrategy

void setStrategy(
    std::unique_ptr< ILayoutStrategy > strategy
)

Change layout strategy.

Parameters:

  • strategy New layout algorithm (engine takes ownership)

Updated on 2026-11-13 at 20:25:42 +0000