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

#include <InputConfigLoader.h>

Public Member Functions

 InputConfigLoader ()=default
 
 ~InputConfigLoader ()=default
 
bool LoadInputConfig (const std::string &path)
 
bool LoadEngineConfig (const std::string &path)
 
bool LoadProfileOverride (const std::string &path)
 
bool SaveInputConfig (const std::string &path)
 

Static Public Member Functions

static InputConfigLoaderGet ()
 

Private Member Functions

bool ParseProfiles (const json &j)
 
bool ParseActionMaps (const json &j)
 
bool ParseGlobalSettings (const json &j)
 
bool ParseDefaultAssignments (const json &j)
 
InputBinding ParseInputBinding (const json &j)
 
SDL_Scancode ParseKeyName (const std::string &keyName)
 

Private Attributes

int m_logLevel = 2
 

Detailed Description

Definition at line 20 of file InputConfigLoader.h.

Constructor & Destructor Documentation

◆ InputConfigLoader()

InputConfigLoader::InputConfigLoader ( )
default

◆ ~InputConfigLoader()

InputConfigLoader::~InputConfigLoader ( )
default

Member Function Documentation

◆ Get()

static InputConfigLoader & InputConfigLoader::Get ( )
inlinestatic

Definition at line 26 of file InputConfigLoader.h.

References GetComponentTypeID_Static().

Referenced by InputsManager::InitializeInputSystem().

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

◆ LoadEngineConfig()

bool InputConfigLoader::LoadEngineConfig ( const std::string &  path)

◆ LoadInputConfig()

bool InputConfigLoader::LoadInputConfig ( const std::string &  path)

Definition at line 115 of file InputConfigLoader.cpp.

References GetComponentTypeID_Static(), ParseActionMaps(), ParseDefaultAssignments(), ParseGlobalSettings(), ParseProfiles(), and SYSTEM_LOG.

+ Here is the call graph for this function:

◆ LoadProfileOverride()

bool InputConfigLoader::LoadProfileOverride ( const std::string &  path)

Definition at line 367 of file InputConfigLoader.cpp.

References InputDeviceManager::Get(), GetComponentTypeID_Static(), InputDeviceManager::GetProfile(), m_logLevel, ParseInputBinding(), and SYSTEM_LOG.

Referenced by InputsManager::InitializeInputSystem().

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

◆ ParseActionMaps()

bool InputConfigLoader::ParseActionMaps ( const json j)
private

Definition at line 289 of file InputConfigLoader.cpp.

References InputDeviceManager::AddActionMap(), Editor, Gameplay, InputDeviceManager::Get(), GetComponentTypeID_Static(), m_logLevel, System, SYSTEM_LOG, and UI.

Referenced by LoadInputConfig().

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

◆ ParseDefaultAssignments()

bool InputConfigLoader::ParseDefaultAssignments ( const json j)
private

Definition at line 332 of file InputConfigLoader.cpp.

References InputDeviceManager::Get(), GetComponentTypeID_Static(), Joystick, KeyboardMouse, InputDeviceManager::SetDefaultProfile(), and SYSTEM_LOG.

Referenced by LoadInputConfig().

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

◆ ParseGlobalSettings()

bool InputConfigLoader::ParseGlobalSettings ( const json j)
private

Definition at line 352 of file InputConfigLoader.cpp.

References InputDeviceManager::Get(), GetComponentTypeID_Static(), InputDeviceManager::SetLogLevel(), and SYSTEM_LOG.

Referenced by LoadInputConfig().

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

◆ ParseInputBinding()

InputBinding InputConfigLoader::ParseInputBinding ( const json j)
private

Definition at line 223 of file InputConfigLoader.cpp.

References Axis, Button, GetComponentTypeID_Static(), Key, MouseButton, ParseKeyName(), Stick, Trigger, and InputBinding::type.

Referenced by LoadProfileOverride(), and ParseProfiles().

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

◆ ParseKeyName()

SDL_Scancode InputConfigLoader::ParseKeyName ( const std::string &  keyName)
private

Definition at line 60 of file InputConfigLoader.cpp.

References GetComponentTypeID_Static(), m_logLevel, s_keyNameMap, and SYSTEM_LOG.

Referenced by ParseInputBinding().

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

◆ ParseProfiles()

bool InputConfigLoader::ParseProfiles ( const json j)
private

Definition at line 162 of file InputConfigLoader.cpp.

References InputDeviceManager::AddProfile(), InputDeviceManager::Get(), GetComponentTypeID_Static(), Joystick, KeyboardMouse, m_logLevel, None, ParseInputBinding(), and SYSTEM_LOG.

Referenced by LoadInputConfig().

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

◆ SaveInputConfig()

bool InputConfigLoader::SaveInputConfig ( const std::string &  path)

Definition at line 419 of file InputConfigLoader.cpp.

References SYSTEM_LOG.

Member Data Documentation

◆ m_logLevel

int InputConfigLoader::m_logLevel = 2
private

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