Download CS501 VOTE: Visual Object Tracing Engine

Transcript
cl_RunSet
During execution after extracting information from the log file, all the available classes and the
methods will be identified. Two lists will be kept to track this information. The first one list keeps
track of all the existing classes and methods in the log file. The user has the freedom to choose
which classes and methods to be shown in the MSC diagram. The second list holds the selections
The lists, implemented using hash tables, are maintained by this class (cl_RunSet). Two instances
of cl_ClassHash, sm_ClassHash and sm_FilterHash, are kept as static private members. (Class
cl_ClassHash will be discussed in detail in a later section.) This class provides public access to the
contents of above two lists.
Due to the fact that cl_RunSet will interact closely with Tcl/Tk script, a dispatcher is created to
invoke all the class methods to avoid passing multiple interpreter-dependent variables to each
member method.
Interfaces
DispatchRunSet(ClientData Data,
Tcl_Interp* interp,
char* argv[]): TCL/TK command dispatcher
int argc,
LoadClassList(const char* fileName): Load in the log file and extract all the class
information to sm_ClassHash and sm_FilterHash.
ResetClassList(): Reset both class list
GetClassList()
GetMethodList(char*): Acquire class names and method names from the sm_ClassHash
FilterExistClass(char*)
FilterExistMethod(char*,char*)
FilterInsertClass(char*)
FilterInsertMethod(char*,char*)
FilterDeleteClass(char*)
FilterDeleteMethod(char*,char*):Acquire
sm_FilterHash
information
from
and
update
to
PrintClass()
PrintFilter():Printing the contents of both lists to standard output for checking purposes
Internals
Two static instances of cl_ClassHash contain the information of all available and selected classes
and methods.
Static cl_ClassHash* sm_ClassHash: All the available classes and methods
Static cl_ClassHash*
updated dynamically
sm_FilterHash: Selected classes and methods, will be
16