YFunction Class Reference

#include <YCode.h>

Inheritance diagram for YFunction:

YCode List of all members.

Public Member Functions

 YFunction (YBlockPtr parameterblock, const SymbolEntryPtr entry=0)
 YFunction (bytecodeistream &str)
 ~YFunction ()
virtual ykind kind () const
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

YFunction::REP_BODY ( YFunction   )  [private]

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

Returns the YCode kind

Implements YCode.

unsigned int YFunction::parameterCount (  )  const

YBlockPtr YFunction::declaration (  )  const

SymbolEntryPtr YFunction::parameter ( unsigned int  position  )  const

YBlockPtr YFunction::definition (  )  const

void YFunction::setDefinition ( YBlockPtr  body  ) 

void YFunction::setDefinition ( bytecodeistream str  ) 

string YFunction::toStringDeclaration (  )  const

string YFunction::toString (  )  const [virtual]

Returns an ASCII representation of the YCode.

Reimplemented from YCode.

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

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

writes YCode to a stream see Bytecode for read

Implements YCode.

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.

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 Tue Nov 6 01:20:23 2007 for yast2-core by  doxygen 1.5.0