YSSwitch Class Reference

#include <YStatement.h>

Inheritance diagram for YSSwitch:

YStatement YCode List of all members.

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, ycplessm_cases

Detailed Description

switch


Constructor & Destructor Documentation

YSSwitch::YSSwitch ( YCodePtr  condition  ) 

Switch

YSSwitch::YSSwitch ( bytecodeistream str  ) 

YSSwitch::~YSSwitch (  ) 


Member Function Documentation

YSSwitch::REP_BODY ( YSSwitch   )  [private]

virtual ykind YSSwitch::kind (  )  const [inline, virtual]

Returns the YCode kind

Implements YCode.

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  ) 


Member Data Documentation

YCodePtr YSSwitch::m_condition [private]

YBlockPtr YSSwitch::m_block [private]

int YSSwitch::m_defaultcase [private]

map<YCPValue, int, ycpless> YSSwitch::m_cases [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:20:23 2007 for yast2-core by  doxygen 1.5.0