|
Yate
|
A single operation in an expression. More...
#include <yatescript.h>
Public Member Functions | |
| ExpOperation (const ExpOperation &original) | |
| ExpOperation (const ExpOperation &original, const char *name) | |
| ExpOperation (const String &value, const char *name=0, bool autoNum=false) | |
| ExpOperation (const char *value, const char *name=0) | |
| ExpOperation (long int value, const char *name=0) | |
| ExpOperation (bool value, const char *name=0) | |
| ExpOperation (ExpEvaluator::Opcode oper, const char *name=0, long int value=nonInteger(), bool barrier=false) | |
| ExpOperation (ExpEvaluator::Opcode oper, const char *name, const char *value, bool barrier=false) | |
| ExpEvaluator::Opcode | opcode () const |
| bool | isInteger () const |
| long int | number () const |
| bool | barrier () const |
| long int | operator= (long int num) |
| virtual ExpOperation * | clone (const char *name) const |
| ExpOperation * | clone () const |
Static Public Member Functions | |
| static long int | nonInteger () |
Friends | |
| class | ExpEvaluator |
A single operation in an expression.
This class describes a single operation in an expression evaluator
| ExpOperation | ( | const ExpOperation & | original | ) | [inline] |
Copy constructor
| original | Operation to copy |
| ExpOperation | ( | const ExpOperation & | original, |
| const char * | name | ||
| ) | [inline] |
Copy constructor with renaming, to be used for named results
| original | Operation to copy |
| name | Name of the newly created operation |
| ExpOperation | ( | const String & | value, |
| const char * | name = 0, |
||
| bool | autoNum = false |
||
| ) | [inline, explicit] |
Push String constructor
| value | String constant to push on stack on execution |
| name | Optional of the newly created constant |
| autoNum | Automatically convert to number if possible |
References String::isBoolean(), and String::toBoolean().
| ExpOperation | ( | const char * | value, |
| const char * | name = 0 |
||
| ) | [inline, explicit] |
Push literal string constructor
| value | String constant to push on stack on execution |
| name | Optional of the newly created constant |
| ExpOperation | ( | long int | value, |
| const char * | name = 0 |
||
| ) | [inline, explicit] |
Push Number constructor
| value | Integer constant to push on stack on execution |
| name | Optional of the newly created constant |
References String::operator=().
| ExpOperation | ( | bool | value, |
| const char * | name = 0 |
||
| ) | [inline, explicit] |
Push Boolean constructor
| value | Boolean constant to push on stack on execution |
| name | Optional of the newly created constant |
| ExpOperation | ( | ExpEvaluator::Opcode | oper, |
| const char * | name = 0, |
||
| long int | value = nonInteger(), |
||
| bool | barrier = false |
||
| ) | [inline] |
Constructor from components
| oper | Operation code |
| name | Optional name of the operation or result |
| value | Optional integer constant used as function parameter count |
| barrier | True if the operation is an expression barrier on the stack |
| ExpOperation | ( | ExpEvaluator::Opcode | oper, |
| const char * | name, | ||
| const char * | value, | ||
| bool | barrier = false |
||
| ) | [inline] |
Constructor of non-integer operation from components
| oper | Operation code |
| name | Name of the operation or result |
| value | String value of operation |
| barrier | True if the operation is an expression barrier on the stack |
| bool barrier | ( | ) | const [inline] |
Check if this operation acts as an evaluator barrier on the stack
| virtual ExpOperation* clone | ( | const char * | name | ) | const [inline, virtual] |
Clone and rename method
| name | Name of the cloned operation |
Reimplemented in ExpWrapper, and ExpFunction.
| ExpOperation* clone | ( | ) | const [inline] |
Clone method
References ExpOperation::clone().
Referenced by ExpOperation::clone().
| bool isInteger | ( | ) | const [inline] |
Check if an integer value is stored
| static long int nonInteger | ( | ) | [inline, static] |
Special value that is not recognized as an integer value
| long int number | ( | ) | const [inline] |
Retrieve the number stored in this operation
| ExpEvaluator::Opcode opcode | ( | ) | const [inline] |
Retrieve the code of this operation
| long int operator= | ( | long int | num | ) | [inline] |
Number assignment operator
| num | Numeric value to assign to the operation |
References String::operator=().
1.7.6.1