Base class for all resource types to be managed by the ResourceManager class.
More...
#include <Resource.h>
|
| void | Split (const std::string &line, const char delimeter, std::vector< std::string > &elements) |
| | Splits a string into a vector of strings.
|
| |
| void | ParseComments (std::string &line) |
| | Removes c-style, single-line comments from a line of text.
|
| |
| void | TrimLine (std::string &line) |
| | Removes white-space at the front and end of a line of text.
|
| |
| ResourceManager * | GetResourceManager () |
| | Gets a pointer to the ResourceManager that was used to load the resource.
|
| |
| virtual bool | IsCloneable () const =0 |
| | Used to determine if the resource is cloneable.
|
| |
| virtual Resource * | Clone () |
| | Clones a resource.
|
| |
Base class for all resource types to be managed by the ResourceManager class.
Definition at line 22 of file Resource.h.
◆ ~Resource()
| virtual KatanaEngine::Resource::~Resource |
( |
| ) |
|
|
inlinevirtual |
◆ Clone()
| virtual Resource * KatanaEngine::Resource::Clone |
( |
| ) |
|
|
inlineprotectedvirtual |
Clones a resource.
- Returns
- Returns a pointer to a clone if the resource is cloneable. Otherwise a pointer to "this" is returned.
Reimplemented in KatanaEngine::Animation.
Definition at line 72 of file Resource.h.
◆ GetResourceID()
| unsigned short KatanaEngine::Resource::GetResourceID |
( |
| ) |
const |
|
inline |
Gets the ID of the resource.
- Returns
- The id of the resource.
Definition at line 38 of file Resource.h.
◆ GetResourceManager()
◆ IsCloneable()
| virtual bool KatanaEngine::Resource::IsCloneable |
( |
| ) |
const |
|
protectedpure virtual |
◆ Load()
| virtual bool KatanaEngine::Resource::Load |
( |
const std::string & | path, |
|
|
ResourceManager * | pManager ) |
|
pure virtual |
◆ ParseComments()
| void KatanaEngine::Resource::ParseComments |
( |
std::string & | line | ) |
|
|
protected |
Removes c-style, single-line comments from a line of text.
- Parameters
-
| line | The line to remove the comments from. |
Definition at line 34 of file Resource.cpp.
◆ Split()
| void KatanaEngine::Resource::Split |
( |
const std::string & | line, |
|
|
const char | delimeter, |
|
|
std::vector< std::string > & | elements ) |
|
protected |
Splits a string into a vector of strings.
- Parameters
-
| line | The string that will be split. |
| delimeter | The character that will determine the split locations. |
| elements | The vector where the split string elements will be stored. |
Definition at line 19 of file Resource.cpp.
◆ TrimLine()
| void KatanaEngine::Resource::TrimLine |
( |
std::string & | line | ) |
|
|
protected |
Removes white-space at the front and end of a line of text.
- Parameters
-
| line | The line to remove the white-space from. |
Definition at line 46 of file Resource.cpp.
◆ ResourceManager
The documentation for this class was generated from the following files: