The Asset class represents a Scratch asset, for example a Costume or a Sound.
More...
#include <scratchcpp/asset.h>
The Asset class represents a Scratch asset, for example a Costume or a Sound.
◆ Asset() [1/2]
| Asset::Asset |
( |
const std::string & | name, |
|
|
const std::string & | id, |
|
|
const std::string & | format ) |
◆ Asset() [2/2]
| libscratchcpp::Asset::Asset |
( |
const Asset & | | ) |
|
|
delete |
◆ ~Asset()
◆ data()
| const void * Asset::data |
( |
| ) |
const |
◆ dataFormat()
| const std::string & Asset::dataFormat |
( |
| ) |
const |
Returns the name of the format of the asset file.
◆ dataSize()
| unsigned int Asset::dataSize |
( |
| ) |
const |
Returns the size of the asset data.
◆ fileName()
| const std::string & Asset::fileName |
( |
| ) |
const |
Returns the name of the asset file.
◆ id()
| const std::string & Entity::id |
( |
| ) |
const |
|
inherited |
◆ isClone()
| virtual bool libscratchcpp::Asset::isClone |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ name()
| const std::string & Asset::name |
( |
| ) |
const |
Returns the name of the asset.
◆ processData()
| virtual void libscratchcpp::Asset::processData |
( |
unsigned int | size, |
|
|
void * | data ) |
|
inlineprotectedvirtual |
◆ setData()
| void Asset::setData |
( |
unsigned int | size, |
|
|
void * | data ) |
Sets the asset data (will be deallocated when the object is destroyed).
◆ setId()
| void Asset::setId |
( |
const std::string & | id | ) |
|
Sets the ID (MD5 hash) of the asset file.
◆ setTarget()
| void Asset::setTarget |
( |
Target * | target | ) |
|
Sets the sprite or stage this asset belongs to.
◆ target()
| Target * Asset::target |
( |
| ) |
const |
Returns the sprite or stage this asset belongs to.
The documentation for this class was generated from the following files: