TObject | +------TprsApplication
Name
Headers
ProcColl
Windows
TprsApplication
~TprsApplication
Init
MakeGroupColl
MakeWindowColl
MakeProcColl
ShowData
WriteGRP
char * Name
Name of the application.
PprsGroupColl Headers[prsthLast+1]
Collections of header information. Every item of the array contains a collection of groups collected from header part of the application. There are different type of application's header such as parameters of editor, hardware, and so on. This different type of informations are stored in different group collection and that collections are stored in items of this array.
PprsProcColl ProcColl
Collection of processes. Processes of the application are stored in a special collection.
PprsWindowColl Windows
Collection of windows. Window part of the application contains information about GRED's windows and their location and so on. This is for GRED only.
TprsApplication(char
* AName)
Constructor of the class. It builds up the object and allocates spaces for object's variables.
virtual ~TprsApplication(void)
Destructor of the object.
virtual int Init(void)
Initializer of the object. It contains virtual method calls which should be done in constructor, so it must be called immediately after object creation.
virtual PprsGroupColl MakeGroupColl(int
i)
This method makes a collection of parameters' groups. If you are going to use your own collection you have to override this method to make it. Parameter i determines the type of the collection. If it is less than 0 the collection will handle informations from window part of the application else it will contain groups of parameters from header part of the application.
virtual PprsWindowColl MakeWindowColl(void)
This nethod makes a collection which holds information of the window part of the application. If you are going to use your own type of collection you have to override this method.
virtual PprsProcColl MakeProcColl(void)
This method makes a collection to hold processes. If you are going to use your own type of collection you have to override this method.
virtual void ShowData(FILE
*To, char *Pre)
This method makes a report about data of the object to file specified by To and prints Pre at the beginning of the lines.
virtual void WriteGRP(FILE
*To, int Ind)
This method reports application in GRP syntax to file To indenting lines by Ind.
TObject | +-----TCollection | +-------TprsAppColl
Active
ActiveGroup
ItemStack
ProgramItem
ItemCollStack
TprsAppColl
~TprsAppColl
ActivateApp
MakeApplication
FoundAppByName
ActivateGroup
ActivateGroup
StartNewParam
AddParam
MakeParam
MakeParam
MakeParam
ActivateProc
GetActiveProc
InsertProcessHeader
MakePort
AddPort
MakePortRef
AddSourceToLastPort
AddGuardToLastPort
AddPortRef
StartParseItem
MakeProgramItem
SetSourceOfPrgItem
EndParseItem
SetItemOption
MakeConnection
AddConnection
ShowData
WriteGRP
PprsApplication Active
Internal variable of the parser used during parsing.
PprsGroup ActiveGroup
Internal variable of the parser used during parsing.
PCollection ItemStack
Internal variable of the parser used during parsing.
PprsItem ProgramItem
Internal variable of the parser used during parsing.
PCollection ItemCollStack
Internal variable of the parser used during parsing.
TprsAppColl(TIndex
ALimit, TIndex ADelta)
Constructor of the object. Parameters are passed to contrutor of inherited class.
virtual ~TprsAppColl(void)
Destructor of the object.
PprsApplication ActivateApp(char
*name)
Activating application specified by the parameter. Is is used during parsing.
virtual PprsApplication MakeApplication(char
*name)
This method makes an object for an application. If you are going to use your own type of application you have to override this method.
PprsApplication FoundAppByName(char
*name)
This method can be used to search an application by its name.
PprsGroup ActivateGroup(int
Section, char *GroupName)
This method activates a group of parameters. It is used during parsing.
PprsGroup ActivateGroup(char
*WindowName, char *GroupName)
This method activates a group of parameters. It is used during parsing.
PprsValueColl StartNewParam(char
*AName)
This method starts parsing a new parameter. It is used by parser internally. Behavior of this method can be modified by the DealParam filed of the parser object.
PprsParam AddParam(PprsParam
param)
This method adds a new value param to the parameter activated by StartNewParam.
virtual PprsParam MakeParam(long
AValue)
This method makes a long type value of a parameter. If you are going to use your own type of value you have to override this method.
virtual PprsParam MakeParam(double
AValue)
This method makes a doube type value of a parameter. If you are going to use your own type of value you have to override this method.
virtual PprsParam MakeParam(char
*AValue)
This method makes a string type value of a parameter. If you are going to use your own type of value you have to override this method.
PprsProcess ActivateProc(char
*name, int numid)
This method activates a process during parsing. It is used by parser internally.
PprsProcess GetActiveProc(void)
This function returns activated process.
void InsertProcessHeader(prsTPHeaderType
HeaderType, PprsSource src)
This method inserts process's header information into the activated process. HeaderType specifies the type of the info. Information (source code) must be stored in src object, this object made by parser automatically.
virtual PprsPort MakePort(prsTPortRec
rec)
This method makes an object to represent a port. If you are going to use your own type of port you have to override this method.
bool AddPort(PprsPort
port)
This method inserts port port into active process.
virtual PPortRefAndSrc MakePortRef(PprsPort
port)
This method makes a reference to a port. This reference used commucation program items. If you are going to use your own type of reference you have to override this method.
void AddSourceToLastPort(PprsSource
src)
Port references should contain C source to define name of the variable which will be sent on the port. This C source is stored in src object by the parser automatically and it uses this method to add information to port reference.
void AddGuardToLastPort(PprsSource
src)
This method is used to add c source code of the guard to the port reference actually parsed.
bool AddPortRef(int
PortNum)
This method adds a port reference to actual program item of the actual process. The new port reference will refer to the port identified by PortNum.
PprsItem StartParseItem(int
AID, prsTProgType AType, char
*AName)
This method is used by parser internally.
virtual PprsItem MakeProgramItem(int
AID, prsTProgType AType)
This method makes a new program item object. If you are going to use your own type of items you have to override this method. AID sepcifies idetification number of the program item and AType specifies its type.
void SetSourceOfPrgItem(PprsSource src)
This method attaches source code to the program item. Source code is stored in src object by the parser automatically and it uses this method to add the source code to the actually parsed program item.
bool EndParseItem(void)
This method is used by parser internally.
void SetItemOption(iopType what, iopValue val,
void *inf)
This option calls SetOption method of
actually parsed program item object to set up an option of
it.
Connections
virtual PprsConn MakeConnection(prsTConnType
AType, int ANum, int AiID,
PprsSource Src)
This method makes a new object to represent a connection. If you
are going to use your own type of connections you have to override
this method. AType determines the type of the connection,
ANum specifies local and AiID the global identification
number of the connection. It is possible to attache source code to the
connection (especially in ALT constructions), existing source code is
stored in Src object by the parser.
void AddConnection(PprsConn
Conn)
This method adds connection Conn to actual program item.
Reports
virtual void ShowData(FILE *To,
char *Pre)
This method makes a report about data of the object to file
specified by To and prints Pre at the beginning of the
lines.
virtual void WriteGRP(FILE *To,
int Ind)
This method reports applications in GRP syntax to file To
indenting lines by Ind.
Back to
Grapnel Compiler.