#include <iFactory.h>
Inherited by igor::iAnimationFactory, igor::iMaterialFactory, igor::iModelFactory, igor::iShaderMaterialFactory, igor::iSoundFactory, igor::iSpriteFactory, and igor::iTextureFactory.
represents a factory that can process resources
◆ iFactory()
igor::iFactory::iFactory |
( |
const iaString & |
type, |
|
|
const std::vector< iaString > & |
supportedExtensions |
|
) |
| |
|
inline |
◆ ~iFactory()
virtual igor::iFactory::~iFactory |
( |
| ) |
|
|
virtualdefault |
◆ createResource() [1/2]
creates an empty resource
- Returns
- new resource
◆ createResource() [2/2]
creates a resource object
- Parameters
-
name | the name of the resource |
parameters | the resource parameters |
- Returns
- new resource
◆ deinit()
virtual void igor::iFactory::deinit |
( |
| ) |
|
|
inlineprotectedvirtual |
called once before unregistration from resource manager
◆ getHashData()
- Returns
- resource type specific hash data based on given parameters
- Parameters
-
parameters | the given parameters |
◆ getSupportedExtensions()
const std::vector< iaString > & igor::iFactory::getSupportedExtensions |
( |
| ) |
const |
|
inline |
- Returns
- supported file extensions or subtypes
◆ getType()
const iaString & igor::iFactory::getType |
( |
| ) |
const |
|
inline |
- Returns
- the factory type
this type is used to register with the resource manager
◆ init()
virtual void igor::iFactory::init |
( |
| ) |
|
|
inlineprotectedvirtual |
called once after registration to resource manager
◆ loadResource()
virtual bool igor::iFactory::loadResource |
( |
iResourcePtr |
resource | ) |
|
|
protectedpure virtual |
loads the resource based on it's parameters
- Parameters
-
resource | the resource to load |
- Returns
- true if loading the resource was successful
◆ saveResource()
exports the resource based on it's parameters
this needs to be a valid resource with a valid source parameter
- Parameters
-
resource | the resource to save |
filename | optional filename if resource is to be saved in a new location |
- Returns
- true if saving the resource was successful
◆ unloadResource()
virtual void igor::iFactory::unloadResource |
( |
iResourcePtr |
resource | ) |
|
|
protectedpure virtual |
unloads the resource
- Parameters
-
resource | the resource to unload |
◆ iResourceManager
◆ _supportedExtensions
std::vector<iaString> igor::iFactory::_supportedExtensions |
|
protected |
supported file extensions or subtypes
◆ _type
The documentation for this class was generated from the following file:
- /home/maddin/dev/Igor/src/igor/igor/resources/iFactory.h