Access Paula script variable data.
More...
#include <args.h>
|
INT | type () const |
| Get variable type, eg. NODE_INTEGER. See node_types.h.
|
|
INT | size () const |
| Get node size.
|
|
bool | match (INT tag) const |
| Compare node (variable) type.
|
|
bool | getInt (INT &out) const |
| Write variable's integer (32 bits) value to reference, if variable is of correct type.
|
|
bool | getDouble (DOUBLE &out) const |
| Write variable's double (64-bit floating point) value to reference, if variable is of correct type.
|
|
bool | getBool (bool &out) const |
| Write variable's boolean value to reference, if variable is of correct type.
|
|
bool | getOp (char &out) const |
| Write variable's operation character (eg. '+' or '<') to reference, if variable is of correct type.
|
|
bool | getChars (char *&out) const |
| Write variable's text value (char*) to reference, if variable is of correct type.
|
|
bool | isSubtree () const |
| Check if a variable is a subtree.
|
|
Access Paula script variable data.
◆ getBool()
bool paula::Var::getBool |
( |
bool & |
out | ) |
const |
Write variable's boolean value to reference, if variable is of correct type.
- Parameters
-
out | Write target. If type doesn't match, the value is not changed. |
- Returns
- True if type is correct and the value is written.
◆ getChars()
bool paula::Var::getChars |
( |
char *& |
out | ) |
const |
Write variable's text value (char*) to reference, if variable is of correct type.
- Parameters
-
out | Write target. If type doesn't match, the value is not changed. |
- Returns
- True if type is correct and the value is written.
◆ getDouble()
bool paula::Var::getDouble |
( |
DOUBLE & |
out | ) |
const |
Write variable's double (64-bit floating point) value to reference, if variable is of correct type.
- Parameters
-
out | Write target. If type doesn't match, the value is not changed. |
- Returns
- True if type is correct and the value is written.
◆ getInt()
bool paula::Var::getInt |
( |
INT & |
out | ) |
const |
Write variable's integer (32 bits) value to reference, if variable is of correct type.
- Parameters
-
out | Write target. If type doesn't match, the value is not changed. |
- Returns
- True if type is correct and the value is written.
◆ getOp()
bool paula::Var::getOp |
( |
char & |
out | ) |
const |
Write variable's operation character (eg. '+' or '<') to reference, if variable is of correct type.
- Parameters
-
out | Write target. If type doesn't match, the value is not changed. |
- Returns
- True if type is correct and the value is written.
◆ isSubtree()
bool paula::Var::isSubtree |
( |
| ) |
const |
Check if a variable is a subtree.
- Returns
- True if variable is a subtree.
◆ match()
bool paula::Var::match |
( |
INT |
tag | ) |
const |
Compare node (variable) type.
- Parameters
-
- Returns
- True if types match.
◆ size()
INT paula::Var::size |
( |
| ) |
const |
Get node size.
- Returns
- Node size.
◆ type()
INT paula::Var::type |
( |
| ) |
const |
Get variable type, eg. NODE_INTEGER. See node_types.h.
- Returns
- Node (variable) type.
◆ Args
◆ core::Engine
friend class core::Engine |
|
friend |
◆ core::Stack
◆ core::StackIterator
friend class core::StackIterator |
|
friend |
◆ core::Tree
◆ core::TreeIterator
friend class core::TreeIterator |
|
friend |
The documentation for this class was generated from the following file: