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
idProgram Class Reference

#include <Script_Program.h>

Public Member Functions

 idProgram ()
 
 ~idProgram ()
 
void Save (idSaveGame *savefile) const
 
bool Restore (idRestoreGame *savefile)
 
int CalculateChecksum (void) const
 
void Startup (const char *defaultScript)
 
void Restart (void)
 
bool CompileText (const char *source, const char *text, bool console)
 
const function_tCompileFunction (const char *functionName, const char *text)
 
void CompileFile (const char *filename)
 
void BeginCompilation (void)
 
void FinishCompilation (void)
 
void DisassembleStatement (idFile *file, int instructionPointer) const
 
void Disassemble (void) const
 
void FreeData (void)
 
const char * GetFilename (int num)
 
int GetFilenum (const char *name)
 
int GetLineNumberForStatement (int index)
 
const char * GetFilenameForStatement (int index)
 
idTypeDefAllocType (idTypeDef &type)
 
idTypeDefAllocType (etype_t etype, idVarDef *edef, const char *ename, int esize, idTypeDef *aux)
 
idTypeDefGetType (idTypeDef &type, bool allocate)
 
idTypeDefFindType (const char *name)
 
idVarDefAllocDef (idTypeDef *type, const char *name, idVarDef *scope, bool constant)
 
idVarDefGetDef (const idTypeDef *type, const char *name, const idVarDef *scope) const
 
void FreeDef (idVarDef *d, const idVarDef *scope)
 
idVarDefFindFreeResultDef (idTypeDef *type, const char *name, idVarDef *scope, const idVarDef *a, const idVarDef *b)
 
idVarDefGetDefList (const char *name) const
 
void AddDefToNameList (idVarDef *def, const char *name)
 
function_tFindFunction (const char *name) const
 
function_tFindFunction (const char *name, const idTypeDef *type) const
 
function_tAllocFunction (idVarDef *def)
 
function_tGetFunction (int index)
 
int GetFunctionIndex (const function_t *func)
 
void SetEntity (const char *name, idEntity *ent)
 
statement_tAllocStatement (void)
 
statement_tGetStatement (int index)
 
int NumStatements (void)
 
int GetReturnedInteger (void)
 
void ReturnFloat (float value)
 
void ReturnInteger (int value)
 
void ReturnVector (idVec3 const &vec)
 
void ReturnString (const char *string)
 
void ReturnEntity (idEntity *ent)
 
int NumFilenames (void)
 

Public Attributes

idVarDefreturnDef
 
idVarDefreturnStringDef
 

Private Member Functions

void CompileStats (void)
 

Private Attributes

idStrList fileList
 
idStr filename
 
int filenum
 
int numVariables
 
byte variables [MAX_GLOBALS]
 
idStaticList< byte, MAX_GLOBALSvariableDefaults
 
idStaticList< function_t,
MAX_FUNCS
functions
 
idStaticList< statement_t,
MAX_STATEMENTS
statements
 
idList< idTypeDef * > types
 
idList< idVarDefName * > varDefNames
 
idHashIndex varDefNameHash
 
idList< idVarDef * > varDefs
 
idVarDefsysDef
 
int top_functions
 
int top_statements
 
int top_types
 
int top_defs
 
int top_files
 

Detailed Description

Definition at line 448 of file Script_Program.h.

Constructor & Destructor Documentation

idProgram::idProgram ( )

Definition at line 2122 of file Script_Program.cpp.

idProgram::~idProgram ( )

Definition at line 2131 of file Script_Program.cpp.

Member Function Documentation

void idProgram::AddDefToNameList ( idVarDef def,
const char *  name 
)

Definition at line 1213 of file Script_Program.cpp.

idVarDef * idProgram::AllocDef ( idTypeDef type,
const char *  name,
idVarDef scope,
bool  constant 
)

Definition at line 1234 of file Script_Program.cpp.

function_t & idProgram::AllocFunction ( idVarDef def)

Definition at line 1527 of file Script_Program.cpp.

statement_t * idProgram::AllocStatement ( void  )

Definition at line 1577 of file Script_Program.cpp.

idTypeDef * idProgram::AllocType ( idTypeDef type)

Definition at line 1121 of file Script_Program.cpp.

idTypeDef * idProgram::AllocType ( etype_t  etype,
idVarDef edef,
const char *  ename,
int  esize,
idTypeDef aux 
)

Definition at line 1135 of file Script_Program.cpp.

void idProgram::BeginCompilation ( void  )

Definition at line 1591 of file Script_Program.cpp.

int idProgram::CalculateChecksum ( void  ) const

Definition at line 2002 of file Script_Program.cpp.

void idProgram::CompileFile ( const char *  filename)

Definition at line 1838 of file Script_Program.cpp.

const function_t * idProgram::CompileFunction ( const char *  functionName,
const char *  text 
)

Definition at line 1817 of file Script_Program.cpp.

void idProgram::CompileStats ( void  )
private

Definition at line 1718 of file Script_Program.cpp.

bool idProgram::CompileText ( const char *  source,
const char *  text,
bool  console 
)

Definition at line 1772 of file Script_Program.cpp.

void idProgram::Disassemble ( void  ) const

Definition at line 1660 of file Script_Program.cpp.

void idProgram::DisassembleStatement ( idFile file,
int  instructionPointer 
) const

Definition at line 1629 of file Script_Program.cpp.

idVarDef * idProgram::FindFreeResultDef ( idTypeDef type,
const char *  name,
idVarDef scope,
const idVarDef a,
const idVarDef b 
)

Definition at line 1419 of file Script_Program.cpp.

function_t * idProgram::FindFunction ( const char *  name) const

Definition at line 1452 of file Script_Program.cpp.

function_t * idProgram::FindFunction ( const char *  name,
const idTypeDef type 
) const

Definition at line 1506 of file Script_Program.cpp.

idTypeDef * idProgram::FindType ( const char *  name)

Definition at line 1177 of file Script_Program.cpp.

void idProgram::FinishCompilation ( void  )

Definition at line 1694 of file Script_Program.cpp.

void idProgram::FreeData ( void  )

Definition at line 1864 of file Script_Program.cpp.

void idProgram::FreeDef ( idVarDef d,
const idVarDef scope 
)

Definition at line 1380 of file Script_Program.cpp.

idVarDef * idProgram::GetDef ( const idTypeDef type,
const char *  name,
const idVarDef scope 
) const

Definition at line 1339 of file Script_Program.cpp.

idVarDef * idProgram::GetDefList ( const char *  name) const

Definition at line 1196 of file Script_Program.cpp.

ID_INLINE const char * idProgram::GetFilename ( int  num)

Definition at line 615 of file Script_Program.h.

ID_INLINE const char * idProgram::GetFilenameForStatement ( int  index)

Definition at line 633 of file Script_Program.h.

int idProgram::GetFilenum ( const char *  name)

Definition at line 2097 of file Script_Program.cpp.

ID_INLINE function_t * idProgram::GetFunction ( int  index)

Definition at line 552 of file Script_Program.h.

ID_INLINE int idProgram::GetFunctionIndex ( const function_t func)

Definition at line 561 of file Script_Program.h.

ID_INLINE int idProgram::GetLineNumberForStatement ( int  index)

Definition at line 624 of file Script_Program.h.

ID_INLINE int idProgram::GetReturnedInteger ( void  )

Definition at line 570 of file Script_Program.h.

ID_INLINE statement_t & idProgram::GetStatement ( int  index)

Definition at line 543 of file Script_Program.h.

idTypeDef * idProgram::GetType ( idTypeDef type,
bool  allocate 
)

Definition at line 1152 of file Script_Program.cpp.

int idProgram::NumFilenames ( void  )
inline

Definition at line 535 of file Script_Program.h.

int idProgram::NumStatements ( void  )
inline

Definition at line 525 of file Script_Program.h.

void idProgram::Restart ( void  )

Definition at line 2056 of file Script_Program.cpp.

bool idProgram::Restore ( idRestoreGame savefile)

Definition at line 1963 of file Script_Program.cpp.

void idProgram::ReturnEntity ( idEntity ent)

Definition at line 2140 of file Script_Program.cpp.

ID_INLINE void idProgram::ReturnFloat ( float  value)

Definition at line 579 of file Script_Program.h.

ID_INLINE void idProgram::ReturnInteger ( int  value)

Definition at line 588 of file Script_Program.h.

ID_INLINE void idProgram::ReturnString ( const char *  string)

Definition at line 606 of file Script_Program.h.

ID_INLINE void idProgram::ReturnVector ( idVec3 const vec)

Definition at line 597 of file Script_Program.h.

void idProgram::Save ( idSaveGame savefile) const

Definition at line 1930 of file Script_Program.cpp.

void idProgram::SetEntity ( const char *  name,
idEntity ent 
)

Definition at line 1555 of file Script_Program.cpp.

void idProgram::Startup ( const char *  defaultScript)

Definition at line 1908 of file Script_Program.cpp.

Member Data Documentation

idStrList idProgram::fileList
private

Definition at line 450 of file Script_Program.h.

idStr idProgram::filename
private

Definition at line 451 of file Script_Program.h.

int idProgram::filenum
private

Definition at line 452 of file Script_Program.h.

idStaticList<function_t,MAX_FUNCS> idProgram::functions
private

Definition at line 457 of file Script_Program.h.

int idProgram::numVariables
private

Definition at line 454 of file Script_Program.h.

idVarDef* idProgram::returnDef

Definition at line 475 of file Script_Program.h.

idVarDef* idProgram::returnStringDef

Definition at line 476 of file Script_Program.h.

idStaticList<statement_t,MAX_STATEMENTS> idProgram::statements
private

Definition at line 458 of file Script_Program.h.

idVarDef* idProgram::sysDef
private

Definition at line 464 of file Script_Program.h.

int idProgram::top_defs
private

Definition at line 469 of file Script_Program.h.

int idProgram::top_files
private

Definition at line 470 of file Script_Program.h.

int idProgram::top_functions
private

Definition at line 466 of file Script_Program.h.

int idProgram::top_statements
private

Definition at line 467 of file Script_Program.h.

int idProgram::top_types
private

Definition at line 468 of file Script_Program.h.

idList<idTypeDef *> idProgram::types
private

Definition at line 459 of file Script_Program.h.

idHashIndex idProgram::varDefNameHash
private

Definition at line 461 of file Script_Program.h.

idList<idVarDefName *> idProgram::varDefNames
private

Definition at line 460 of file Script_Program.h.

idList<idVarDef *> idProgram::varDefs
private

Definition at line 462 of file Script_Program.h.

idStaticList<byte,MAX_GLOBALS> idProgram::variableDefaults
private

Definition at line 456 of file Script_Program.h.

byte idProgram::variables[MAX_GLOBALS]
private

Definition at line 455 of file Script_Program.h.


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