The Variable class represents a Scratch variable.
More...
#include <scratchcpp/variable.h>
The Variable class represents a Scratch variable.
◆ Variable() [1/2]
| Variable::Variable |
( |
const std::string & | id, |
|
|
const std::string & | name, |
|
|
const Value & | value = Value(), |
|
|
bool | isCloudVariable = false ) |
◆ Variable() [2/2]
| libscratchcpp::Variable::Variable |
( |
const Variable & | | ) |
|
|
delete |
◆ clone()
| std::shared_ptr< Variable > Variable::clone |
( |
| ) |
|
Creates a copy of the variable.
◆ id()
| const std::string & Entity::id |
( |
| ) |
const |
|
inherited |
◆ isCloudVariable()
| bool Variable::isCloudVariable |
( |
| ) |
const |
Returns true if the variable is a cloud variable.
◆ monitor()
| Monitor * Variable::monitor |
( |
| ) |
const |
Returns the monitor of this variable.
◆ name()
| const std::string & Variable::name |
( |
| ) |
const |
Returns the name of the variable.
◆ setId()
| void Entity::setId |
( |
const std::string & | newId | ) |
|
|
inherited |
◆ setIsCloudVariable()
| void Variable::setIsCloudVariable |
( |
bool | isCloudVariable | ) |
|
Toggles whether the variable is a cloud variable.
◆ setMonitor()
| void Variable::setMonitor |
( |
Monitor * | monitor | ) |
|
Sets the monitor of this variable.
◆ setTarget()
| void Variable::setTarget |
( |
Target * | target | ) |
|
Sets the sprite or stage this variable belongs to.
◆ setValue()
| void Variable::setValue |
( |
const Value & | value | ) |
|
◆ target()
| Target * Variable::target |
( |
| ) |
const |
Returns the sprite or stage this variable belongs to.
◆ value()
| const Value & Variable::value |
( |
| ) |
const |
◆ valuePtr()
| Value * Variable::valuePtr |
( |
| ) |
|
Returns a pointer to the value.
The documentation for this class was generated from the following files: