yast2-core
Public Member Functions | Private Member Functions | List of all members
YEFunctionPointer Class Reference

#include <YExpression.h>

Inheritance diagram for YEFunctionPointer:
YECall YCode Rep

Public Member Functions

 YEFunctionPointer (TableEntry *entry)
 
 YEFunctionPointer (bytecodeistream &str)
 
virtual ykind kind () const
 
virtual YCPValue evaluate (bool cse=false)
 
- Public Member Functions inherited from YECall
 YECall (TableEntry *entry)
 
 YECall (bytecodeistream &str)
 
 ~YECall ()
 
const SymbolEntryPtr entry () const
 
constTypePtr attachParameter (YCodePtr code, constTypePtr type)
 
virtual constTypePtr finalize ()
 
string toString () const
 
std::ostream & toStream (std::ostream &str) const
 
std::ostream & toXml (std::ostream &str, int indent) const
 
constTypePtr type () const
 
string qualifiedName () const
 
- Public Member Functions inherited from YCode
 YCode ()
 
virtual ~YCode ()
 
std::string commentToXml () const
 
std::ostream & commentToXml (std::ostream &str) const
 
virtual bool isConstant () const
 
bool isError () const
 
virtual bool isStatement () const
 
virtual bool isBlock () const
 
virtual bool isReferenceable () const
 
void setCommentBefore (const char *comment)
 
void setCommentAfter (const char *comment)
 
- Public Member Functions inherited from Rep
 Rep ()
 
 Rep (const Rep &)
 
Repoperator= (const Rep &)
 
virtual ~Rep ()
 
void ref () const
 
void unref () const
 
unsigned refCount () const
 
virtual const char * repName () const
 
virtual std::ostream & dumpOn (std::ostream &str) const
 

Private Member Functions

 REP_BODY (YEFunctionPointer)
 

Additional Inherited Members

- Public Types inherited from YCode
enum  ykind {
  yxError = 0, ycVoid, ycBoolean, ycInteger,
  ycFloat, ycString, ycByteblock, ycPath,
  ycSymbol, ycList, ycMap, ycTerm,
  ycEntry, ycConstant, ycLocale, ycFunction,
  yePropagate, yeUnary, yeBinary, yeTriple,
  yeCompare, yeLocale, yeList, yeMap,
  yeTerm, yeIs, yeBracket, yeBlock,
  yeReturn, yeVariable, yeBuiltin, yeFunction,
  yeReference, yeFunctionPointer, yeExpression, ysTypedef,
  ysVariable, ysFunction, ysAssign, ysBracket,
  ysIf, ysWhile, ysDo, ysRepeat,
  ysExpression, ysReturn, ysBreak, ysContinue,
  ysTextdomain, ysInclude, ysFilename, ysImport,
  ysBlock, ysSwitch, ysStatement, yiBreakpoint
}
 
- Static Public Member Functions inherited from YECall
static YECallPtr readCall (bytecodeistream &str)
 
- Static Public Member Functions inherited from YCode
static string toString (ykind kind)
 
- Static Public Member Functions inherited from Rep
static void ref (const Rep *obj_r)
 
static void unref (const Rep *obj_r)
 
- Protected Member Functions inherited from Rep
virtual void ref_to (unsigned) const
 
virtual void unref_to (unsigned) const
 
- Protected Attributes inherited from YECall
TableEntrym_entry
 
SymbolEntryPtr m_sentry
 
YCodePtr * m_parameters
 
constTypePtr * m_parameter_types
 
Y2Functionm_functioncall
 
uint m_next_param_id
 
- Protected Attributes inherited from YCode
const char * comment_before
 
const char * comment_after
 

Constructor & Destructor Documentation

YEFunctionPointer::YEFunctionPointer ( TableEntry entry)

References TableEntry::sentry(), and y2debug.

YEFunctionPointer::YEFunctionPointer ( bytecodeistream str)

Member Function Documentation

YCPValue YEFunctionPointer::evaluate ( bool  cse = false)
virtual

Execute YCP code to get the resulting YCPValue. Every inherited class of YCode should reimplement this method.

Returns
YCPValue after executing the code
Parameters
cseshould the evaluation be done for parse time evaluation (i.e. constant subexpression elimination)

Reimplemented from YCode.

References Y2Function::attachParameter(), Y2Namespace::createFunctionCall(), YaST::ee, Y2Function::evaluateCall(), YaST::ExecutionEnvironment::filename(), YCPElement::isNull(), YaST::ExecutionEnvironment::linenumber(), YECall::m_functioncall, YECall::m_next_param_id, YECall::m_parameters, YECall::m_sentry, YECall::qualifiedName(), Y2Function::reset(), YaST::ExecutionEnvironment::setFilename(), YaST::ExecutionEnvironment::setLinenumber(), YECall::toString(), y2debug, y2internal, and ycp2error.

virtual ykind YEFunctionPointer::kind ( ) const
inlinevirtual

Kind of this YCode. This method must be reimplemented in the inherited classes.

Returns
the YCode kind

Implements YCode.

References YCode::yeFunctionPointer.

YEFunctionPointer::REP_BODY ( YEFunctionPointer  )
private

The documentation for this class was generated from the following files:

Generated on a sunny day for yast2-core by doxygen 1.8.5