1ADDPHINS(3)                 MBK PHYSICAL FUNCTIONS                 ADDPHINS(3)
2
3
4

NAME

6       addphins - create a physical instance
7

SYNOPSIS

9       #include "mph.h"
10       phins_list ∗addphins(ptfig, figname, insname, sym, x, y)
11       phfig_list ∗ptfig;
12       char ∗figname;
13       char ∗insname;
14       char sym;
15       long x, y;
16

PARAMETERS

18       ptfig               Pointer  to the figure in which the instance should
19                           be added
20
21       figname             Instance model name
22
23       insname             Instance name
24
25       sym                 Geometrical operation performed on the instance
26
27       x, y                Coordinates  of  the  lower  left  corner  of   the
28                           instance
29

DESCRIPTION

31       addphins creates a new instance whose lower left corner is at the given
32       coordinates, and adds it  to  the  list  of  instances  pointed  to  by
33       ptfig->PHINS.  The  new  instance  is  added  in front of the list, and
34       becomes itself the list head.
35       The parameters figname, insname, sym, x and y fill respectivly the FIG‐
36       NAME, INSNAME, TRANSF, XINS and YINS fields of the phins structure.
37       The addphins function does not check in memory or on disk to see if the
38       instantiated model exists, since no information on it are needed.
39       The coordinates are not transformation dependent.  It  means  that  the
40       transformation  is  performed  before placing the instance at the given
41       point.  For details on the structure, see phins(3).
42

RETURN VALUE

44       addphins returns a pointer to the newly created instance.
45

ERRORS

47       "∗∗∗ mbk error ∗∗∗ addphins figure figname cannot be part of itself"
48              The instance has for model name of the figure on the which it is
49              to  be added.  It's illegal and dangerous. This check is made at
50              the actual hierarchy level only, not recursivly  on  the  struc‐
51              ture, so it still may happened.
52
53       "∗∗∗ mbk error ∗∗∗ illegal addphins transformation sym in : insname"
54              The  geometrical  operation  is  not  in  the  legal  range. See
55              phins(3) for a complete list of values.
56
57       "∗∗∗ mbk error ∗∗∗ illegal addphins duplicate instance name : insname"
58              The instance name is an identifier, so it can't appear twice  in
59              the same figure.
60

EXAMPLE

62       #include "mph.h"
63       phins_list ∗ins_dup(pfd, pfs) /∗ duplicate instances ∗/
64       phfig_list ∗pfd, ∗pfs;
65       {
66       phins_list ∗pi;
67          for (pi = pfs->phins; pi != NULL; pi = pi->NEXT)
68             addphins(pfd, pi->FIGNAME, pi->INSNAME, pi->TRANSF,
69                                pi->XINS, pi->YINS);
70          return pfd->PHINS;
71       }
72

SEE ALSO

74       mbk(1), phfig(3), phins(3), getphins(3), delphins(3).
75
76
77
78
79
80
81ASIM/LIP6                       October 1, 1997                    ADDPHINS(3)
Impressum