.\" $Id: ptype.3,v 1.1 2002/03/08 13:51:03 fred Exp $ .\" @(#)ptype.l 0.0 90/22/08 UPMC; Author: Frederic Petrot .if t \{\ .XS \n% .ti 0.2i ptype .XE .XS4 \n% .ti 0.2i ptype .XE4 \} .TH PTYPE 3 "October 1, 1997" "ASIM/LIP6" "MBK UTILITY STRUCTURE DEFINITIONS" .SH NAME ptype \- mbk list of typed pointers .SH DESCRIPTION The \fBptype\fP is used to save typed pointers in a list. The use of this structure is strongly recommanded, when such a need occurs. It is the case in the \fIUSER\fP field of all mbk layout and netlist objects, where data specific to different proccessing may be accessed through this unique field. It is the charge of the user to give its pointers a type that will not collide with existing types. .LP The declarations needed to work on \fBptype\fP are available in the header file \fI"/labo/include/mut315.h"\fP, where '\fI315\fP' is the actual mbk version. .LP The following C structure describes the list of typed pointers : .RS .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} .ta 3n 20n 30n typedef struct ptype { struct ptype \(**NEXT; void \(**DATA; long TYPE; } ptype_list; .ft R .fi .RE .TP 20 \fINEXT\fP Pointer to the next \fBptype\fP of the list. .TP \fIDATA\fP Generic pointer that may point where the user wants to. .TP \fITYPE\fP Identifier of the user of the pointed data. One shall not access someone else \fBptype\fP since it doesn't know what's in it. This means also that a \fBptype\fP user should free the space taken by its datas since it is the only one to know how to do it. .TP Remark 1: a specialized memory allocator has been built in order to create and free \fIptype_list\fPs, so absolutly avoid to create or free them an other way than through the access functions. .TP Remark 2: Now a day, three tools are known to use the \fIUSER\fP field of some mbk structures : .RS .TP 20 \fBVTIPARSER\fP the parser of vti physical format '\fI.cp\fP' files uses the \fBphcon\fP(3) \fIUSER\fP field. .TP \fBLOFIGCHAIN\fP the \fBlofigchain\fP function constructs a dual representation of the netlist in the \fIUSER\fP field of the \fBlosig\fP(3) structure. .TP \fBPLACEABOX\fP Genlib's physical placement functions, in order to have model sizes in instances. It uses the \fBphins\fP(3) \fIUSER\fP field. .RE .SH SEE ALSO .BR mbk (1), .BR addptype (3), .BR freeptype (3), .BR getptype (3), .BR delptype (3). .so jessie/alliance/alc_bug_report.1.en.gz