Classes of GRP Parser defined in pproccl.h

Class index

TprsProcess
TprsProcColl

TprsProcess

TObject
   |
   +------TprsProcess

Field index of TprsProcess

Name
NumID
Rank
Globals
Locals
Heads
Ports
PrgItems
parent

Method index of TprsProcess

TprsProcess
~TprsProcess
Init
MakeItemColl
MakePortColl
IsGroup
*show_name_title
ShowData
WriteGRP
show_name

Fields

char *Name

Name of the process.
intNumID

Identification number of the process. This data field is set up by ActivateProcess method of the TprsAppColl class when it needs to make a new process object.
intRank

Rank number of the process. This number specifies the position of the process in a process group. This is important for group communication because in that case the rank number specifies which part of the message is related to which process in the group.

PCollection Globals

Collection of source objects (PprsSource) where source codes of global definitions are stored.

PCollection Locals

Collection of source objects (PprsSource) where source codes of local definitions are stored.

PCollection Heads

Collection of source objects (PprsSource) where source codes of head (include) definitions are stored.

PprsPortColl Ports

Collection of ports belong to the process.

PprsItemColl PrgItems

Collection of program items owned by the process.

PprsProcess parent

Pointer to "parent" process. If the process is an element of a process group then it has a parant which is the process group which the process is belongs to. Otherwise the process has not got parant and this variable is zero.

Methods

TprsProcess(char *AName)

Constructor of the process object class.

virtual ~TprsProcess(void)

Destructor of the class.

virtual int Init(void)

Initialization of the object. This method must be called after constructor immediately when a new object created.

virtual PprsItemColl MakeItemColl(void)

This virtual method is used to make a new program item collection. If you are going to use your own type of collection then you should override this method.

virtual PprsPortColl MakePortColl(void)

This virtual method is used to make a new port collection. If you are going to use your own type of collection then you should override this method.

virtual bool IsGroup(void)

Returns FALSE.

virtual char *show_name_title(void)

returns "process". This string is used when task graph output is produced.

virtual void ShowData(FILE *To, char *Pre)

This method prints out values of data fileds to To file and prints Pre string at the beginning of every lines.

virtual void WriteGRP(FILE *To, int Ind)

This function generates GRP code of the object and writes it to To file every lines indented by Ind characters.

virtual void show_name(FILE *To)

This function is used when task graph output is produced. This function prints out name of the process in "absoulte" form. If the process has a parent (it is an element of a process group) then the name of the parent is printed out first and then the process name is printed separated with a "/".

TprsProcColl

TObject
   |
   +-----TCollection
              |
              +-------TprsProcColl

Field index of TprsProcColl

Active

Method index of TprsProcColl

TprsProcColl
~TprsProcColl
ActivateProc
FoundProcByName
FoundProcByID
FoundProc
MakeProcess
ShowData
WriteGRP

Fields

PprsProcess Active

Active process. This variable is used internally during parsing.

Methods

TprsProcColl(TIndex ALimit, TIndex ADelta)

Constructor of the process collection object class.

virtual ~TprsProcColl(void)

Destructor of the class.

PprsProcess ActivateProc(char *name, int numid)

This method is used to activate a process during parsing.

PprsProcess FoundProcByName(char *name)

This method can be used to get a process by name name. If specified process is not found NULL will be returned.

PprsProcess FoundProcByID(int pid)

This method can be used to get a process by its numerical ID pid. If specified process is not found NULL will be returned.

PprsProcess FoundProc(char *name, int pid)

This method can be used to get a process by either its name name or its numerical ID pid. If specified process is not found NULL will be returned. If name parameter is not NULL and it points to a non-empty string the process is searched by this name else if the pid parameter is not less than 0 the process is searched by this ID.

virtual PprsProcess MakeProcess(char *name)

This virtual method is used to make a new process object. if you are going to use your own type of process objects you should override this method.

virtual void ShowData(FILE *To, char *Pre)

This method prints out values of data fields to To file and prints Pre string at the beginning of every lines.

virtual void WriteGRP(FILE *To, int Ind)

This function generates GRP code of the object and writes it to To file every lines indented by Ind characters.

Back to Grapnel Compiler.