1ADDRDSINS(3)                RDS PHYSICAL FUNCTIONS                ADDRDSINS(3)
2
3
4

NAME

6        addrdsins - adds an instance to a figure
7

SYNOPSIS

9       #include "rdsnnn.h"
10       rdsins_list ∗addrdsins( Figure, Model, Name, Sym, X, Y )
11            rdsfig_list ∗Figure;
12            char        ∗Model;
13            char        ∗Name;
14            char         Sym;
15            long         X;
16            long         Y;
17

PARAMETER

19       Figure              figure which contains the instance.
20
21       Model               Name of the model of the instance.
22
23       Name                Name  of  the  instance  in  the figure at which it
24                           belongs.
25
26       Sym                 Symmetry applied to the instance.
27
28                           possible values :
29
30                           RDS_NOSYM           no symmetry.
31
32                           RDS_ROT_P           90  degrees  rotation   counter
33                                               clockwise.
34
35                           RDS_SYMXY           symmetry with regard to a hori‐
36                                               zontal and vertical axis.
37
38                           RDS_ROT_M           90 degrees rotation clockwise.
39
40                           RDS_SYM_X           symmetry with regard to a  ver‐
41                                               tical axis.
42
43                           RDS_SY_RM           symmetry  with regard to a ver‐
44                                               tical  axis  and   90   degrees
45                                               clockwise.
46
47                           RDS_SYM_Y           symmetry with regard to a hori‐
48                                               zontal axis.
49
50                           RDS_SY_RP           symmetry with regard to a hori‐
51                                               zontal   axis  and  90  degrees
52                                               rotation counter clockwise.
53
54       X,Y                 position of the lower left corner of  the  instance
55                           in the figure after symmetry.
56

DESCRIPTION

58       The addrdsins function adds an instance to the head of instances's list
59       in  the  figure  described  in  function  parameter.  Some  fields   of
60       rdsins_list structure are modified as follows :
61       The field FIGNAME is set to Model
62       The field INSNAME is set to Name
63       The field X is set to X
64       The field Y is set to Y
65       The field TRANSF is set to Sym
66       The field SIZE is set to Figure->SIZE
67

RETURN VALUE

69       addrdsins returns a pointer to the newly created instance which is head
70       of instances's list of the figure.
71

ERRORS

73       "Rds202: rdsalloc error, can't continue !"
74              it's impossible to allocate the memory size desired.
75

EXAMPLE

77       #include "mutnnn.h"
78       #include "rdsnnn.h"
79       #include "rtlnnn.h"
80               typedef struct UserStruct
81                {
82                  char ∗STRING;
83                  void ∗USER1;
84                } UserStruct;
85                main()
86                 {
87                   rdsfig_list ∗RdsFigure;
88                   rdsins_list ∗Instance;
89                   mbkenv();
90                   rdsenv();
91                   loadrdsparam();
92                   RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) );
93                   Instance = addrdsins (RdsFigure,"na2_y","and2",RDS_NOSYM,8,6);
94                   printf("(RdsFigure->INSTANCE)->NAME = %s\n",
95                           (RdsFigure->INSTANCE)->NAME);
96                   /∗ Instance is head of instance list of the figure ∗/
97                   printf("Instance->NAME = %s\n", Instance->NAME);
98                 }
99

SEE ALSO

101       librds, delrdsins, viewrdsins
102
103
104
105
106
107
108ASIM/LIP6                       October 1, 1997                   ADDRDSINS(3)
Impressum