MochiEngine
Loading...
Searching...
No Matches
Mochi::Graphics::IAnimationFactory Class Referenceabstract

This interface is to implement different ways to generate the animation data depending on the source of the animation data. More...

#include <IAnimationFactory.h>

Inheritance diagram for Mochi::Graphics::IAnimationFactory:
Mochi::Graphics::AsepriteAnimationFactory Mochi::Graphics::DummyAnimationFactory

Public Member Functions

virtual std::shared_ptr< AnimationsDataGetAnimationsData (const std::string &animationDataPath)=0
 Gets the processed animation data of the file on the input path.
virtual void DeleteCache ()=0
 Deletes the animations cache. This should be safe to call anytime because of the shared pointers.
virtual void DeleteAnimation (const std::string &texturePath)=0
 Deletes a specific animation in the cache. This should be safe to call anytime because of the shared pointers.

Detailed Description

This interface is to implement different ways to generate the animation data depending on the source of the animation data.

Member Function Documentation

◆ DeleteAnimation()

virtual void Mochi::Graphics::IAnimationFactory::DeleteAnimation ( const std::string & texturePath)
pure virtual

Deletes a specific animation in the cache. This should be safe to call anytime because of the shared pointers.

Parameters
texturePathPath or unique identifier of the file in the file system.

Implemented in Mochi::Graphics::AsepriteAnimationFactory, and Mochi::Graphics::DummyAnimationFactory.

◆ DeleteCache()

virtual void Mochi::Graphics::IAnimationFactory::DeleteCache ( )
pure virtual

Deletes the animations cache. This should be safe to call anytime because of the shared pointers.

Implemented in Mochi::Graphics::AsepriteAnimationFactory, and Mochi::Graphics::DummyAnimationFactory.

◆ GetAnimationsData()

virtual std::shared_ptr< AnimationsData > Mochi::Graphics::IAnimationFactory::GetAnimationsData ( const std::string & animationDataPath)
pure virtual

Gets the processed animation data of the file on the input path.

Parameters
animationDataPathPath or unique identifier of the file containing the animation data in the file system.
Returns
A shared pointer to the data. This is meant to be saved as a cache.

Implemented in Mochi::Graphics::AsepriteAnimationFactory, and Mochi::Graphics::DummyAnimationFactory.


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