PixelLightAPI
.
|
Abstract loadable (serialization) base class, derive your loadable classes from this class. More...
#include <Loadable.h>
Public Member Functions | |
String | GetFilename () const |
Returns the filename this loadable was given to loaded from. | |
String | GetUrl () const |
Returns the absolute filename this loadable was loaded from. | |
virtual PLCORE_API bool | LoadByFilename (const String &sFilename, const String &sParams="", const String &sMethod="") |
Loads the loadable from a file given by filename. | |
virtual PLCORE_API bool | LoadByFile (File &cFile, const String &sParams="", const String &sMethod="") |
Loads the loadable from a file given by a reference. | |
virtual PLCORE_API bool | SaveByFilename (const String &sFilename, const String &sParams="", const String &sMethod="") |
Saves the loadable to a file given by filename. | |
virtual PLCORE_API bool | SaveByFile (File &cFile, const String &sParams="", const String &sMethod="") |
Saves the loadable to a file given by reference. | |
virtual PLCORE_API bool | Reload () |
Reloads the loadable. | |
virtual PLCORE_API bool | Unload () |
Unloads the loadable. | |
virtual PLCORE_API String | GetLoadableTypeName () const |
Returns the loadable type name. | |
Protected Member Functions | |
PLCORE_API | Loadable () |
Constructor. | |
virtual PLCORE_API | ~Loadable () |
Destructor. | |
virtual PLCORE_API bool | CallLoadable (File &cFile, Loader &cLoader, const String &sMethod, const String &sParams) |
Calls the loadable in order to load or save. | |
Protected Attributes | |
String | m_sFilename |
String | m_sUrl |
Abstract loadable (serialization) base class, derive your loadable classes from this class.
PLCORE_API PLCore::Loadable::Loadable | ( | ) | [protected] |
virtual PLCORE_API PLCore::Loadable::~Loadable | ( | ) | [protected, virtual] |
Destructor.
String PLCore::Loadable::GetFilename | ( | ) | const [inline] |
Returns the filename this loadable was given to loaded from.
String PLCore::Loadable::GetUrl | ( | ) | const [inline] |
Returns the absolute filename this loadable was loaded from.
virtual PLCORE_API bool PLCore::Loadable::LoadByFilename | ( | const String & | sFilename, |
const String & | sParams = "" , |
||
const String & | sMethod = "" |
||
) | [virtual] |
Loads the loadable from a file given by filename.
[in] | sFilename | Loadable filename |
[in] | sParams | Optional load method parameters, can be an empty string |
[in] | sMethod | Optional name of the load method to use, can be an empty string |
Reimplemented in PLScene::SceneContainer, PLRenderer::Material, PLRenderer::Texture, PLRenderer::TextureAni, and PLPhysics::SCPhysicsWorld.
virtual PLCORE_API bool PLCore::Loadable::LoadByFile | ( | File & | cFile, |
const String & | sParams = "" , |
||
const String & | sMethod = "" |
||
) | [virtual] |
Loads the loadable from a file given by a reference.
[in] | cFile | File to load from, must be opened and readable |
[in] | sParams | Optional load method parameters, can be an empty string |
[in] | sMethod | Optional name of the load method to use, can be an empty string |
Reimplemented in PLScene::SceneContainer, and PLPhysics::SCPhysicsWorld.
virtual PLCORE_API bool PLCore::Loadable::SaveByFilename | ( | const String & | sFilename, |
const String & | sParams = "" , |
||
const String & | sMethod = "" |
||
) | [virtual] |
Saves the loadable to a file given by filename.
[in] | sFilename | Loadable filename |
[in] | sParams | Optional save method parameters, can be an empty string |
[in] | sMethod | Optional name of the save method to use, can be an empty string |
Reimplemented in PLRenderer::Texture, and PLRenderer::TextureAni.
virtual PLCORE_API bool PLCore::Loadable::SaveByFile | ( | File & | cFile, |
const String & | sParams = "" , |
||
const String & | sMethod = "" |
||
) | [virtual] |
Saves the loadable to a file given by reference.
[in] | cFile | File to save into, must be opened and writable |
[in] | sParams | Optional save method parameters, can be an empty string |
[in] | sMethod | Optional name of the save method to use, can be an empty string |
Reimplemented in PLRenderer::Texture, and PLRenderer::TextureAni.
virtual PLCORE_API bool PLCore::Loadable::Reload | ( | ) | [virtual] |
Reloads the loadable.
Reimplemented in PLRenderer::Material, and PLRenderer::Effect.
virtual PLCORE_API bool PLCore::Loadable::Unload | ( | ) | [virtual] |
Unloads the loadable.
Reimplemented in PLMesh::Mesh, PLPhysics::SNRagdoll, PLGraphics::Image, PLScene::SceneContainer, PLRenderer::Material, PLRenderer::Effect, PLCore::Chunk, PLRenderer::Texture, PLMath::GraphPath, PLRenderer::TextureAni, PLCore::LocalizationGroup, PLEngine::Camcorder, PLScene::SceneRenderer, PLMesh::Skeleton, and PLMath::Graph.
virtual PLCORE_API String PLCore::Loadable::GetLoadableTypeName | ( | ) | const [virtual] |
Returns the loadable type name.
Reimplemented in PLMesh::Mesh, PLPhysics::SNRagdoll, PLGraphics::Image, PLScene::SceneContainer, PLRenderer::Material, PLCore::Config, PLRenderer::Effect, PLCore::Chunk, PLRenderer::Texture, PLMath::GraphPath, PLRenderer::TextureAni, PLCore::LocalizationGroup, PLEngine::Camcorder, PLScene::SceneRenderer, PLMesh::Skeleton, and PLMath::Graph.
virtual PLCORE_API bool PLCore::Loadable::CallLoadable | ( | File & | cFile, |
Loader & | cLoader, | ||
const String & | sMethod, | ||
const String & | sParams | ||
) | [protected, virtual] |
Calls the loadable in order to load or save.
[in] | cFile | File to load from, MUST be opened |
[in] | cLoader | Loader to use |
[in] | sMethod | Name of the method to use |
[in] | sParams | Method parameters |
Reimplemented in PLPhysics::SNRagdoll, PLScene::SceneContainer, and PLEngine::Camcorder.
String PLCore::Loadable::m_sFilename [protected] |
The filename this loadable was given to loaded from
String PLCore::Loadable::m_sUrl [protected] |
The absolute filename this loadable was loaded from
|