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

#include <AnimationBank.h>

Public Member Functions

 AnimationBank ()=default
 
 ~AnimationBank ()=default
 
bool LoadFromFile (const std::string &filePath)
 
AnimationGetAnimation (const std::string &name)
 
const AnimationGetAnimation (const std::string &name) const
 
SpriteSheetGetSpriteSheet (const std::string &id)
 
const SpriteSheetGetSpriteSheet (const std::string &id) const
 
const std::string & GetBankName () const
 
bool IsValid () const
 

Private Member Functions

bool ParseJSON (const std::string &jsonContent)
 

Private Attributes

std::string m_bankName
 
std::string m_description
 
bool m_isValid = false
 
std::unordered_map< std::string, SpriteSheetm_spritesheets
 
std::unordered_map< std::string, Animationm_animations
 

Detailed Description

Definition at line 84 of file AnimationBank.h.

Constructor & Destructor Documentation

◆ AnimationBank()

OlympeAnimation::AnimationBank::AnimationBank ( )
default

◆ ~AnimationBank()

OlympeAnimation::AnimationBank::~AnimationBank ( )
default

Member Function Documentation

◆ GetAnimation() [1/2]

Animation * OlympeAnimation::AnimationBank::GetAnimation ( const std::string &  name)

Definition at line 130 of file AnimationBank.cpp.

References GetComponentTypeID_Static(), and m_animations.

Referenced by OlympeAnimation::AnimationManager::HasAnimation().

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

◆ GetAnimation() [2/2]

const Animation * OlympeAnimation::AnimationBank::GetAnimation ( const std::string &  name) const

Definition at line 138 of file AnimationBank.cpp.

References GetComponentTypeID_Static(), and m_animations.

+ Here is the call graph for this function:

◆ GetBankName()

const std::string & OlympeAnimation::AnimationBank::GetBankName ( ) const
inline

Definition at line 102 of file AnimationBank.h.

References m_bankName.

◆ GetSpriteSheet() [1/2]

SpriteSheet * OlympeAnimation::AnimationBank::GetSpriteSheet ( const std::string &  id)

Definition at line 146 of file AnimationBank.cpp.

References GetComponentTypeID_Static(), and m_spritesheets.

+ Here is the call graph for this function:

◆ GetSpriteSheet() [2/2]

const SpriteSheet * OlympeAnimation::AnimationBank::GetSpriteSheet ( const std::string &  id) const

Definition at line 154 of file AnimationBank.cpp.

References GetComponentTypeID_Static(), and m_spritesheets.

+ Here is the call graph for this function:

◆ IsValid()

bool OlympeAnimation::AnimationBank::IsValid ( ) const
inline

Definition at line 105 of file AnimationBank.h.

References m_isValid.

◆ LoadFromFile()

bool OlympeAnimation::AnimationBank::LoadFromFile ( const std::string &  filePath)

Definition at line 20 of file AnimationBank.cpp.

References GetComponentTypeID_Static(), JsonHelper::LoadJsonFromFile(), ParseJSON(), and SYSTEM_LOG.

+ Here is the call graph for this function:

◆ ParseJSON()

bool OlympeAnimation::AnimationBank::ParseJSON ( const std::string &  jsonContent)
private

Member Data Documentation

◆ m_animations

std::unordered_map<std::string, Animation> OlympeAnimation::AnimationBank::m_animations
private

Definition at line 113 of file AnimationBank.h.

Referenced by GetAnimation(), GetAnimation(), and ParseJSON().

◆ m_bankName

std::string OlympeAnimation::AnimationBank::m_bankName
private

Definition at line 108 of file AnimationBank.h.

Referenced by GetBankName(), and ParseJSON().

◆ m_description

std::string OlympeAnimation::AnimationBank::m_description
private

Definition at line 109 of file AnimationBank.h.

Referenced by ParseJSON().

◆ m_isValid

bool OlympeAnimation::AnimationBank::m_isValid = false
private

Definition at line 110 of file AnimationBank.h.

Referenced by IsValid(), and ParseJSON().

◆ m_spritesheets

std::unordered_map<std::string, SpriteSheet> OlympeAnimation::AnimationBank::m_spritesheets
private

Definition at line 112 of file AnimationBank.h.

Referenced by GetSpriteSheet(), GetSpriteSheet(), and ParseJSON().


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