Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

YEBuiltin Class Reference

#include <YExpression.h>

Inheritance diagram for YEBuiltin:

YCode Rep List of all members.

Public Member Functions

 YEBuiltin (declaration_t *decl, YBlockPtr parameterblock=0, constTypePtr type=0)
 YEBuiltin (std::istream &str)
 ~YEBuiltin ()
declaration_tdecl () const
constTypePtr finalize ()
void closeParameters ()
constTypePtr returnType () const
constTypePtr attachParameter (YCodePtr code, constTypePtr type=Type::Unspec)
constTypePtr attachSymVariable (const char *name, constTypePtr type, unsigned int line, TableEntry *&tentry)
string toString () const
YCPValue evaluate (bool cse=false)
std::ostream & toStream (std::ostream &str) const
constTypePtr type () const
YBlockPtr parameterBlock () const

Private Member Functions

 REP_BODY (YEBuiltin)

Private Attributes

declaration_tm_decl
constFunctionTypePtr m_type
YBlockPtr m_parameterblock
ycodelist_tm_parameters

Constructor & Destructor Documentation

YEBuiltin::YEBuiltin declaration_t decl,
YBlockPtr  parameterblock = 0,
constTypePtr  type = 0
 

YEBuiltin::YEBuiltin std::istream &  str  ) 
 

YEBuiltin::~YEBuiltin  ) 
 


Member Function Documentation

constTypePtr YEBuiltin::attachParameter YCodePtr  code,
constTypePtr  type = Type::Unspec
 

Attach parameter to external function call

Parameters:
code: parameter code
type: parameter type
Returns:
NULL if success, != NULL (expected type) if wrong parameter type Type::Unspec if bad code (NULL or isError) Type::Error if excessive parameter

constTypePtr YEBuiltin::attachSymVariable const char *  name,
constTypePtr  type,
unsigned int  line,
TableEntry *&  tentry
 

void YEBuiltin::closeParameters  ) 
 

declaration_t * YEBuiltin::decl  )  const
 

YCPValue YEBuiltin::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.

constTypePtr YEBuiltin::finalize  ) 
 

'close' function, perform final parameter check if ok, return 0 if wrong signature (wrong parameter count, template mismatch) return expected signature if undefined, return Type::Error (wrong type was already reported in attachParameter())

YBlockPtr YEBuiltin::parameterBlock  )  const
 

YEBuiltin::REP_BODY YEBuiltin   )  [private]
 

constTypePtr YEBuiltin::returnType  )  const
 

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

writes YCode to a stream see Bytecode for read

Implements YCode.

string YEBuiltin::toString  )  const [virtual]
 

Returns an ASCII representation of the YCode.

Reimplemented from YCode.

constTypePtr YEBuiltin::type  )  const [virtual]
 

return type (interesting mostly for function calls)

Reimplemented from YCode.


Member Data Documentation

declaration_t* YEBuiltin::m_decl [private]
 

YBlockPtr YEBuiltin::m_parameterblock [private]
 

ycodelist_t* YEBuiltin::m_parameters [private]
 

constFunctionTypePtr YEBuiltin::m_type [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 18:15:25 2007 for yast2-core by doxygen 1.3.6