Rev 16427 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16427 | Rev 16682 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | !exit |
27 | !exit |
28 | !endif |
28 | !endif |
29 | 29 | ||
30 | !readdef $classdeffile |
30 | !readdef $classdeffile |
31 | 31 | ||
32 | !if |
32 | !if $class_type!=2 |
33 | # You can't add a subclass inside an independent class |
33 | # You can't add a subclass inside an independent class |
- | 34 | # limitation subclasses in a group class |
|
34 | error=class $qclass |
35 | error=class $qclass not a groupement |
35 | !exit |
36 | !exit |
36 | !endif |
37 | !endif |
37 | 38 | ||
38 | class_nbsubclasses=!recordcnt wimshome/log/classes/$qclass/.subclasses |
39 | class_nbsubclasses=!recordcnt wimshome/log/classes/$qclass/.subclasses |
39 | 40 | ||
Line 47... | Line 48... | ||
47 | test=!defof class_defined in $classdeffile |
48 | test=!defof class_defined in $classdeffile |
48 | !if $test=yes |
49 | !if $test=yes |
49 | # If a subclass has been deleted before, nb_subclass may not correspond to the next available subclass. So we use the next free ID. |
50 | # If a subclass has been deleted before, nb_subclass may not correspond to the next available subclass. So we use the next free ID. |
50 | !goto new_sub_id |
51 | !goto new_sub_id |
51 | !endif |
52 | !endif |
52 | - | ||
53 | !else |
53 | !else |
54 | # Si la classe n'existe pas, on la cree. |
54 | # Si la classe n'existe pas, on la cree (cela ne peut ĂȘtre qu'un groupement/class individuelle). |
55 | cd=$qclass |
55 | cd=$qclass |
56 | !endif |
56 | !endif |
57 | - | ||
58 | !endif |
57 | !endif |
59 | 58 | ||
60 | data1=!nonempty lines $data1 |
59 | data1=!nonempty lines $data1 |
61 | data2=!nonempty lines $data2 |
60 | data2=!nonempty lines $data2 |
62 | n1=!linecnt $data1 |
61 | n1=!linecnt $data1 |
Line 117... | Line 116... | ||
117 | !exit |
116 | !exit |
118 | !endif |
117 | !endif |
119 | 118 | ||
120 | !next field |
119 | !next field |
121 | 120 | ||
122 | # |
121 | # make cl_typename in function of cl_type in a individual class or groupement |
- | 122 | # 0 -> class |
|
- | 123 | # 1 -> class |
|
- | 124 | # 2 -> group |
|
- | 125 | !if $qclass!=$empty and $cd!=$qclass |
|
- | 126 | cl_type=1 |
|
- | 127 | !else |
|
123 | !bound |
128 | !bound cl_type within 0,2 default 0 |
- | 129 | !endif |
|
124 | cl_typename = !item ($cl_type+1) of $classtypes |
130 | cl_typename = !item ($cl_type+1) of $classtypes |
125 | 131 | ||
126 | !if $cl_type > 1 and / isin $cd |
132 | !if $cl_type > 1 and / isin $cd |
127 | error=superclass $qclass already exists |
133 | error=superclass $qclass already exists |
128 | !exit |
134 | !exit |