Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::Loader Class Reference

This class is an interface for resource loaders in KGE. More...

#include <Loader.h>

Public Member Functions

 Loader ()
 Constructor.
virtual ~Loader ()
 Destructor.
virtual bool IsALoadableFileExtension (core::String &strFilename)
virtual ResourceLoadResource (io::Stream *pStream)=0
 Loads a resource from a FileSystem and return its pointer.

Protected Attributes

std::vector< std::string > m_aFileExtension
 The file extension list that this loader is capable to load.
bool m_bSwapEndian
 Swap the loaded data or not.

Detailed Description

This class is an interface for resource loaders in KGE.

Definition at line 21 of file Loader.h.

Constructor & Destructor Documentation

kge::Loader::Loader ( )
inline

Constructor.

Definition at line 26 of file Loader.h.

virtual kge::Loader::~Loader ( )
inlinevirtual

Destructor.

Definition at line 30 of file Loader.h.

Member Function Documentation

virtual bool kge::Loader::IsALoadableFileExtension ( core::String strFilename)
virtual

returns true if the file maybe is able to be loaded by this Loader based on the file extension (e.g. ".mesh")

virtual Resource* kge::Loader::LoadResource ( io::Stream pStream)
pure virtual

Loads a resource from a FileSystem and return its pointer.

Parameters
strFilenameThe resource file name to load.
Returns
Returns the created resource pointer. Note resource may not loaded yet.
See Also
kge::io::FileSystemManager, Resource::IsLoaded

Member Data Documentation

std::vector<std::string> kge::Loader::m_aFileExtension
protected

The file extension list that this loader is capable to load.

Definition at line 46 of file Loader.h.

bool kge::Loader::m_bSwapEndian
protected

Swap the loaded data or not.

Definition at line 47 of file Loader.h.


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