#include <FunctionLexicon.h>
Inherits SubsystemInterface.
Inherited by W3DFunctionLexicon.
Classes | |
| struct | TableEntry |
Public Types | |
| enum | TableIndex { TABLE_ANY = -1 , TABLE_GAME_WIN_SYSTEM = 0 , TABLE_GAME_WIN_INPUT , TABLE_GAME_WIN_TOOLTIP , TABLE_GAME_WIN_DEVICEDRAW , TABLE_GAME_WIN_DRAW , TABLE_WIN_LAYOUT_INIT , TABLE_WIN_LAYOUT_DEVICEINIT , TABLE_WIN_LAYOUT_UPDATE , TABLE_WIN_LAYOUT_SHUTDOWN , MAX_FUNCTION_TABLES } |
Protected Member Functions | |
| void | loadTable (TableEntry *table, TableIndex tableIndex) |
| load a lookup table with run time values needed and save in table list | |
| void * | findFunction (NameKeyType key, TableIndex index) |
| void * | keyToFunc (NameKeyType key, TableEntry *table) |
| internal searching | |
Protected Attributes | |
| TableEntry * | m_tables [MAX_FUNCTION_TABLES] |
| the lookup tables | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
Collection of function pointers to help us in managing callbacks
Definition at line 45 of file FunctionLexicon.h.
Definition at line 57 of file FunctionLexicon.h.
| FunctionLexicon::FunctionLexicon | ( | void | ) |
Definition at line 512 of file FunctionLexicon.cpp.
|
virtual |
Definition at line 524 of file FunctionLexicon.cpp.
|
protected |
given a key find the function, the index parameter can limit the search to a single table or to ANY of the tables
Search tables for the function given this key, if the index parameter is TABLE_ANY, then ALL tables will be searched. Otherwise index refers to only a single table index to be searched
Definition at line 440 of file FunctionLexicon.cpp.
| GameWinDrawFunc FunctionLexicon::gameWinDrawFunc | ( | NameKeyType | key, |
| TableIndex | index = TABLE_ANY ) |
Definition at line 683 of file FunctionLexicon.cpp.
|
inline |
Definition at line 138 of file FunctionLexicon.h.
|
inline |
Definition at line 136 of file FunctionLexicon.h.
|
inline |
Definition at line 140 of file FunctionLexicon.h.
|
inline |
get internal function table
Definition at line 133 of file FunctionLexicon.h.
|
virtual |
Initialize our dictionary of funtion pointers and symbols
Implements SubsystemInterface.
Reimplemented in W3DFunctionLexicon.
Definition at line 532 of file FunctionLexicon.cpp.
|
protected |
internal searching
Search the provided table for a function matching the key
Definition at line 413 of file FunctionLexicon.cpp.
|
protected |
load a lookup table with run time values needed and save in table list
Since we have a convenient table to organize our callbacks anyway, we'll just use this same storage space to load in any run time components we might want to add to the table, such as generating a key based off the name supplied in the table for faster access
Definition at line 384 of file FunctionLexicon.cpp.
|
virtual |
reset
Implements SubsystemInterface.
Reimplemented in W3DFunctionLexicon.
Definition at line 554 of file FunctionLexicon.cpp.
|
virtual |
Implements SubsystemInterface.
Reimplemented in W3DFunctionLexicon.
Definition at line 570 of file FunctionLexicon.cpp.
| Bool FunctionLexicon::validate | ( | void | ) |
validate the tables and make sure all entries are unique
Scan the tables and make sure that each function address is unique. We want to do this to prevent accidental entries of two identical functions and because the compiler will optimize identical functions to the same address (typically in empty functions with no body and the same parameters) which we MUST keep separate for when we add code to them
Definition at line 614 of file FunctionLexicon.cpp.
| WindowLayoutInitFunc FunctionLexicon::winLayoutInitFunc | ( | NameKeyType | key, |
| TableIndex | index = TABLE_ANY ) |
Definition at line 701 of file FunctionLexicon.cpp.
|
inline |
Definition at line 145 of file FunctionLexicon.h.
|
inline |
Definition at line 143 of file FunctionLexicon.h.
|
protected |
the lookup tables
Definition at line 126 of file FunctionLexicon.h.