YFunction Class Reference

#include <YCode.h>

Inheritance diagram for YFunction:

YCode Rep List of all members.

Public Member Functions

 YFunction (YBlockPtr parameterblock, const SymbolEntryPtr entry=0)
 YFunction (bytecodeistream &str)
 ~YFunction ()
unsigned int parameterCount () const
YBlockPtr declaration () const
SymbolEntryPtr parameter (unsigned int position) const
YBlockPtr definition () const
void setDefinition (YBlockPtr body)
void setDefinition (bytecodeistream &str)
string toStringDeclaration () const
string toString () const
std::ostream & toStreamDefinition (std::ostream &str) const
std::ostream & toStream (std::ostream &str) const
virtual YCPValue evaluate (bool cse=false)
constTypePtr type () const

Private Member Functions

 REP_BODY (YFunction)

Private Attributes

YBlockPtr m_declaration
YBlockPtr m_definition
bool m_is_global

Detailed Description

function declaration (m_body == 0) or definition (m_body != 0) it's anonymouse here ! The code() member of the corresponding SymbolEntry points to YFunction.


Constructor & Destructor Documentation

YFunction::YFunction YBlockPtr  parameterblock,
const SymbolEntryPtr  entry = 0
 

YFunction::YFunction bytecodeistream str  ) 
 

YFunction::~YFunction  ) 
 


Member Function Documentation

YBlockPtr YFunction::declaration  )  const
 

YBlockPtr YFunction::definition  )  const
 

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

SymbolEntryPtr YFunction::parameter unsigned int  position  )  const
 

unsigned int YFunction::parameterCount  )  const
 

YFunction::REP_BODY YFunction   )  [private]
 

void YFunction::setDefinition bytecodeistream str  ) 
 

void YFunction::setDefinition YBlockPtr  body  ) 
 

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

writes YCode to a stream see Bytecode for read

Implements YCode.

std::ostream & YFunction::toStreamDefinition std::ostream &  str  )  const
 

string YFunction::toString  )  const [virtual]
 

Returns an ASCII representation of the YCode.

Reimplemented from YCode.

string YFunction::toStringDeclaration  )  const
 

constTypePtr YFunction::type  )  const [virtual]
 

return type (interesting mostly for function calls)

Reimplemented from YCode.


Member Data Documentation

YBlockPtr YFunction::m_declaration [private]
 

YBlockPtr YFunction::m_definition [private]
 

bool YFunction::m_is_global [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