#include <YStatement.h>
Inheritance diagram for YSSwitch:

Public Member Functions | |
| YSSwitch (YCodePtr condition) | |
| YSSwitch (bytecodeistream &str) | |
| ~YSSwitch () | |
| virtual ykind | kind () const |
| string | name () const |
| string | toString () const |
| std::ostream & | toStream (std::ostream &str) const |
| YCPValue | evaluate (bool cse=false) |
| constTypePtr | type () const |
| constTypePtr | conditionType () const |
| bool | setCase (YCPValue value) |
| bool | setDefaultCase () |
| void | setBlock (YBlockPtr block) |
Private Member Functions | |
| REP_BODY (YSSwitch) | |
Private Attributes | |
| YCodePtr | m_condition |
| YBlockPtr | m_block |
| int | m_defaultcase |
| map< YCPValue, int, ycpless > | m_cases |
| YSSwitch::YSSwitch | ( | YCodePtr | condition | ) |
Switch
| YSSwitch::YSSwitch | ( | bytecodeistream & | str | ) |
| YSSwitch::~YSSwitch | ( | ) |
| YSSwitch::REP_BODY | ( | YSSwitch | ) | [private] |
| string YSSwitch::name | ( | ) | const |
| string YSSwitch::toString | ( | ) | const [virtual] |
Returns an ASCII representation of the YCode.
Reimplemented from YStatement.
| std::ostream & YSSwitch::toStream | ( | std::ostream & | str | ) | const [virtual] |
writes YCode to a stream see Bytecode for read
Reimplemented from YStatement.
| YCPValue YSSwitch::evaluate | ( | bool | cse = false |
) | [virtual] |
evaluate YCode to YCPValue if debugger == 0 called for parse time evaluation (i.e. constant subexpression elimination) else called for runtime evaluation
Reimplemented from YStatement.
| constTypePtr YSSwitch::type | ( | ) | const [inline, virtual] |
return type (interesting mostly for function calls)
Reimplemented from YStatement.
| constTypePtr YSSwitch::conditionType | ( | ) | const [inline] |
| bool YSSwitch::setCase | ( | YCPValue | value | ) |
| bool YSSwitch::setDefaultCase | ( | ) |
| void YSSwitch::setBlock | ( | YBlockPtr | block | ) |
YCodePtr YSSwitch::m_condition [private] |
YBlockPtr YSSwitch::m_block [private] |
int YSSwitch::m_defaultcase [private] |
map<YCPValue, int, ycpless> YSSwitch::m_cases [private] |
1.5.0