doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
idInterpreter Class Reference

#include <Script_Interpreter.h>

Public Member Functions

 idInterpreter ()
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
void SetThread (idThread *pThread)
 
void StackTrace (void) const
 
int CurrentLine (void) const
 
const char * CurrentFile (void) const
 
void Error (const char *fmt,...) const id_attribute((format(printf
 
void void Warning (const char *fmt,...) const id_attribute((format(printf
 
void void void DisplayInfo (void) const
 
bool BeginMultiFrameEvent (idEntity *ent, const idEventDef *event)
 
void EndMultiFrameEvent (idEntity *ent, const idEventDef *event)
 
bool MultiFrameEventInProgress (void) const
 
void ThreadCall (idInterpreter *source, const function_t *func, int args)
 
void EnterFunction (const function_t *func, bool clearStack)
 
void EnterObjectFunction (idEntity *self, const function_t *func, bool clearStack)
 
bool Execute (void)
 
void Reset (void)
 
bool GetRegisterValue (const char *name, idStr &out, int scopeDepth)
 
int GetCallstackDepth (void) const
 
const prstack_tGetCallstack (void) const
 
const function_tGetCurrentFunction (void) const
 
idThreadGetThread (void) const
 

Public Attributes

bool doneProcessing
 
bool threadDying
 
bool terminateOnExit
 
bool debug
 

Private Member Functions

void PopParms (int numParms)
 
void PushString (const char *string)
 
void Push (int value)
 
const char * FloatToString (float value)
 
void AppendString (idVarDef *def, const char *from)
 
void SetString (idVarDef *def, const char *from)
 
const char * GetString (idVarDef *def)
 
varEval_t GetVariable (idVarDef *def)
 
idEntityGetEntity (int entnum) const
 
idScriptObjectGetScriptObject (int entnum) const
 
void NextInstruction (int position)
 
void LeaveFunction (idVarDef *returnDef)
 
void CallEvent (const function_t *func, int argsize)
 
void CallSysEvent (const function_t *func, int argsize)
 

Private Attributes

prstack_t callStack [MAX_STACK_DEPTH]
 
int callStackDepth
 
int maxStackDepth
 
byte localstack [LOCALSTACK_SIZE]
 
int localstackUsed
 
int localstackBase
 
int maxLocalstackUsed
 
const function_tcurrentFunction
 
int instructionPointer
 
int popParms
 
const idEventDefmultiFrameEvent
 
idEntityeventEntity
 
idThreadthread
 

Detailed Description

Definition at line 41 of file Script_Interpreter.h.

Constructor & Destructor Documentation

idInterpreter::idInterpreter ( )

Definition at line 39 of file Script_Interpreter.cpp.

Member Function Documentation

ID_INLINE void idInterpreter::AppendString ( idVarDef def,
const char *  from 
)
private

Definition at line 180 of file Script_Interpreter.h.

bool idInterpreter::BeginMultiFrameEvent ( idEntity ent,
const idEventDef event 
)

Definition at line 812 of file Script_Interpreter.cpp.

void idInterpreter::CallEvent ( const function_t func,
int  argsize 
)
private

Definition at line 683 of file Script_Interpreter.cpp.

void idInterpreter::CallSysEvent ( const function_t func,
int  argsize 
)
private

Definition at line 854 of file Script_Interpreter.cpp.

const char * idInterpreter::CurrentFile ( void  ) const

Definition at line 378 of file Script_Interpreter.cpp.

int idInterpreter::CurrentLine ( void  ) const

Definition at line 366 of file Script_Interpreter.cpp.

void idInterpreter::DisplayInfo ( void  ) const

Definition at line 474 of file Script_Interpreter.cpp.

void idInterpreter::EndMultiFrameEvent ( idEntity ent,
const idEventDef event 
)

Definition at line 832 of file Script_Interpreter.cpp.

void idInterpreter::EnterFunction ( const function_t func,
bool  clearStack 
)

Definition at line 554 of file Script_Interpreter.cpp.

void idInterpreter::EnterObjectFunction ( idEntity self,
const function_t func,
bool  clearStack 
)

Definition at line 533 of file Script_Interpreter.cpp.

void idInterpreter::Error ( const char *  fmt,
  ... 
) const

Definition at line 428 of file Script_Interpreter.cpp.

bool idInterpreter::Execute ( void  )

Definition at line 936 of file Script_Interpreter.cpp.

ID_INLINE const char * idInterpreter::FloatToString ( float  value)
private

Definition at line 164 of file Script_Interpreter.h.

const prstack_t * idInterpreter::GetCallstack ( void  ) const

Definition at line 329 of file Script_Interpreter.cpp.

int idInterpreter::GetCallstackDepth ( void  ) const

Definition at line 320 of file Script_Interpreter.cpp.

const function_t * idInterpreter::GetCurrentFunction ( void  ) const

Definition at line 338 of file Script_Interpreter.cpp.

ID_INLINE idEntity * idInterpreter::GetEntity ( int  entnum) const
private

Definition at line 234 of file Script_Interpreter.h.

bool idInterpreter::GetRegisterValue ( const char *  name,
idStr out,
int  scopeDepth 
)

Definition at line 187 of file Script_Interpreter.cpp.

ID_INLINE idScriptObject * idInterpreter::GetScriptObject ( int  entnum) const
private

Definition at line 247 of file Script_Interpreter.h.

ID_INLINE const char * idInterpreter::GetString ( idVarDef def)
private

Definition at line 206 of file Script_Interpreter.h.

idThread * idInterpreter::GetThread ( void  ) const

Definition at line 347 of file Script_Interpreter.cpp.

ID_INLINE varEval_t idInterpreter::GetVariable ( idVarDef def)
private

Definition at line 219 of file Script_Interpreter.h.

void idInterpreter::LeaveFunction ( idVarDef returnDef)
private

Definition at line 623 of file Script_Interpreter.cpp.

bool idInterpreter::MultiFrameEventInProgress ( void  ) const

Definition at line 845 of file Script_Interpreter.cpp.

ID_INLINE void idInterpreter::NextInstruction ( int  position)
private

Definition at line 265 of file Script_Interpreter.h.

ID_INLINE void idInterpreter::PopParms ( int  numParms)
private

Definition at line 124 of file Script_Interpreter.h.

ID_INLINE void idInterpreter::Push ( int  value)
private

Definition at line 138 of file Script_Interpreter.h.

ID_INLINE void idInterpreter::PushString ( const char *  string)
private

Definition at line 151 of file Script_Interpreter.h.

void idInterpreter::Reset ( void  )

Definition at line 158 of file Script_Interpreter.cpp.

void idInterpreter::Restore ( idRestoreGame savefile)

Definition at line 103 of file Script_Interpreter.cpp.

void idInterpreter::Save ( idSaveGame savefile) const

Definition at line 53 of file Script_Interpreter.cpp.

ID_INLINE void idInterpreter::SetString ( idVarDef def,
const char *  from 
)
private

Definition at line 193 of file Script_Interpreter.h.

void idInterpreter::SetThread ( idThread pThread)

Definition at line 357 of file Script_Interpreter.cpp.

void idInterpreter::StackTrace ( void  ) const

Definition at line 390 of file Script_Interpreter.cpp.

void idInterpreter::ThreadCall ( idInterpreter source,
const function_t func,
int  args 
)

Definition at line 510 of file Script_Interpreter.cpp.

void idInterpreter::Warning ( const char *  fmt,
  ... 
) const

Definition at line 453 of file Script_Interpreter.cpp.

Member Data Documentation

prstack_t idInterpreter::callStack[MAX_STACK_DEPTH]
private

Definition at line 43 of file Script_Interpreter.h.

int idInterpreter::callStackDepth
private

Definition at line 44 of file Script_Interpreter.h.

const function_t* idInterpreter::currentFunction
private

Definition at line 52 of file Script_Interpreter.h.

bool idInterpreter::debug

Definition at line 81 of file Script_Interpreter.h.

bool idInterpreter::doneProcessing

Definition at line 78 of file Script_Interpreter.h.

idEntity* idInterpreter::eventEntity
private

Definition at line 57 of file Script_Interpreter.h.

int idInterpreter::instructionPointer
private

Definition at line 53 of file Script_Interpreter.h.

byte idInterpreter::localstack[LOCALSTACK_SIZE]
private

Definition at line 47 of file Script_Interpreter.h.

int idInterpreter::localstackBase
private

Definition at line 49 of file Script_Interpreter.h.

int idInterpreter::localstackUsed
private

Definition at line 48 of file Script_Interpreter.h.

int idInterpreter::maxLocalstackUsed
private

Definition at line 50 of file Script_Interpreter.h.

int idInterpreter::maxStackDepth
private

Definition at line 45 of file Script_Interpreter.h.

const idEventDef* idInterpreter::multiFrameEvent
private

Definition at line 56 of file Script_Interpreter.h.

int idInterpreter::popParms
private

Definition at line 55 of file Script_Interpreter.h.

bool idInterpreter::terminateOnExit

Definition at line 80 of file Script_Interpreter.h.

idThread* idInterpreter::thread
private

Definition at line 59 of file Script_Interpreter.h.

bool idInterpreter::threadDying

Definition at line 79 of file Script_Interpreter.h.


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