Dev Essential  1.6.3
Loading...
Searching...
No Matches
ddl::mapping::Engine Class Reference

Mapping engine base class. More...

#include <mapping_engine.h>

Inherited by ddl::mapping::DefaultEngine.

Classes

struct  TargetDataTrigger
 Target data trigger definitions. More...
 
struct  TargetSourceTrigger
 Target source trigger definitions. More...
 
struct  TargetTimeTrigger
 Target time trigger definitions. More...
 

Public Member Functions

 Engine (MapperFactories mapper_factories)
 
void create (const MappingConfiguration &configuration)
 Creates an engine with the given configuration.
 
void create (const std::string &mapping_file)
 Creates an engine with the given configuration file path.
 
void create (const MappingConfiguration &configuration, ddl::DataDefinition dd)
 Creates an engine with the given configuration. This method is there for legacy reasons to load mapping configurations 1.0, 2.0 or greater.
 
void create (const std::string &mapping_file, const std::string &dd_file)
 Creates an engine with the given configuration file path and data definition. This method is there for legacy reasons to load mapping configurations 1.0, 2.0 or greater.
 

Static Public Attributes

static constexpr auto property_time_strategy = "time_strategy"
 

Protected Member Functions

virtual void addSource (std::shared_ptr< Source >, std::shared_ptr< Updateable >)
 Callback function to inform about a source that is about to be added to the engine.
 
virtual void addTarget (std::shared_ptr< Target >)
 Callback function to inform about a target that is about to be added to the engine.
 
virtual void addTimeTrigger (TargetTimeTrigger)
 Callback function to inform about a time trigger that is about to be added to the engine.
 
virtual void addSourceTrigger (TargetSourceTrigger)
 Callback function to inform about a source trigger that is about to be added to the engine.
 
virtual void addDataTrigger (TargetDataTrigger)
 Callback function to inform about a source data trigger that is about to be added to the engine.
 

Protected Attributes

std::unique_ptr< Mapper_mapper
 the mapper to initialize
 
MapperFactories _factories
 the factories to use for creating source, target, function instances
 
std::optional< ddl::DataDefinition_global_dd
 the mapping 1.0 global legacy data definition
 

Detailed Description

Mapping engine base class.

Constructor & Destructor Documentation

◆ Engine()

ddl::mapping::Engine::Engine ( MapperFactories mapper_factories)

CTOR

Parameters
mapper_factoriesthe mapping factories to create source, target and function instances.

Member Function Documentation

◆ addDataTrigger()

virtual void ddl::mapping::Engine::addDataTrigger ( TargetDataTrigger )
inlineprotectedvirtual

Callback function to inform about a source data trigger that is about to be added to the engine.

See also
TargetDataTrigger

◆ addSourceTrigger()

virtual void ddl::mapping::Engine::addSourceTrigger ( TargetSourceTrigger )
inlineprotectedvirtual

Callback function to inform about a source trigger that is about to be added to the engine.

See also
TargetSourceTrigger

◆ addTimeTrigger()

virtual void ddl::mapping::Engine::addTimeTrigger ( TargetTimeTrigger )
inlineprotectedvirtual

Callback function to inform about a time trigger that is about to be added to the engine.

See also
TargetTimeTrigger

◆ create() [1/4]

void ddl::mapping::Engine::create ( const MappingConfiguration & configuration)

Creates an engine with the given configuration.

Parameters
configurationThe mapping configuration with at least version 2.0.
Remarks
Mapping configuration with legacy mapping version 1.0 needs a global data definition to initialize. See legacy create methods.
Exceptions
Forconfiguration errors it throws std::runtime_error

◆ create() [2/4]

void ddl::mapping::Engine::create ( const MappingConfiguration & configuration,
ddl::DataDefinition dd )

Creates an engine with the given configuration. This method is there for legacy reasons to load mapping configurations 1.0, 2.0 or greater.

Parameters
configurationThe mapping configuration
ddA global data definition needed for mapping configurations with mapping version 1.0
Exceptions
Forconfiguration errors it throws std::runtime_error

◆ create() [3/4]

void ddl::mapping::Engine::create ( const std::string & mapping_file)

Creates an engine with the given configuration file path.

Parameters
mapping_fileThe mapping configuration file with at least version 2.0.
Remarks
Mapping configuration with legacy mapping version 1.0 needs a global data definition to initialize. See legacy create methods.
Exceptions
Forconfiguration errors it throws std::runtime_error

◆ create() [4/4]

void ddl::mapping::Engine::create ( const std::string & mapping_file,
const std::string & dd_file )

Creates an engine with the given configuration file path and data definition. This method is there for legacy reasons to load mapping configurations 1.0, 2.0 or greater.

Parameters
mapping_fileThe mapping configuration file to read
dd_fileA global data definition file needed for mapping configurations with mapping version 1.0
Exceptions
Forconfiguration errors it throws std::runtime_error

Member Data Documentation

◆ property_time_strategy

auto ddl::mapping::Engine::property_time_strategy = "time_strategy"
staticconstexpr

additional property for a trigger


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