Base class for all resource types to be managed by the ResourceManager class.
More...
#include <Resource.h>
Base class for all resource types to be managed by the ResourceManager class.
◆ 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.
◆ GetResourceID()
| unsigned short KatanaEngine::Resource::GetResourceID |
( |
| ) |
const |
|
inline |
Gets the ID of the resource.
- Returns
- The id of the resource.
◆ 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. |
◆ 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. |
◆ 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. |
The documentation for this class was generated from the following files: