ExecutionEnvironment Class Reference

#include <ExecutionEnvironment.h>

List of all members.

Public Types

typedef vector< const CallFrame * > CallStack

Public Member Functions

 ExecutionEnvironment ()
 ~ExecutionEnvironment ()
int linenumber () const
void setLinenumber (int line)
const string filename () const
void setFilename (const string &filename)
YStatementPtr statement () const
void setStatement (YStatementPtr s)
void pushframe (string called_function)
void popframe ()
void backtrace (loglevel_t level, uint skip=0) const
CallStack callstack () const

Private Attributes

int m_linenumber
string m_filename
bool m_forced_filename
YStatementPtr m_statement
CallStack m_backtrace


Detailed Description

Class to track current execution environment. Typically used for logging and debugging.

m_forced_filename is a way to enforce a given filename until another block is entered (or the current one is left). Used for include statements, where top level block does not exist.


Member Typedef Documentation

typedef vector<const CallFrame*> ExecutionEnvironment::CallStack
 


Constructor & Destructor Documentation

ExecutionEnvironment::ExecutionEnvironment  )  [inline]
 

ExecutionEnvironment::~ExecutionEnvironment  )  [inline]
 


Member Function Documentation

void ExecutionEnvironment::backtrace loglevel_t  level,
uint  skip = 0
const
 

Report the current backtrace to log.

Parameters:
skip number of the top call frames to be omitted from the backtrace

ExecutionEnvironment::CallStack ExecutionEnvironment::callstack  )  const
 

Returns a copy of the call stack for debugging etc.

The stack itself may safely be modified. The pointers it contains, however, may not.

const string ExecutionEnvironment::filename  )  const
 

Get the current file name.

int ExecutionEnvironment::linenumber  )  const
 

Get the current line number.

void ExecutionEnvironment::popframe  ) 
 

Pop the top call frame from the backtrace stack.

void ExecutionEnvironment::pushframe string  called_function  ) 
 

Push another call frame to the backtrace stack according to the current information.

Parameters:
called_function name of the function to be called at this point

void ExecutionEnvironment::setFilename const string &  filename  ) 
 

Set the current file name for error outputs.

void ExecutionEnvironment::setLinenumber int  line  ) 
 

Set the current line number.

void ExecutionEnvironment::setStatement YStatementPtr  s  ) 
 

Set the currently evaluated statement.

YStatementPtr ExecutionEnvironment::statement  )  const
 

Return the currently evaluated statement.


Member Data Documentation

CallStack ExecutionEnvironment::m_backtrace [private]
 

string ExecutionEnvironment::m_filename [private]
 

bool ExecutionEnvironment::m_forced_filename [private]
 

int ExecutionEnvironment::m_linenumber [private]
 

YStatementPtr ExecutionEnvironment::m_statement [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 18:07:46 2006 for yast2-core by  doxygen 1.4.6