Paula Script
Public Member Functions | Friends | List of all members
paula::Var Class Reference

Access Paula script variable data. More...

#include <args.h>

Public Member Functions

INT type () const
 Get variable type, eg. NODE_INTEGER. See node_types.h. More...
 
bool match (INT tag) const
 Compare node (variable) type. More...
 
bool getInt (INT &out) const
 Write variable's integer (32 bits) value to reference, if variable is of correct type. More...
 
bool getDouble (DOUBLE &out) const
 Write variable's double (64-bit floating point) value to reference, if variable is of correct type. More...
 
bool getBool (bool &out) const
 Write variable's boolean value to reference, if variable is of correct type. More...
 
bool getOp (char &out) const
 Write variable's operation character (eg. '+' or '<') to reference, if variable is of correct type. More...
 
bool getChars (char *&out) const
 Write variable's text value (char*) to reference, if variable is of correct type. More...
 
bool isSubtree () const
 Check if a variable is a subtree. More...
 

Friends

class Args
 
class core::Tree
 
class core::TreeIterator
 

Detailed Description

Access Paula script variable data.

Member Function Documentation

◆ getBool()

bool paula::Var::getBool ( bool &  out) const

Write variable's boolean value to reference, if variable is of correct type.

Parameters
outWrite 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
outWrite 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
outWrite 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
outWrite 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
outWrite 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
tageg. NODE_INTEGER. See node_types.h.
Returns
True if types match.

◆ type()

INT paula::Var::type ( ) const

Get variable type, eg. NODE_INTEGER. See node_types.h.

Returns
Node (variable) type.

Friends And Related Function Documentation

◆ Args

friend class Args
friend

◆ core::Tree

friend class core::Tree
friend

◆ core::TreeIterator

friend class core::TreeIterator
friend

The documentation for this class was generated from the following file: