YEPropagate Class Reference

#include <YExpression.h>

Inheritance diagram for YEPropagate:

YCode List of all members.

Public Member Functions

 YEPropagate (YCodePtr value, constTypePtr from, constTypePtr to)
 YEPropagate (bytecodeistream &str)
 ~YEPropagate ()
virtual ykind kind () const
string toString () const
bool canPropagate (const YCPValue &value, constTypePtr to_type) const
YCPValue evaluate (bool cse=false)
std::ostream & toStream (std::ostream &str) const
constTypePtr type () const

Private Member Functions

 REP_BODY (YEPropagate)

Private Attributes

constTypePtr m_from
constTypePtr m_to
YCodePtr m_value

Constructor & Destructor Documentation

YEPropagate::YEPropagate ( YCodePtr  value,
constTypePtr  from,
constTypePtr  to 
)

lookup (map m, any k, any default) -> any Looks up the value matching to given key k. Returns default if the key was not found or has a different type than default.

Example:

 lookup ($[1:"a", 2:"bc"], 371, "take this") -> "take this"

 Type mismatch, returns default:
 lookup ($[1:"a", 2:"bc"], 1, true) -> true
 

YEPropagate::YEPropagate ( bytecodeistream str  ) 

YEPropagate::~YEPropagate (  ) 


Member Function Documentation

YEPropagate::REP_BODY ( YEPropagate   )  [private]

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

Returns the YCode kind

Implements YCode.

string YEPropagate::toString (  )  const [virtual]

Returns an ASCII representation of the YCode.

Reimplemented from YCode.

bool YEPropagate::canPropagate ( const YCPValue value,
constTypePtr  to_type 
) const

YCPValue YEPropagate::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 YCode.

std::ostream & YEPropagate::toStream ( std::ostream &  str  )  const [virtual]

writes YCode to a stream see Bytecode for read

Implements YCode.

constTypePtr YEPropagate::type (  )  const [inline, virtual]

return type (interesting mostly for function calls)

Reimplemented from YCode.


Member Data Documentation

constTypePtr YEPropagate::m_from [private]

constTypePtr YEPropagate::m_to [private]

YCodePtr YEPropagate::m_value [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