Classes of GRP Parser defined in pportcl.h

Class index

TPortRefAndSrc
TPortData
TprsPort
TprsPortColl

TPortRefAndSrc

TObject
   |
   +------TPortRefAndSrc

Field index of TPortRefAndSrc

Port
Sources
Guard

Method index of TPortRefAndSrc

TPortRefAndSrc
~TPortRefAndSrc
ShowData
WriteGRP

Fields

PprsPort Port

Referenced port.

PCollection Sources

Collection of file names where source codes are stored.

PprsSource Guard

This data field holds source code of the guard associated with the port reference. This field can be NULL if communication through the referenced port is not guarded.

Methods

TPortRefAndSrc(PprsPort APort, PCollection ASources)

Constructor of the object.

virtual ~TPortRefAndSrc(void)

Destructor of the class.

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

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

virtual void WriteGRP(FILE *To, int Ind)

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

TPortData

TObject
   |
   +------TPortData

Field index of TPortData

Type
Num
Src

Method index of TPortData

TPortData
~TPortData
WriteGRP

Fields

prsTDataType Type

Type of the represented data.

int Num

Number of represented items. If data is an array then this field can be larger then 1. In this case Src field is NULL. If this field is -1 then number f the data is specified by a C source string and it stored in the Src field.

PprsSource Src

Number of the data can be specified by a C source string. In this case the Num field is -1.

Methods

TPortData(prsTDataType AType, int ANum)

Constructor of the class.

virtual ~TPortData(void)

Destructor of the class.

virtual void WriteGRP(FILE *To, int Ind)

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

TprsPort

TObject
   |
   +------TprsPort

Field index of TprsPort

Name
Type
SID
Computation
ProcName
ProcID
ToSID
Flag
TypeString
DataTypes

Method index of TprsPort

TprsPort
~TprsPort
ShowData
WriteGRP

Fields

char *Name

Name of the port.
prsTPortType Type

Type of the port.

int SID

Identification number of the port.

prsTComputation Computation

This field stores the type of computation which must be done by the reduce port.

char *ProcName

Name of the process where the port is connected to. The connected process can be specified by its name or its ID. If it is specified by its name the ProcID is less than zero. If the process is specified by its ID the ProcName is NULL or points to an empty string.

int ProcID

Numerical ID of the connected process. The connected process can be specified by its name or its ID. If it is specified by its name the ProcID is less than zero. If the process is specified by its ID the ProcName is NULL or points to an empty string.

int ToSID

Identification number of remote port where this port is connected through to remote process.

bool Flag

This variable is used internally.

char *TypeString

This variable points to a string which is the name of the port's type. It is used internally.

PCollection DataTypes

Collection of data types which should be sent through this port.

Methods

TprsPort(char *AName, prsTPortType AType, int ASID, char *ToProc, int ToProcID, int AToSID, PCollection ADataTypes, prsTComputation AComputation)

Constructor of the port object.

virtual ~TprsPort(void)

Destructor of the class.

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

This method prints out values of the data fileds to To file and prints Pre string at the beginning of erevy 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.

TprsPortColl

TObject
   |
   +------TCollection
               |
               +------TSortedCollection
                               |
                               +------TprsPortColl

Method index of TprsPortColl

TprsPortColl
~TprsPortColl
Compare
GetByNum
InsertItem
*KeyOf
ShowData
WriteGRP

Methods

TprsPortColl(TIndex ALimit, TIndex ADelta)

Constructor of the port collection object class.

virtual ~TprsPortColl(void)

Destructor of the class.

virtual int Compare(void *Key1, void *Key2)

This method overrides inherited Compare method and implements a special comparison to order ports by its identification number.

PprsPort GetByNum(int ASID)

Get a port by its identification number ASID. If requested port does not exist this function returns NULL.

void InsertItem(PprsPort Item)

This method inserts Item port to the collection if it is not inserted already.

virtual void *KeyOf(void *Item)

This function returns key data field of the items (it assumes that every item on the collection is a port object). Key data field id the identification number of the port (SID).

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

This method prints out values of data field 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.