Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
ParameterResolver Class Reference

#include <ParameterResolver.h>

Public Member Functions

 ParameterResolver ()
 
 ~ParameterResolver ()
 
std::vector< ResolvedComponentInstanceResolve (const PrefabBlueprint &prefab, const LevelInstanceParameters &instanceParams)
 

Private Member Functions

ResolvedComponentInstance ResolveComponent (const ComponentDefinition &componentDef, const LevelInstanceParameters &instanceParams)
 
void ApplyPropertyOverride (ResolvedComponentInstance &component, const std::string &propertyName, const ComponentParameter &propertyValue)
 
std::map< std::string, ComponentParameterExtractComponentParameters (const std::string &componentType, const LevelInstanceParameters &instanceParams)
 
ComponentParameter ConvertLevelProperty (const std::string &propertyName, const ComponentParameter &levelProperty, ComponentParameter::Type expectedType)
 
void ValidateResolvedComponent (ResolvedComponentInstance &component)
 

Detailed Description

Definition at line 75 of file ParameterResolver.h.

Constructor & Destructor Documentation

◆ ParameterResolver()

ParameterResolver::ParameterResolver ( )

Definition at line 17 of file ParameterResolver.cpp.

References SYSTEM_LOG.

◆ ~ParameterResolver()

ParameterResolver::~ParameterResolver ( )

Definition at line 22 of file ParameterResolver.cpp.

Member Function Documentation

◆ ApplyPropertyOverride()

void ParameterResolver::ApplyPropertyOverride ( ResolvedComponentInstance component,
const std::string &  propertyName,
const ComponentParameter propertyValue 
)
private

Definition at line 123 of file ParameterResolver.cpp.

References ConvertLevelProperty(), GetComponentTypeID_Static(), ParameterSchemaRegistry::GetInstance(), and SYSTEM_LOG.

Referenced by ResolveComponent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConvertLevelProperty()

ComponentParameter ParameterResolver::ConvertLevelProperty ( const std::string &  propertyName,
const ComponentParameter levelProperty,
ComponentParameter::Type  expectedType 
)
private

◆ ExtractComponentParameters()

std::map< std::string, ComponentParameter > ParameterResolver::ExtractComponentParameters ( const std::string &  componentType,
const LevelInstanceParameters instanceParams 
)
private

Definition at line 157 of file ParameterResolver.cpp.

References GetComponentTypeID_Static(), ParameterSchemaRegistry::GetInstance(), and SYSTEM_LOG.

Referenced by ResolveComponent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Resolve()

std::vector< ResolvedComponentInstance > ParameterResolver::Resolve ( const PrefabBlueprint prefab,
const LevelInstanceParameters instanceParams 
)

Definition at line 26 of file ParameterResolver.cpp.

References GetComponentTypeID_Static(), ResolveComponent(), SYSTEM_LOG, and ValidateResolvedComponent().

Referenced by PrefabFactory::CreateEntityWithOverrides().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResolveComponent()

ResolvedComponentInstance ParameterResolver::ResolveComponent ( const ComponentDefinition componentDef,
const LevelInstanceParameters instanceParams 
)
private

Definition at line 66 of file ParameterResolver.cpp.

References ApplyPropertyOverride(), ExtractComponentParameters(), ComponentParameter::FromFloat(), GetComponentTypeID_Static(), and SYSTEM_LOG.

Referenced by Resolve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValidateResolvedComponent()

void ParameterResolver::ValidateResolvedComponent ( ResolvedComponentInstance component)
private

Definition at line 277 of file ParameterResolver.cpp.

References GetComponentTypeID_Static(), ParameterSchemaRegistry::GetInstance(), SYSTEM_LOG, and ComponentParameter::Unknown.

Referenced by Resolve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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