YSSwitch Class Reference

#include <YStatement.h>

Inheritance diagram for YSSwitch:

YStatement YCode Rep List of all members.

Public Member Functions

 YSSwitch (YCodePtr condition)
 YSSwitch (bytecodeistream &str)
 ~YSSwitch ()
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

constTypePtr YSSwitch::conditionType  )  const [inline]
 

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.

string YSSwitch::name  )  const
 

YSSwitch::REP_BODY YSSwitch   )  [private]
 

void YSSwitch::setBlock YBlockPtr  block  ) 
 

bool YSSwitch::setCase YCPValue  value  ) 
 

bool YSSwitch::setDefaultCase  ) 
 

std::ostream & YSSwitch::toStream std::ostream &  str  )  const [virtual]
 

writes YCode to a stream see Bytecode for read

Reimplemented from YStatement.

string YSSwitch::toString  )  const [virtual]
 

Returns an ASCII representation of the YCode.

Reimplemented from YStatement.

constTypePtr YSSwitch::type  )  const [inline, virtual]
 

return type (interesting mostly for function calls)

Reimplemented from YStatement.


Member Data Documentation

YBlockPtr YSSwitch::m_block [private]
 

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

YCodePtr YSSwitch::m_condition [private]
 

int YSSwitch::m_defaultcase [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 18:07:47 2006 for yast2-core by  doxygen 1.4.6