InstructionContext Class Reference

#include <instructioncontext.h>

List of all members.

Public Member Functions

 InstructionContext (BasicSmartPointer< InstructionContext > parent)
void addInstruction (const char *instr, int id)
int getInstructionId (const char *instr)
BasicSmartPointer< InstructionContextgetParent ()

Static Public Member Functions

static int getNextExecId ()


Constructor & Destructor Documentation

InstructionContext::InstructionContext BasicSmartPointer< InstructionContext parent  ) 
 

Construct a default InstructionContext.

Parameters:
parent The context parent, or NULL if this is the root.


Member Function Documentation

void InstructionContext::addInstruction const char *  instr,
int  id
[inline]
 

Add a new instruction mapping.

Parameters:
instr The instruction name.
id Its id.

int InstructionContext::getInstructionId const char *  instr  ) 
 

Look up an instruction id. This function will first look in the local context for the instruction. If it is not found it will ask its parent. This matching is simalar to the idea of scope in C/C++.

Parameters:
instr The instruction name.
Returns:
The id on success, -1 otherwise.

BasicSmartPointer<InstructionContext> InstructionContext::getParent  )  [inline]
 

Get the InstructionContext parent pointer.

Returns:
The parent.

int InstructionContext::getNextExecId  )  [static]
 


The documentation for this class was generated from the following files:
Generated on Wed Apr 5 21:04:15 2006 for Sesame by  doxygen 1.4.6